|
OpenPolygon
1.0.0
OpenPolygon is a Rendering Engine
|
The TextureManager class. More...
#include <texturemanager.h>
Public Member Functions | |
| void | finish (void) |
| TextureManager::finish. More... | |
| void | getPixelData (Texture *texture) |
| TextureManager::getTexImage. More... | |
| void | getPixelDepthData (Texture *texture) |
| Texture * | createTBOandBindVBO (uint vbo_id) |
| createTBOandBindVBO More... | |
| Texture * | createTextureArray (const std::string &texture_name, int width, int height, int size) |
| createTextureArray More... | |
| Texture * | createStorage (Texture *texture_array, GLint format) |
| TextureManager::createStorage. More... | |
| void | addTextureToArray (Texture *array, Texture *texture, int layer) |
| Texture * | createTexture (const std::string &resource_path) |
| createTexture More... | |
| Texture * | createTexture (Texture *texture, FIBITMAP *bitmap) |
| createTexture More... | |
| Texture * | createTexture (int width, int height, uchar *pixeldata) |
| createTexture More... | |
| Texture * | createFloatTexture (int width, int height, float *data) |
| createFloatTexture More... | |
| Texture * | addMatrixToTexture (Texture *float_texture, GLintptr offset, glm::mat4 matrix) |
| addMatrixToTexture More... | |
| Texture * | addVec4ToTexture (Texture *float_texture, GLintptr offset, glm::vec4 vector) |
| Texture * | addCharTextureToArray (Texture *array_texture, Texture *add_texture, int layer) |
| addCharTextureToArray More... | |
| Texture * | createCharTexture (int width, int height, int depth, uchar *pixeldata) |
| createCharTexture More... | |
| Texture * | createCubemapping (Textures six_textures, const std::string &texture_name) |
| createCubemapping More... | |
| Texture * | createFrameBufferTexture (int width, int height, GLint format, GLenum output_format) |
| TextureManager::createFrameBufferTexture. More... | |
| Texture * | createRenderBuffer (int render_width, int render_height, GLenum format) |
| TextureManager::createRenderBuffer. More... | |
| Texture * | createEmptyTexture (void) |
| createEmptyTexture More... | |
| bool | loadTexture (Texture *texture, bool mipmapping) |
| loadTexture More... | |
| bool | loadFloatTexture (Texture *texture) |
| bool | loadFloatTexture1D (Texture *texture) |
| void | destroy (Texture *texture) |
| destroy More... | |
| Texture * | getTexture (const std::string &texture_name) |
| getTexture More... | |
Static Public Member Functions | |
| static TextureManager * | getSingletonPtr (void) |
| getSingletonPtr More... | |
The TextureManager class.
Managemant of Textures
| Texture * TextureManager::addMatrixToTexture | ( | Texture * | float_texture, |
| GLintptr | offset, | ||
| glm::mat4 | matrix | ||
| ) |
addMatrixToTexture
Write Matrix Data into the Float Texture
| float_texture | |
| offset | |
| matrix |
| Texture * TextureManager::createCharTexture | ( | int | width, |
| int | height, | ||
| int | depth, | ||
| uchar * | pixeldata | ||
| ) |
createCharTexture
TextureManager::createCharTexture.
Create Char Texture for Font
| width | |
| height | |
| depth | |
| pixeldata |
Create a Character Texture by Fonts
| width | : Texture Width |
| height | : Texture Height |
| depth | : default(1) |
| pixeldata | : Character Pixel Data |
| Texture * TextureManager::createCubemapping | ( | Textures | six_textures, |
| const std::string & | texture_name | ||
| ) |
| Texture * TextureManager::createEmptyTexture | ( | void | ) |
| Texture * TextureManager::createFloatTexture | ( | int | width, |
| int | height, | ||
| float * | data | ||
| ) |
createFloatTexture
Create float Texture ( RGBA32F ) load with : loadFloatTexture( texture ) Methode
| width | |
| height | |
| data |
| Texture * TextureManager::createFrameBufferTexture | ( | int | texture_width, |
| int | texture_height, | ||
| GLint | format, | ||
| GLenum | output_format | ||
| ) |
TextureManager::createFrameBufferTexture.
Create FrameBuffer Texture
FrameBuffer Resolution Width FrameBuffer Resolution Height
Format:
-> diffuse format: GL_RGBA -> position format: GL_RGBA32F -> normals format: GL_RGBA16F -> depth format: GL_DEPTH_COMPONENT24
Output Format:
-> diffuse GL_BGRA -> position GL_BGRA -> normals GL_BGRA -> depth GL_DEPTH_COMPONENT
| texture_width | : Image Width |
| texture_height | : Image Height |
| format | : GL_RGBA , GL_RGBA32F , GL_RGBA16F , GL_DEPTH_COMPONENT24 |
| output_format | : GL_BGRA , GL_DEPTH_COMPONENT |
Create FrameBuffer Texture
FrameBuffer Width FrameBuffer Height
-> diffuse format: GL_RGBA -> position format: GL_RGBA32F -> normals format: GL_RGBA16F
| texture_width | |
| texture_height | |
| format | |
| output_format | : Default => GL_BGRA , Depth => GL_DEPTH_COMPONENT |
| Texture * TextureManager::createRenderBuffer | ( | int | render_width, |
| int | render_height, | ||
| GLenum | format | ||
| ) |
TextureManager::createRenderBuffer.
Create RenderBuffer for FrameBuffer (FBO)
-> diffuse format: GL_RGBA -> position format: GL_RGBA32F -> normals format: GL_RGBA16F -> depth format: GL_DEPTH_COMPONENT24
| render_width | |
| render_height |
TextureManager::createStorage.
Create Texture Array Storage
-> Texture Target: GL_TEXTURE_2D_ARRAY -> Output Format : GL_BGRA -> Output Type : GL_UNSIGNED_BYTE
| array_texture | : Texture Array |
| format | : GL_RGBA32f |
| Texture * TextureManager::createTBOandBindVBO | ( | uint | vbo_id | ) |
createTBOandBindVBO
TextureManager::createTBOandBindVBO.
Create Vertex Buffer Object and Bind with a VBO ( aka. Vertex Buffer )
| vbo_id |
Create Texture Buffer Object and Bind it with a VBO ( aka. Vertex Buffer )
| vbo_id |
| Texture * TextureManager::createTexture | ( | const std::string & | resource_path | ) |
createTexture
Create a Texture from FreeImage Bitmap
| texture | : empty texture ( with generated id ) |
| bitmap | : FreeImage Bitmap |
| Texture * TextureManager::createTexture | ( | int | width, |
| int | height, | ||
| uchar * | pixeldata | ||
| ) |
| Texture * TextureManager::createTextureArray | ( | const std::string & | texture_name, |
| int | width, | ||
| int | height, | ||
| int | size | ||
| ) |
| void TextureManager::destroy | ( | Texture * | texture | ) |
| void TextureManager::finish | ( | void | ) |
Destroy all. TextureManager & Textures
| void TextureManager::getPixelData | ( | Texture * | texture | ) |
TextureManager::getTexImage.
Read Pixel Data from Memory and write into Texture Container.
:: Return Pixel Data :: uchar * pixels = texture->getPixelData();
| texture |
|
static |
| Texture * TextureManager::getTexture | ( | const std::string & | texture_name | ) |
| bool TextureManager::loadTexture | ( | Texture * | texture, |
| bool | mipmapping | ||
| ) |
loadTexture
Load Texture into GPU Memory with or without mipmapping
| texture | |
| mipmapping |
1.8.10