SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
Texture object for OpenGL texturing. More...
#include <SLGLTexture.h>
Public Member Functions | |
SLGLTexture () | |
Default ctor for all stack instances (not created with new) More... | |
SLGLTexture (SLAssetManager *assetMgr, const SLVCol4f &colors, SLint min_filter=GL_LINEAR, SLint mag_filter=GL_LINEAR, SLint wrapS=GL_REPEAT, const SLstring &name="2D-Texture") | |
ctor for 1D texture with internal image allocation More... | |
SLGLTexture (SLAssetManager *assetMgr, SLint min_filter, SLint mag_filter, SLint wrapS, SLint wrapT, SLenum target=GL_TEXTURE_2D) | |
ctor for empty 2D textures More... | |
SLGLTexture (SLAssetManager *assetMgr, unsigned char *data, int width, int height, int cvtype, SLint min_filter, SLint mag_filter, SLTextureType type, SLint wrapS, SLint wrapT) | |
ctor for 2D textures from byte pointer More... | |
SLGLTexture (SLAssetManager *assetMgr, const SLstring &imageFilename, SLint min_filter=GL_LINEAR_MIPMAP_LINEAR, SLint mag_filter=GL_LINEAR, SLTextureType type=TT_unknown, SLint wrapS=GL_REPEAT, SLint wrapT=GL_REPEAT) | |
ctor for 2D textures with internal image allocation More... | |
SLGLTexture (SLAssetManager *assetMgr, const SLVstring &imageFilenames, SLint min_filter=GL_LINEAR, SLint mag_filter=GL_LINEAR, SLint wrapS=GL_REPEAT, SLint wrapT=GL_REPEAT, const SLstring &name="3D-Texture", SLbool loadGrayscaleIntoAlpha=false) | |
ctor for 3D texture with internal image allocation More... | |
SLGLTexture (SLAssetManager *assetMgr, SLint depth, const SLstring &imageFilename, SLint min_filter=GL_LINEAR, SLint mag_filter=GL_LINEAR, SLint wrapS=GL_REPEAT, SLint wrapT=GL_REPEAT, const SLstring &name="3D-Texture", SLbool loadGrayscaleIntoAlpha=false) | |
ctor for 3D texture from a single file with depth as 3rd dimension More... | |
SLGLTexture (SLAssetManager *assetMgr, const SLstring &imageFilenameXPos, const SLstring &imageFilenameXNeg, const SLstring &imageFilenameYPos, const SLstring &imageFilenameYNeg, const SLstring &imageFilenameZPos, const SLstring &imageFilenameZNeg, SLint min_filter=GL_LINEAR, SLint mag_filter=GL_LINEAR, SLTextureType type=TT_unknown) | |
ctor for cube mapping with internal image allocation More... | |
~SLGLTexture () override | |
virtual void | build (SLint texUnit) |
void | deleteData (SLbool deleteAlsoOnGPU) |
Delete all data (CVImages and GPU textures) More... | |
void | deleteDataGpu () |
Deletes the OpenGL texture objects and releases the memory on the GPU. More... | |
void | deleteImages () |
Deletes the CVImages in _images. No more texture mapping in ray tracing. More... | |
void | bindActive (SLuint texUnit=0) |
void | fullUpdate () |
void | drawSprite (SLbool doUpdate, SLfloat x, SLfloat y, SLfloat w, SLfloat h) |
Draws the texture as 2D sprite with OpenGL buffers. More... | |
void | cubeUV2XYZ (SLint index, SLfloat u, SLfloat v, SLfloat &x, SLfloat &y, SLfloat &z) |
Computes the unnormalised vector x,y,z from tex. coords. uv with cubemap index. More... | |
void | cubeXYZ2UV (SLfloat x, SLfloat y, SLfloat z, SLint &index, SLfloat &u, SLfloat &v) |
Computes the uv and cubemap image index from a unnormalised vector x,y,z. More... | |
SLstring | filterString (SLint glFilter) |
Returns OpenGL texture filter as string. More... | |
void | texType (SLTextureType bt) |
void | uvIndex (SLbyte i) |
void | bumpScale (SLfloat bs) |
void | minFiler (SLint minF) |
void | magFiler (SLint magF) |
void | needsUpdate (SLbool update) |
void | textureSize (int width, int height) |
void | deleteImageAfterBuild (SLbool delImg) |
If deleteImageAfterBuild is set to true you won't be able to ray trace the scene. More... | |
SLuint | width () |
SLuint | height () |
SLuint | depth () |
SLbyte | uvIndex () |
SLint | bytesPerPixel () |
SLint | bytesOnGPU () |
SLint | bytesInFile () |
CVVImage & | images () |
SLenum | target () const |
SLuint | texID () const |
SLTextureType | texType () |
SLfloat | bumpScale () const |
SLCol4f | getTexelf (SLfloat u, SLfloat v, SLuint imgIndex=0) |
SLGLTexture::getTexelf returns a pixel color from u & v texture coordinates. More... | |
SLCol4f | getTexelf (const SLVec3f &cubemapDir) |
SLGLTexture::getTexelf returns a pixel color at the specified cubemap direction. More... | |
SLbool | hasAlpha () |
SLMat4f | tm () |
SLbool | autoCalcTM3D () const |
SLbool | needsUpdate () |
SLstring | typeName () |
Returns the texture type as string. More... | |
SLstring | typeShortName () |
Returns the texture type short. More... | |
bool | isTexture () |
SLstring | minificationFilterName () |
SLstring | magnificationFilterName () |
void | build2DMipmaps (SLint target, SLuint index) |
SLbool | copyVideoImage (SLint camWidth, SLint camHeight, CVPixelFormatGL glFormat, SLuchar *data, SLbool isContinuous, SLbool isTopLeft) |
Copies the image data from a video camera into the current video image. More... | |
SLbool | copyVideoImage (SLint camWidth, SLint camHeight, CVPixelFormatGL srcFormat, CVPixelFormatGL dstFormat, SLuchar *data, SLbool isContinuous, SLbool isTopLeft) |
void | calc3DGradients (SLint sampleRadius, const function< void(int)> &onUpdateProgress=nullptr) |
void | smooth3DGradients (SLint smoothRadius, function< void(int)> onUpdateProgress=nullptr) |
SLVec2f | dudv (SLfloat u, SLfloat v) |
Public Member Functions inherited from SLObject | |
SLObject (const SLstring &Name="", const SLstring &url="") | |
virtual | ~SLObject () |
void | name (const SLstring &Name) |
void | url (const SLstring &url) |
const SLstring & | name () const |
const SLstring & | url () const |
Static Public Member Functions | |
static SLTextureType | detectType (const SLstring &filename) |
Detects the texture type from the filename appendix (See SLTexType def.) More... | |
static string | internalFormatStr (int internalFormat) |
Returns the internal pixel format from OpenGL. More... | |
Static Public Attributes | |
static SLfloat | maxAnisotropy = -1.0f |
Returns the derivation as [s,t]. More... | |
static SLuint | totalNumBytesOnGPU = 0 |
Total NO. of bytes used for textures on GPU. More... | |
Protected Member Functions | |
void | load (const SLstring &filename, SLbool flipVertical=true, SLbool loadGrayscaleIntoAlpha=false) |
Loads the texture, converts color depth & applies vertical mirroring. More... | |
void | load (const SLVCol4f &colors) |
Loads the 1D color data into an image of height 1. More... | |
Protected Attributes | |
CVVImage | _images |
Vector of CVImage pointers. More... | |
SLuint | _texID |
OpenGL texture ID. More... | |
SLTextureType | _texType |
See SLTextureType. More... | |
SLint | _width |
Texture image width in pixels (images exist either in _images or on the GPU or on both) More... | |
SLint | _height |
Texture image height in pixels (images exist either in _images or on the GPU or on both) More... | |
SLint | _depth |
3D Texture image depth (images exist either in _images or on the GPU or on both) More... | |
SLbyte | _uvIndex |
Texture coordinate index in SLMesh (0 = default) More... | |
SLint | _internalFormat |
Internal OpenGL format. More... | |
SLint | _bytesPerPixel |
Bytes per texture image pixel (images exist either in _images or on the GPU or on both) More... | |
SLint | _min_filter |
Minification filter. More... | |
SLint | _mag_filter |
Magnification filter. More... | |
SLint | _wrap_s |
Wrapping in s direction. More... | |
SLint | _wrap_t |
Wrapping in t direction. More... | |
SLenum | _target |
texture target More... | |
SLMat4f | _tm |
texture matrix More... | |
SLuint | _bytesOnGPU |
NO. of bytes on GPU. More... | |
SLuint | _bytesInFile |
NO. of bytes in file. More... | |
SLbool | _autoCalcTM3D |
Flag if texture matrix should be calculated from AABB for 3D mapping. More... | |
SLfloat | _bumpScale |
Bump mapping scale factor. More... | |
SLbool | _resizeToPow2 |
Flag if image should be resized to n^2. More... | |
SLGLVertexArray | _vaoSprite |
Vertex array object for sprite rendering. More... | |
std::atomic< bool > | _needsUpdate {} |
Flag if image needs an single update. More... | |
std::mutex | _mutex |
Mutex to protect parallel access (used in ray tracing) More... | |
SLbool | _deleteImageAfterBuild |
Flag if images should be deleted after build on GPU. More... | |
SLbool | _compressedTexture = false |
True for compressed texture format on GPU. More... | |
Protected Attributes inherited from SLObject | |
SLstring | _name |
name of an object More... | |
SLstring | _url |
uniform resource locator More... | |
Texture object for OpenGL texturing.
The SLGLTexture class implements an OpenGL texture object that can be used by the SLMaterial class. A texture can have 1-n CVImages in the vector _images. A simple 2D texture has just a single texture image (_images[0]). For cube maps you will need 6 images (_images[0-5]). For 3D textures you can have as much images of the same size than your GPU and/or CPU memory can hold. The images are not released after the OpenGL texture creation unless you set the flag _deleteImageAfterBuild to true. If the images get deleted after build, you won't be able to ray trace the scene.
Definition at line 109 of file SLGLTexture.h.
SLGLTexture::SLGLTexture | ( | ) |
Default ctor for all stack instances (not created with new)
Default ctor for all stack instances such as the video textures in SLScene or the textures inherited by SLRaytracer. All other constructors add the this pointer to the SLScene::_texture vector for global deallocation.
Definition at line 37 of file SLGLTexture.cpp.
|
explicit |
ctor for 1D texture with internal image allocation
Constructor for 1D texture from a color vector. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
colors | Vector of colors |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
wrapS | Texture wrapping in S direction (OpenGL constant) |
name | Name of the 1D texture |
Definition at line 392 of file SLGLTexture.cpp.
|
explicit |
ctor for empty 2D textures
Constructor for empty 2D textures. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
wrapS | Texture wrapping in S direction (OpenGL constant) |
wrapT | Texture wrapping in T direction (OpenGL constant) |
target | Texture target GL_TEXTURE_1D, 2D, 3D |
Definition at line 79 of file SLGLTexture.cpp.
|
explicit |
ctor for 2D textures from byte pointer
Constructor for 2D texture with a passed image data pointer. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
data | Data pointer to the first top-left pixel |
width | Width of the image in pixels |
height | Height of the image in pixels |
cvtype | OpenCV image type |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
type | Type of the texture |
wrapS | Texture wrapping in S direction (OpenGL constant) |
wrapT | Texture wrapping in T direction (OpenGL constant) |
Definition at line 129 of file SLGLTexture.cpp.
|
explicit |
ctor for 2D textures with internal image allocation
Constructor for 2D textures from image file with internal image allocation. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
filename | Name of the texture image file. If only a filename is passed it will be search on the SLGLTexture::defaultPath. |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
type | Type of the texture |
wrapS | Texture wrapping in S direction (OpenGL constant) |
wrapT | Texture wrapping in T direction (OpenGL constant) |
Definition at line 186 of file SLGLTexture.cpp.
|
explicit |
ctor for 3D texture with internal image allocation
Constructor for 3D textures from image files with internal image allocation. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
files | Vector of texture image files. If only filenames are passed they will be searched on the SLGLTexture::defaultPath. |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
wrapS | Texture wrapping in S direction (OpenGL constant) |
wrapT | Texture wrapping in T direction (OpenGL constant) |
name | Name of the 3D texture |
loadGrayscaleIntoAlpha | Flag if grayscale image should be loaded into alpha channel. |
Definition at line 262 of file SLGLTexture.cpp.
|
explicit |
ctor for 3D texture from a single file with depth as 3rd dimension
Constructor for 3D textures from single image file that is stacked depth times. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
depth | Depth of 3D texture. |
filename | texture image file. If only filenames are passed they will be searched on the SLGLTexture::defaultPath. |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
wrapS | Texture wrapping in S direction (OpenGL constant) |
wrapT | Texture wrapping in T direction (OpenGL constant) |
name | Name of the 3D texture |
loadGrayscaleIntoAlpha | Flag if grayscale image should be loaded into alpha channel. |
Definition at line 329 of file SLGLTexture.cpp.
SLGLTexture::SLGLTexture | ( | SLAssetManager * | assetMgr, |
const SLstring & | filenameXPos, | ||
const SLstring & | filenameXNeg, | ||
const SLstring & | filenameYPos, | ||
const SLstring & | filenameYNeg, | ||
const SLstring & | filenameZPos, | ||
const SLstring & | filenameZNeg, | ||
SLint | min_filter = GL_LINEAR , |
||
SLint | mag_filter = GL_LINEAR , |
||
SLTextureType | type = TT_unknown |
||
) |
ctor for cube mapping with internal image allocation
Constructor for a cubemap texture from 6 image files. Textures can be used in multiple materials. Textures can belong therefore to the global assets such as meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram).
assetMgr | Pointer to a global asset manager. If passed the asset manager is the owner of the instance and will do the deallocation. If a nullptr is passed the creator is responsible for the deallocation. |
filenameXPos | Filename of the cubemap image in the pos. X direction. |
filenameXNeg | Filename of the cubemap image in the neg. X direction. |
filenameYPos | Filename of the cubemap image in the pos. Y direction. |
filenameYNeg | Filename of the cubemap image in the neg. Y direction. |
filenameZPos | Filename of the cubemap image in the pos. Z direction. |
filenameZNeg | Filename of the cubemap image in the neg. Z direction. |
min_filter | Minification filter constant from OpenGL |
mag_filter | Magnification filter constant from OpenGL |
type | Texture Type |
Definition at line 458 of file SLGLTexture.cpp.
|
override |
The destructor should be called by the owner of the texture. If an asset manager was passed in the constructor it will do it after scene destruction. The destructor deletes all images in the RAM as well as the texture objects on the GPU.
Definition at line 521 of file SLGLTexture.cpp.
|
inline |
Definition at line 237 of file SLGLTexture.h.
SLGLTexture::bindActive binds the active texture. This method must be called by the object that uses the texture every time BEFORE the its rendering. The texUnit is only used for multi texturing. Before the first time the texture is passed to OpenGL.
Definition at line 1186 of file SLGLTexture.cpp.
Builds an OpenGL texture object with the according OpenGL commands. This texture creation must be done only once when a valid OpenGL rendering context is present. This function is called the first time within the enable method which is called by object that uses the texture.
Reimplemented in SLGLTextureIBL.
Definition at line 797 of file SLGLTexture.cpp.
Definition at line 1475 of file SLGLTexture.cpp.
|
inline |
Definition at line 229 of file SLGLTexture.h.
Definition at line 202 of file SLGLTexture.h.
|
inline |
Definition at line 224 of file SLGLTexture.h.
|
inline |
Definition at line 223 of file SLGLTexture.h.
|
inline |
Definition at line 222 of file SLGLTexture.h.
void SLGLTexture::calc3DGradients | ( | SLint | sampleRadius, |
const function< void(int)> & | onUpdateProgress = nullptr |
||
) |
SLGLTexture::calc3DGradients calculates the normals based on the 3D gradient of all images and stores them in the RGB components.
sampleRadius | Distance from center to calculate the gradient |
onUpdateProgress | Callback function for progress display |
Definition at line 1599 of file SLGLTexture.cpp.
SLbool SLGLTexture::copyVideoImage | ( | SLint | camWidth, |
SLint | camHeight, | ||
CVPixelFormatGL | srcFormat, | ||
SLuchar * | data, | ||
SLbool | isContinuous, | ||
SLbool | isTopLeft | ||
) |
Copies the image data from a video camera into the current video image.
camWidth | Width in pixels of the camera image |
camHeight | Height in pixels of the camera image |
srcFormat | Pixel format according to the OpenGL pixel formats |
data | Pointer to the first byte of the first pixel |
isContinuous | Flag if the next line comes after the last byte of the prev. line |
isTopLeft | Flag if the data pointer points to the top left pixel |
Definition at line 700 of file SLGLTexture.cpp.
SLbool SLGLTexture::copyVideoImage | ( | SLint | camWidth, |
SLint | camHeight, | ||
CVPixelFormatGL | srcFormat, | ||
CVPixelFormatGL | dstFormat, | ||
SLuchar * | data, | ||
SLbool | isContinuous, | ||
SLbool | isTopLeft | ||
) |
Definition at line 746 of file SLGLTexture.cpp.
void SLGLTexture::cubeUV2XYZ | ( | SLint | index, |
SLfloat | u, | ||
SLfloat | v, | ||
SLfloat & | x, | ||
SLfloat & | y, | ||
SLfloat & | z | ||
) |
Computes the unnormalised vector x,y,z from tex. coords. uv with cubemap index.
A cube texture indexes six texture maps from 0 to 5 in order Positive X, Negative X, Positive Y, Negative Y, Positive Z, Negative Z. The images are stored with the origin at the lower left of the image. The Positive X and Y faces must reverse the Z coordinate and the Negative Z face must negate the X coordinate. If given the face, and texture coordinates (u,v), the unnormalized vector (x,y,z) are computed. Source:
https://en.wikipedia.org/wiki/Cube_mapping
Definition at line 1738 of file SLGLTexture.cpp.
void SLGLTexture::cubeXYZ2UV | ( | SLfloat | x, |
SLfloat | y, | ||
SLfloat | z, | ||
SLint & | index, | ||
SLfloat & | u, | ||
SLfloat & | v | ||
) |
Computes the uv and cubemap image index from a unnormalised vector x,y,z.
See also SLGLTexture::cubeUV2XYZ. Source:
https://en.wikipedia.org/wiki/Cube_mapping
Definition at line 1793 of file SLGLTexture.cpp.
Delete all data (CVImages and GPU textures)
Definition at line 528 of file SLGLTexture.cpp.
void SLGLTexture::deleteDataGpu | ( | ) |
Deletes the OpenGL texture objects and releases the memory on the GPU.
Call this function only from the main thread where OpenGL calls are allowed
Definition at line 564 of file SLGLTexture.cpp.
If deleteImageAfterBuild is set to true you won't be able to ray trace the scene.
Definition at line 215 of file SLGLTexture.h.
void SLGLTexture::deleteImages | ( | ) |
Deletes the CVImages in _images. No more texture mapping in ray tracing.
Definition at line 551 of file SLGLTexture.cpp.
|
inline |
Definition at line 220 of file SLGLTexture.h.
|
static |
Detects the texture type from the filename appendix (See SLTexType def.)
Definition at line 1395 of file SLGLTexture.cpp.
Draws the texture as 2D sprite with OpenGL buffers.
Draws the texture as a flat 2D sprite with a height and a width on two triangles with zero in the bottom left corner:
w +--—+ | /| | / | h | / | | / | |/ | 0 +--—+ 0
Definition at line 1275 of file SLGLTexture.cpp.
dudv calculates the partial derivation (gray value slope) at u,v for bump mapping either from a height map or a normal map
Definition at line 1374 of file SLGLTexture.cpp.
void SLGLTexture::fullUpdate | ( | ) |
Fully updates the OpenGL internal texture data by the image data
Definition at line 1227 of file SLGLTexture.cpp.
SLGLTexture::getTexelf returns a pixel color at the specified cubemap direction.
Definition at line 1356 of file SLGLTexture.cpp.
SLGLTexture::getTexelf returns a pixel color from u & v texture coordinates.
If the OpenGL filtering is set to GL_LINEAR a bilinear interpolated color out of four neighboring pixels is return. Otherwise the nearest pixel is returned.
Definition at line 1325 of file SLGLTexture.cpp.
|
inline |
|
inline |
Definition at line 219 of file SLGLTexture.h.
|
inline |
Definition at line 225 of file SLGLTexture.h.
|
static |
Returns the internal pixel format from OpenGL.
Taken from https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml
Definition at line 1948 of file SLGLTexture.cpp.
|
inline |
Definition at line 241 of file SLGLTexture.h.
|
protected |
Loads the texture, converts color depth & applies vertical mirroring.
Definition at line 582 of file SLGLTexture.cpp.
Definition at line 204 of file SLGLTexture.h.
|
inline |
Definition at line 243 of file SLGLTexture.h.
Definition at line 203 of file SLGLTexture.h.
|
inline |
Definition at line 242 of file SLGLTexture.h.
|
inline |
Definition at line 238 of file SLGLTexture.h.
Definition at line 205 of file SLGLTexture.h.
void SLGLTexture::smooth3DGradients | ( | SLint | smoothRadius, |
function< void(int)> | onUpdateProgress = nullptr |
||
) |
SLGLTexture::smooth3DGradients smooths the 3D gradients in the RGB channels of all images.
smoothRadius | Soothing radius |
onUpdateProgress | Callback function for progress display |
Definition at line 1667 of file SLGLTexture.cpp.
|
inline |
Definition at line 226 of file SLGLTexture.h.
|
inline |
Definition at line 227 of file SLGLTexture.h.
|
inline |
|
inline |
Definition at line 228 of file SLGLTexture.h.
|
inline |
Definition at line 200 of file SLGLTexture.h.
|
inline |
Definition at line 236 of file SLGLTexture.h.
SLstring SLGLTexture::typeName | ( | ) |
SLstring SLGLTexture::typeShortName | ( | ) |
|
inline |
Definition at line 221 of file SLGLTexture.h.
Definition at line 201 of file SLGLTexture.h.
|
inline |
Definition at line 218 of file SLGLTexture.h.
|
protected |
Flag if texture matrix should be calculated from AABB for 3D mapping.
Definition at line 319 of file SLGLTexture.h.
|
protected |
Bump mapping scale factor.
Definition at line 320 of file SLGLTexture.h.
|
protected |
NO. of bytes in file.
Definition at line 318 of file SLGLTexture.h.
|
protected |
NO. of bytes on GPU.
Definition at line 317 of file SLGLTexture.h.
|
protected |
Bytes per texture image pixel (images exist either in _images or on the GPU or on both)
Definition at line 310 of file SLGLTexture.h.
|
protected |
True for compressed texture format on GPU.
Definition at line 327 of file SLGLTexture.h.
|
protected |
Flag if images should be deleted after build on GPU.
Definition at line 326 of file SLGLTexture.h.
|
protected |
3D Texture image depth (images exist either in _images or on the GPU or on both)
Definition at line 307 of file SLGLTexture.h.
|
protected |
Texture image height in pixels (images exist either in _images or on the GPU or on both)
Definition at line 306 of file SLGLTexture.h.
|
protected |
Vector of CVImage pointers.
Definition at line 302 of file SLGLTexture.h.
|
protected |
Internal OpenGL format.
Definition at line 309 of file SLGLTexture.h.
|
protected |
Magnification filter.
Definition at line 312 of file SLGLTexture.h.
|
protected |
Minification filter.
Definition at line 311 of file SLGLTexture.h.
|
protected |
Mutex to protect parallel access (used in ray tracing)
Definition at line 324 of file SLGLTexture.h.
|
protected |
Flag if image needs an single update.
Definition at line 323 of file SLGLTexture.h.
|
protected |
Flag if image should be resized to n^2.
Definition at line 321 of file SLGLTexture.h.
|
protected |
texture target
Definition at line 315 of file SLGLTexture.h.
|
protected |
OpenGL texture ID.
Definition at line 303 of file SLGLTexture.h.
|
protected |
See SLTextureType.
Definition at line 304 of file SLGLTexture.h.
|
protected |
texture matrix
Definition at line 316 of file SLGLTexture.h.
|
protected |
Texture coordinate index in SLMesh (0 = default)
Definition at line 308 of file SLGLTexture.h.
|
protected |
Vertex array object for sprite rendering.
Definition at line 322 of file SLGLTexture.h.
|
protected |
Texture image width in pixels (images exist either in _images or on the GPU or on both)
Definition at line 305 of file SLGLTexture.h.
|
protected |
Wrapping in s direction.
Definition at line 313 of file SLGLTexture.h.
|
protected |
Wrapping in t direction.
Definition at line 314 of file SLGLTexture.h.
|
static |
Returns the derivation as [s,t].
maxAnisotropy=-1 show that GL_EXT_texture_filter_anisotropic is not checked
max. anisotropy available
Definition at line 292 of file SLGLTexture.h.
|
static |
Total NO. of bytes used for textures on GPU.
NO. of texture byte allocated on GPU.
Definition at line 293 of file SLGLTexture.h.