9 #include <osg/Texture2D>
42 virtual void build()
override;
45 virtual void unbuild()
override;
46 virtual void show()
override;
47 virtual void hide()
override;
55 static void set_use_pixel_lods(
bool use_pixel_lods) {s_use_pixel_lods = use_pixel_lods;}
61 virtual void update()
override;
73 std::vector<osg::Geode*> m_geodes;
75 osg::StateSet* get_state_set() {
return m_state_set.get(); }
79 void create_shared_variation_texture();
80 void create_variation_texture(
unsigned char * variation_texture_data);
81 void create_name_texture();
86 osg::ref_ptr<osg::Switch> m_switch_node;
92 osg::ref_ptr<osg::LOD> m_lod_node;
94 static bool s_use_pixel_lods;
97 osg::ref_ptr<osg::StateSet> m_state_set;
98 osg::ref_ptr<osg::Uniform> m_ufrm_link_matrix;
99 osg::ref_ptr<osg::Uniform> m_ufrm_link_matrices;
100 osg::ref_ptr<osg::Uniform> m_ufrm_link_colors;
101 osg::ref_ptr<osg::Uniform> m_ufrm_component_map_row;
102 osg::ref_ptr<osg::Uniform> m_ufrm_decal_index;
103 osg::ref_ptr<osg::Uniform> m_ufrm_lod_fade;
104 osg::ref_ptr<osg::Uniform> m_ufrm_blend_weights;
105 osg::ref_ptr<osg::Uniform> m_ufrm_blend_indices;
106 std::vector< diguyOsgMeshOffsets> m_offset_array;
107 unsigned int m_name_texture_object;
108 bool m_needs_texture_update;
112 static osg::ref_ptr<osg::Texture2D> sm_variation_texture;
virtual void unbuild() override
This function will be called by DI-Guy when it is time for the renderer-specific shape objects create...
Definition: diguyOsgGraphicsShape.cpp:797
static char * s_ufrm_link_colors_string
Definition: diguyOsgGraphicsShape.h:67
osg::Matrixf m_offset
Definition: diguyOsgGraphicsShape.h:19
virtual void set_graphics_lod(int lod) override
This function will be called by DI-Guy when the LOD of this link is "manually" set by a diguyCharacte...
Definition: diguyOsgGraphicsShape.cpp:1130
virtual void update() override
This function will be called by DI-Guy when it is time for renderer-specific shape objects created du...
Definition: diguyOsgGraphicsShape.cpp:920
diguyOsgGraphicsShape(void *internal_data)
Definition: diguyOsgGraphicsShape.cpp:175
diguyGraphicsShape * diguyOsgGraphicsShape_create_func(void *internal_data)
Create function declaration.
Definition: diguyOsgGraphicsShape.cpp:1152
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: diguyOsgGraphicsShape.cpp:864
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: diguyOsgGraphicsShape.cpp:519
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: diguyOsgGraphicsShape.cpp:1137
virtual void set_graphics_lod_ranges(float *lod_ranges) override
This function will be called by DI-Guy when the LOD ranges of this shape need to be updated after the...
Definition: diguyOsgGraphicsShape.cpp:1100
static void set_use_pixel_lods(bool use_pixel_lods)
Definition: diguyOsgGraphicsShape.h:52
Shapes are the high-level containers of visible geometry.
Definition: diguyOsgGraphicsShape.h:33
virtual ~diguyOsgGraphicsShape()
Definition: diguyOsgGraphicsShape.cpp:188
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: diguyOsgGraphicsShape.cpp:269
static char * s_ufrm_link_matrices_string
Definition: diguyOsgGraphicsShape.h:66
Helper struct for storing offsets for more complex meshes.
Definition: diguyOsgGraphicsShape.h:16
A class that represents the unique per-character non-shared mesh object. DI-Guy encapsulates its text...
Definition: diguyGraphicsShape.h:49
virtual void instancing_state_changed(int val) override
Definition: diguyOsgGraphicsShape.cpp:902
osg::ref_ptr< osg::Uniform > m_ufrm_link_matrix
Definition: diguyOsgGraphicsShape.h:18
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: diguyOsgGraphicsShape.cpp:890
This class implements shader lod system for use with DI-Guy character graphics.
Definition: diguyGraphicsShaderTechnique.h:154
Definition: diguyOsgGraphicsShape.cpp:109
Definition: diguyOsgGraphicsShape.cpp:29