DI-Guy SDK Documentation  13.7.1
diguyOsgGraphicsTextureArray.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <osg/Texture2DArray>
6 #include <osg/Image>
7 #include <osg/StateSet>
8 
9 
26 {
27 
28 public:
29 
30  diguyOsgGraphicsTextureArray(void* internal_data);
31 
33 
34  virtual void asynchronous_post_load() override;
35 
36  virtual void build() override;
37  virtual void unbuild() override;
38 
39  // needed for particle rendering
40  virtual void bind_now(diguyTextureMapType texture_type) override;
41 
42  osg::Texture2DArray* get_texture_array() { return m_texture_array.get(); }
43 
44  static osg::ref_ptr<osg::State> sm_state;
45 
46  void releaseGLObjects();
47 
48 protected:
49 
50  osg::ref_ptr<osg::Texture2DArray> m_texture_array;
51 };
52 
60 
Definition: diguyOsgGraphicsTextureArray.h:24
A class that represents a shared 2D texture array.
Definition: diguyGraphicsTextureArray.h:40
void releaseGLObjects()
Definition: diguyOsgGraphicsTextureArray.cpp:287
static osg::ref_ptr< osg::State > sm_state
Definition: diguyOsgGraphicsTextureArray.h:43
diguyTextureMapType
This enumeration lists the type of texture map a given image file is being used as.
Definition: diguyGraphicsTexture.h:55
osg::ref_ptr< osg::Texture2DArray > m_texture_array
Definition: diguyOsgGraphicsTextureArray.h:49
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: diguyOsgGraphicsTextureArray.cpp:189
virtual ~diguyOsgGraphicsTextureArray()
Definition: diguyOsgGraphicsTextureArray.cpp:34
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: diguyOsgGraphicsTextureArray.cpp:241
diguyGraphicsTextureArray * diguyOsgGraphicsTextureArray_create_func(void *internal_data)
Create function declaration.
Definition: diguyOsgGraphicsTextureArray.cpp:305
osg::Texture2DArray * get_texture_array()
Definition: diguyOsgGraphicsTextureArray.h:41
virtual void asynchronous_post_load() override
This function will be called by DI-Guy after the texture is loaded but before build.
Definition: diguyOsgGraphicsTextureArray.cpp:56
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: diguyOsgGraphicsTextureArray.cpp:276
diguyOsgGraphicsTextureArray(void *internal_data)
Definition: diguyOsgGraphicsTextureArray.cpp:26