DI-Guy SDK Documentation  13.8
diguyOsgGraphicsTextureArray.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
9 
10 #include <osg/Texture2DArray>
11 #include <osg/Image>
12 #include <osg/StateSet>
13 
14 
31 {
32 
33 public:
34 
35  diguyOsgGraphicsTextureArray(void* internal_data);
36 
38 
39  virtual void asynchronous_post_load() override;
40 
41  virtual void build() override;
42  virtual void unbuild() override;
43 
44  // needed for particle rendering
45  virtual void bind_now(diguyTextureMapType texture_type) override;
46 
47  osg::Texture2DArray* get_texture_array() { return m_texture_array.get(); }
48 
49  static osg::ref_ptr<osg::State> sm_state;
50 
51  void releaseGLObjects();
52 
53 protected:
54 
55  osg::ref_ptr<osg::Texture2DArray> m_texture_array;
56 };
57 
65 
virtual void asynchronous_post_load() override
This function will be called by DI-Guy after the texture is loaded but before build.
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.h:29
static osg::ref_ptr< osg::State > sm_state
Definition: diguyOsgGraphicsTextureArray.h:48
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...
A class that represents a shared 2D texture array.
Definition: diguyGraphicsTextureArray.h:40
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...
diguyTextureMapType
This enumeration lists the type of texture map a given image file is being used as.
Definition: diguyGraphicsTexture.h:55
diguyGraphicsTextureArray * diguyOsgGraphicsTextureArray_create_func(void *internal_data)
Create function declaration.
osg::ref_ptr< osg::Texture2DArray > m_texture_array
Definition: diguyOsgGraphicsTextureArray.h:54
osg::Texture2DArray * get_texture_array()
Definition: diguyOsgGraphicsTextureArray.h:46
diguyOsgGraphicsTextureArray(void *internal_data)