JeVois  1.21
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
jevois::GPUtexture Class Reference

#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
 

Constructor & Destructor Documentation

◆ GPUtexture()

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.

◆ ~GPUtexture()

jevois::GPUtexture::~GPUtexture ( )

Destructor, frees the texture in OpenGL.

Definition at line 56 of file GPUtexture.C.

Member Function Documentation

◆ getPixels()

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.

◆ setPixels()

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.

Member Data Documentation

◆ Format

GLenum const jevois::GPUtexture::Format

Definition at line 51 of file GPUtexture.H.

Referenced by GPUtexture().

◆ FramebufferId

GLuint jevois::GPUtexture::FramebufferId

Definition at line 53 of file GPUtexture.H.

Referenced by GPUtexture().

◆ Height

GLsizei const jevois::GPUtexture::Height

Definition at line 50 of file GPUtexture.H.

Referenced by GPUtexture().

◆ Id

GLuint jevois::GPUtexture::Id

Definition at line 52 of file GPUtexture.H.

Referenced by GPUtexture().

◆ RenderBufferId

GLuint jevois::GPUtexture::RenderBufferId

Definition at line 54 of file GPUtexture.H.

Referenced by GPUtexture().

◆ Width

GLsizei const jevois::GPUtexture::Width

Definition at line 49 of file GPUtexture.H.

Referenced by GPUtexture().


The documentation for this class was generated from the following files: