|
|
| ComputeTexture (uint32_t width, uint32_t height, GLenum format=GL_RGBA32F) |
| |
| | ComputeTexture (const ComputeTexture ©) |
| | Copy constructor.
|
| |
|
void | BindTexture (bool force=false) |
| | Bind texture to OpenGL Generates and configures texture in GPU memory.
|
| |
| bool | AttachToFrameBuffer (uint32_t framebuffer, GLenum attachmentType=GL_COLOR_ATTACHMENT0) |
| | Attach to an OpenGL framebuffer Generates and configures texture in GPU memory.
|
| |
| void * | RetrieveData (GLenum format, size_t dataSize=sizeof(float), GLenum pixel=GL_FLOAT) const |
| | Retrieve pointer to the data from the texture.
|
| |
| | Texture (Resources::Resource file) |
| | Load texture from resource.
|
| |
| | Texture (const Texture ©) |
| | Copy constructor.
|
| |
| void | operator= (const Texture ©) |
| | Assignment operator.
|
| |
|
| ~Texture () |
| | Clean up texture resources.
|
| |
|
void | BindTexture (bool force=false) |
| | Bind texture to OpenGL Generates and configures texture in GPU memory.
|
| |
|
void | FreeTexture () |
| | Free texture from OpenGL Releases texture from GPU memory.
|
| |
| bool | IsBound () const |
| | Check if texture is bound to OpenGL.
|
| |
| GLuint | GetGLLocation () const |
| | Get OpenGL texture ID.
|
| |
| std::string | GetPath () const |
| | Get texture file path.
|
| |
|
|
const uint32_t | width |
| | Width of the texture.
|
| |
|
const uint32_t | height |
| | Height of the texture.
|
| |
|
const GLenum | format |
| | OpenGL image storage format.
|
| |
|
|
static const Texture | empty = Texture() |
| | Empty texture singleton.
|
| |
|
| Texture () |
| | Create empty texture.
|
| |
|
std::string | path |
| | Path to texture file.
|
| |
|
SDL_Surface * | surface |
| | SDL surface containing image data.
|
| |
|
GLuint | GLLocation |
| | OpenGL texture ID.
|
| |
|
bool | bound |
| | Whether texture is bound to OpenGL.
|
| |
◆ ComputeTexture()
| StevEngine::Visuals::ComputeTexture::ComputeTexture |
( |
const ComputeTexture & | copy | ) |
|
Copy constructor.
- Parameters
-
◆ AttachToFrameBuffer()
| bool StevEngine::Visuals::ComputeTexture::AttachToFrameBuffer |
( |
uint32_t | framebuffer, |
|
|
GLenum | attachmentType = GL_COLOR_ATTACHMENT0 ) |
Attach to an OpenGL framebuffer Generates and configures texture in GPU memory.
- Parameters
-
| framebuffer | OpenGL location of the framebuffer to attach to |
- Returns
- true if attachment was succesful, false if not
◆ RetrieveData()
| void * StevEngine::Visuals::ComputeTexture::RetrieveData |
( |
GLenum | format, |
|
|
size_t | dataSize = sizeof(float), |
|
|
GLenum | pixel = GL_FLOAT ) const |
Retrieve pointer to the data from the texture.
- Parameters
-
| format | OpenGL pixel format for the returned data ( |
- See also
- https://docs.gl/gl4/glGetTexImage
format parameter)
- Parameters
-
| dataSize | Size of the data for each pixel. For GL_RGB and GL_FLOAT it should be sizeof(float) * 3 |
| pixel | OpenGL pixel type for the returned data. ( |
- See also
- https://docs.gl/gl4/glGetTexImage
type parameter)
- Returns
- true if attachment was succesful, false if not
The documentation for this class was generated from the following files: