DI-Guy SDK Documentation  13.6
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/Image>
7 #include <osg/StateSet>
8 
9 
25 {
26 
27 public:
28 
29  diguyOsgGraphicsTexture(void* internal_data);
30 
31  virtual ~diguyOsgGraphicsTexture();
32 
33  virtual void asynchronous_post_load() override;
34 
35  virtual void build() override;
36  virtual void unbuild() override;
37 
38  // needed for particle rendering
39  virtual void bind_now(diguyTextureMapType texture_type ) override;
40 
41  osg::Texture2D* get_texture() {return m_texture.get();}
42 
43  static osg::ref_ptr<osg::State> sm_state;
44 
45  void releaseGLObjects();
46 
47 protected:
48 
49  osg::ref_ptr<osg::Texture2D> m_texture;
50  osg::ref_ptr<osg::Image> m_image;
51 };
52 
60 
osg::ref_ptr< osg::Texture2D > m_texture
Definition: diguyOsgGraphicsTexture.h:48
osg::ref_ptr< osg::Image > m_image
Definition: diguyOsgGraphicsTexture.h:49
static osg::ref_ptr< osg::State > sm_state
Definition: diguyOsgGraphicsTexture.h:42
Definition: diguyOsgGraphicsTexture.h:23
diguyOsgGraphicsTexture(void *internal_data)
Definition: diguyOsgGraphicsTexture.cpp:25
A class that represents a shared texture.
Definition: diguyGraphicsTexture.h:124
virtual ~diguyOsgGraphicsTexture()
Definition: diguyOsgGraphicsTexture.cpp:33
virtual void bind_now(diguyTextureMapType texture_type) override
This function will be called by DI-Guy when the texture should be made active, or bound...
Definition: diguyOsgGraphicsTexture.cpp:219
void releaseGLObjects()
Definition: diguyOsgGraphicsTexture.cpp:265
diguyTextureMapType
This enumeration lists the type of texture map a given image file is being used as.
Definition: diguyGraphicsTexture.h:55
virtual void unbuild() override
This function will be called by DI-Guy when it is time for a renderer-specific texture object to be d...
Definition: diguyOsgGraphicsTexture.cpp:254
virtual void asynchronous_post_load() override
This function will be called by DI-Guy after the texture is loaded but before build.
Definition: diguyOsgGraphicsTexture.cpp:56
virtual void build() override
This function will be called by DI-Guy when it is time for a renderer-specific texture object to be c...
Definition: diguyOsgGraphicsTexture.cpp:172
osg::Texture2D * get_texture()
Definition: diguyOsgGraphicsTexture.h:40
diguyGraphicsTexture * diguyOsgGraphicsTexture_create_func(void *internal_data)
Create function declaration.
Definition: diguyOsgGraphicsTexture.cpp:283