DI-Guy SDK Documentation  13.5
diguyOglGraphicsShape.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2020 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();
37  virtual void unbuild();
38  virtual void draw( int lod );
39  virtual void update_variation_texture( int num_pixels, unsigned char * pixel_data );
40  virtual void update_name_texture();
41 
42  virtual GLuint get_name_texture() { return m_name_texture_object; }
43 
44  virtual void hide() {}
45  virtual void show() {}
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 
diguyGraphicsShape * diguyOglGraphicsShape_create_func(void *internal_data)
Create function declaration.
Definition: diguyOglGraphicsShape.cpp:396
virtual void unbuild()
This function will be called by DI-Guy when it is time for the renderer-specific shape objects create...
Definition: diguyOglGraphicsShape.cpp:97
virtual void show()
This function will be called by DI-Guy when the shape should be shown, typically due to a change in t...
Definition: diguyOglGraphicsShape.h:45
static void create_shared_variation_texture()
Definition: diguyOglGraphicsShape.cpp:206
virtual void update_name_texture()
creates a decal texture with a name (accessed by get_decal_text()) see sample implementation for a re...
Definition: diguyOglGraphicsShape.cpp:303
static GLuint get_shared_variation_texture()
Definition: diguyOglGraphicsShape.h:47
void create_name_texture()
Definition: diguyOglGraphicsShape.cpp:308
virtual void update_variation_texture(int num_pixels, unsigned char *pixel_data)
Pushes a char * pixel buffer of length num_pixels that represents the unique per shape texture...
Definition: diguyOglGraphicsShape.cpp:242
This class is part of the DI-Guy Graphics API.
Definition: diguyOglGraphicsShape.h:28
A class that represents the unique per-character non-shared mesh object. DI-Guy encapsulates its text...
Definition: diguyGraphicsShape.h:51
bool m_name_texture_needs_update
Definition: diguyOglGraphicsShape.h:58
virtual void hide()
This function will be called by DI-Guy when the shape should be hidden, typically due to a change in ...
Definition: diguyOglGraphicsShape.h:44
static GLuint sm_variation_texture_object
Definition: diguyOglGraphicsShape.h:56
diguyOglGraphicsShape(void *internal_data)
Definition: diguyOglGraphicsShape.cpp:40
virtual GLuint get_name_texture()
Definition: diguyOglGraphicsShape.h:42
GLuint m_name_texture_object
Definition: diguyOglGraphicsShape.h:57
virtual void build()
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 ~diguyOglGraphicsShape()
Definition: diguyOglGraphicsShape.cpp:57
virtual void draw(int lod)
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