|
Open CASCADE Technology 6.6.0
|
Texture resource.
#include <OpenGl_Texture.hxx>

Public Member Functions | |
| OpenGl_Texture (const Handle< Graphic3d_TextureParams > &theParams=NULL) | |
| Create uninitialized VBO. | |
| virtual | ~OpenGl_Texture () |
| Destroy object. | |
| bool | IsValid () const |
| GLenum | GetTarget () const |
| GLsizei | SizeX () const |
| GLsizei | SizeY () const |
| GLuint | TextureId () const |
| bool | Create (const Handle< OpenGl_Context > &theCtx) |
| Creates Texture id if not yet generated. Data should be initialized by another method. | |
| virtual void | Release (const OpenGl_Context *theCtx) |
| Destroy object - will release GPU memory if any. | |
| void | Bind (const Handle< OpenGl_Context > &theCtx, const GLenum theTextureUnit=GL_TEXTURE0) const |
| Bind this Texture to specified unit. | |
| void | Unbind (const Handle< OpenGl_Context > &theCtx, const GLenum theTextureUnit=GL_TEXTURE0) const |
| Unbind texture from specified unit. | |
| bool | Init (const Handle< OpenGl_Context > &theCtx, const Image_PixMap &theImage, const Graphic3d_TypeOfTexture theType) |
| Notice that texture will be unbound after this call. | |
| const Standard_Boolean | HasMipmaps () const |
| const Handle < Graphic3d_TextureParams > & | GetParams () const |
| void | SetParams (const Handle< Graphic3d_TextureParams > &theParams) |
Static Public Attributes | |
| static const GLuint | NO_TEXTURE = 0 |
| Helpful constants. | |
Protected Attributes | |
| GLuint | myTextureId |
| GL resource ID. | |
| GLenum | myTarget |
| GL_TEXTURE_1D/GL_TEXTURE_2D. | |
| GLsizei | mySizeX |
| texture width | |
| GLsizei | mySizeY |
| texture height | |
| GLint | myTextFormat |
| texture format - GL_RGB, GL_RGBA,... | |
| Standard_Boolean | myHasMipmaps |
| flag indicates that texture was uploaded with mipmaps | |
| Handle< Graphic3d_TextureParams > | myParams |
| texture parameters | |
| OpenGl_Texture::OpenGl_Texture | ( | const Handle< Graphic3d_TextureParams > & | theParams = NULL | ) |
| virtual OpenGl_Texture::~OpenGl_Texture | ( | ) | [virtual] |
| void OpenGl_Texture::Bind | ( | const Handle< OpenGl_Context > & | theCtx, |
| const GLenum | theTextureUnit = GL_TEXTURE0 |
||
| ) | const |
| bool OpenGl_Texture::Create | ( | const Handle< OpenGl_Context > & | theCtx | ) |
| const Handle< Graphic3d_TextureParams >& OpenGl_Texture::GetParams | ( | ) | const |
| GLenum OpenGl_Texture::GetTarget | ( | ) | const [inline] |
| const Standard_Boolean OpenGl_Texture::HasMipmaps | ( | ) | const |
| bool OpenGl_Texture::Init | ( | const Handle< OpenGl_Context > & | theCtx, |
| const Image_PixMap & | theImage, | ||
| const Graphic3d_TypeOfTexture | theType | ||
| ) |
| bool OpenGl_Texture::IsValid | ( | ) | const [inline] |
| virtual void OpenGl_Texture::Release | ( | const OpenGl_Context * | theCtx | ) | [virtual] |
Implements OpenGl_Resource.
| void OpenGl_Texture::SetParams | ( | const Handle< Graphic3d_TextureParams > & | theParams | ) |
| texture | parameters |
| GLsizei OpenGl_Texture::SizeX | ( | ) | const [inline] |
| GLsizei OpenGl_Texture::SizeY | ( | ) | const [inline] |
| GLuint OpenGl_Texture::TextureId | ( | ) | const [inline] |
| void OpenGl_Texture::Unbind | ( | const Handle< OpenGl_Context > & | theCtx, |
| const GLenum | theTextureUnit = GL_TEXTURE0 |
||
| ) | const |
Standard_Boolean OpenGl_Texture::myHasMipmaps [protected] |
Handle< Graphic3d_TextureParams > OpenGl_Texture::myParams [protected] |
GLsizei OpenGl_Texture::mySizeX [protected] |
GLsizei OpenGl_Texture::mySizeY [protected] |
GLenum OpenGl_Texture::myTarget [protected] |
GLint OpenGl_Texture::myTextFormat [protected] |
GLuint OpenGl_Texture::myTextureId [protected] |
const GLuint OpenGl_Texture::NO_TEXTURE = 0 [static] |
1.7.4