DI-Guy SDK Documentation  13.7
diguyOglGraphicsShape.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
8 #include <diguyGraphicsShape.h>
9 
10  // needed for function prototypes
11 #include <GL/glew.h>
12 #include <GL/gl.h>
13 
29 {
30 public:
31 
32  diguyOglGraphicsShape( void* internal_data );
33 
34  virtual ~diguyOglGraphicsShape();
35 
36  virtual void build() override;
37  virtual void unbuild() override;
38  virtual void draw( int lod ) override;
39  virtual void update_variation_texture( int num_pixels, unsigned char * pixel_data ) override;
40  virtual void update_name_texture() override;
41 
42  virtual void hide() override {}
43  virtual void show() override {}
44 
46 
48 
49  static void create_shared_variation_texture();
50 
51 protected:
52 
53  void create_name_texture();
54 
55  // Variable containing data generated during the Build Stage.
59 
60 };
61 
62 
virtual void draw(int lod) override
This function will be called by DI-Guy when it is time for the geometry of this shape to be drawn...
Definition: diguyOglGraphicsShape.cpp:124
diguyGraphicsShape * diguyOglGraphicsShape_create_func(void *internal_data)
Create function declaration.
Definition: diguyOglGraphicsShape.cpp:378
virtual void update_name_texture() override
creates a decal texture with a name (accessed by get_decal_text()) see sample implementation for a re...
Definition: diguyOglGraphicsShape.cpp:285
virtual void build() override
This function will be called by DI-Guy when it is time for renderer-specific shape objects to be crea...
Definition: diguyOglGraphicsShape.cpp:74
virtual void hide() override
This function will be called by DI-Guy when the shape should be hidden, typically due to a change in ...
Definition: diguyOglGraphicsShape.h:42
static void create_shared_variation_texture()
Definition: diguyOglGraphicsShape.cpp:185
GLuint get_name_texture()
Definition: diguyOglGraphicsShape.h:45
static GLuint get_shared_variation_texture()
Definition: diguyOglGraphicsShape.h:47
virtual void unbuild() override
This function will be called by DI-Guy when it is time for the renderer-specific shape objects create...
Definition: diguyOglGraphicsShape.cpp:97
void create_name_texture()
Definition: diguyOglGraphicsShape.cpp:290
This class is part of the DI-Guy Graphics API.
Definition: diguyOglGraphicsShape.h:28
virtual void update_variation_texture(int num_pixels, unsigned char *pixel_data) override
Pushes a char * pixel buffer of length num_pixels that represents the unique per shape texture...
Definition: diguyOglGraphicsShape.cpp:221
virtual void show() override
This function will be called by DI-Guy when the shape should be shown, typically due to a change in t...
Definition: diguyOglGraphicsShape.h:43
A class that represents the unique per-character non-shared mesh object. DI-Guy encapsulates its text...
Definition: diguyGraphicsShape.h:49
bool m_name_texture_needs_update
Definition: diguyOglGraphicsShape.h:58
static GLuint sm_variation_texture_object
Definition: diguyOglGraphicsShape.h:56
diguyOglGraphicsShape(void *internal_data)
Definition: diguyOglGraphicsShape.cpp:40
GLuint m_name_texture_object
Definition: diguyOglGraphicsShape.h:57
virtual ~diguyOglGraphicsShape()
Definition: diguyOglGraphicsShape.cpp:57