DI-Guy SDK Documentation  13.2
diguyOsgGraphicsTexture.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <diguyGraphicsTexture.h>
4 
5 #include <osg/Texture2D>
6 #include <osg/StateSet>
7 
8 
24 {
25 
26 public:
27 
28  diguyOsgGraphicsTexture(void* internal_data);
29 
30  virtual void build();
31  virtual void unbuild();
32 
33  // needed for particle rendering
34  virtual void bind_now(diguyTextureMapType texture_type );
35 
36  osg::Texture2D* get_texture() {return m_texture.get();}
37 
38  static osg::ref_ptr<osg::State> sm_state;
39 
40 protected:
41 
42  osg::ref_ptr<osg::Texture2D> m_texture;
43  osg::ref_ptr<osg::Image> m_image;
44 };
45 
53 
osg::ref_ptr< osg::Texture2D > m_texture
Definition: diguyOsgGraphicsTexture.h:41
osg::ref_ptr< osg::Image > m_image
Definition: diguyOsgGraphicsTexture.h:42
virtual void unbuild()
This function will be called by DI-Guy when it is time for a renderer-specific texture object to be d...
Definition: diguyOsgGraphicsTexture.cpp:225
static osg::ref_ptr< osg::State > sm_state
Definition: diguyOsgGraphicsTexture.h:37
Definition: diguyOsgGraphicsTexture.h:22
diguyOsgGraphicsTexture(void *internal_data)
Definition: diguyOsgGraphicsTexture.cpp:25
virtual void build()
This function will be called by DI-Guy when it is time for a renderer-specific texture object to be c...
Definition: diguyOsgGraphicsTexture.cpp:55
A class that represents a shared texture.
Definition: diguyGraphicsTexture.h:122
diguyTextureMapType
This enumeration lists the type of texture map a given image file is being used as.
Definition: diguyGraphicsTexture.h:56
virtual void bind_now(diguyTextureMapType texture_type)
This function will be called by DI-Guy when the texture should be made active, or bound...
Definition: diguyOsgGraphicsTexture.cpp:190
osg::Texture2D * get_texture()
Definition: diguyOsgGraphicsTexture.h:35
diguyGraphicsTexture * diguyOsgGraphicsTexture_create_func(void *internal_data)
Create function declaration.
Definition: diguyOsgGraphicsTexture.cpp:246