JeVois
1.21
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/GPU/GPUtexture.H>
Simple class to hold an OpenGL texture.
OpenGL textures are used to transfer image data from CPU to GPU and then allow the GPU to perform some processing on the data. Processing is typically done by using "shader" GPU programs that transform the texture's pixel data and render it, in some user-programmable way.
Definition at line 28 of file GPUtexture.H.
Public Member Functions | |
GPUtexture (GLsizei width, GLsizei height, GLenum format, bool createFramebuffer) | |
Constructor. | |
~GPUtexture () | |
Destructor, frees the texture in OpenGL. | |
void | setPixels (void const *data) |
Copy pixel data from memory location to the texture. | |
void | getPixels (void *data) const |
Copy pixel data from the texture to already-allocated memory location. | |
Public Attributes | |
GLsizei const | Width |
GLsizei const | Height |
GLenum const | Format |
GLuint | Id |
GLuint | FramebufferId |
GLuint | RenderBufferId |
jevois::GPUtexture::GPUtexture | ( | GLsizei | width, |
GLsizei | height, | ||
GLenum | format, | ||
bool | createFramebuffer | ||
) |
Constructor.
format should be as in glTexImage2D(), typically only GL_RGBA or GL_LUMINANCE are supported on embedded hardware platforms.
Definition at line 21 of file GPUtexture.C.
References Format, FramebufferId, GL_CHECK, Height, Id, LDEBUG, LERROR, RenderBufferId, and Width.
jevois::GPUtexture::~GPUtexture | ( | ) |
Destructor, frees the texture in OpenGL.
Definition at line 56 of file GPUtexture.C.
void jevois::GPUtexture::getPixels | ( | void * | data | ) | const |
Copy pixel data from the texture to already-allocated memory location.
data should have been allocated by caller and have the correct size given the textute width, height, and format.
Definition at line 87 of file GPUtexture.C.
References GL_CHECK.
void jevois::GPUtexture::setPixels | ( | void const * | data | ) |
Copy pixel data from memory location to the texture.
data should have been allocated by caller and have the correct size given the textute width, height, and format.
Definition at line 64 of file GPUtexture.C.
References GL_CHECK.
GLenum const jevois::GPUtexture::Format |
Definition at line 51 of file GPUtexture.H.
Referenced by GPUtexture().
GLuint jevois::GPUtexture::FramebufferId |
Definition at line 53 of file GPUtexture.H.
Referenced by GPUtexture().
GLsizei const jevois::GPUtexture::Height |
Definition at line 50 of file GPUtexture.H.
Referenced by GPUtexture().
GLuint jevois::GPUtexture::Id |
Definition at line 52 of file GPUtexture.H.
Referenced by GPUtexture().
GLuint jevois::GPUtexture::RenderBufferId |
Definition at line 54 of file GPUtexture.H.
Referenced by GPUtexture().
GLsizei const jevois::GPUtexture::Width |
Definition at line 49 of file GPUtexture.H.
Referenced by GPUtexture().