Eulerian Smoke Simulation on the GPU
Texture3D Class Reference

A class for creating 3D textures. More...

#include <Texture3D.h>

Inheritance diagram for Texture3D:
Texture

List of all members.

Public Member Functions

 Texture3D (GLenum _target, int _width, int _height, int _depth, GLint _internalFormat, GLenum _format, GLenum _dataType, GLenum _minFilter, GLenum _magFilter, GLenum _wrapMode, int _samplerIndex, GLint _mipLevel=0, void *_data=0)
 Constructor.
bool write (GLint _mipLevel, GLint _xOffset, GLint _yOffset, GLint _zOffset, GLsizei _width, GLsizei _height, GLsizei _depth, GLenum _format, GLenum _type, void *_data)
 Loads data to the texture.
bool writeFromPBO (GLint _mipLevel, GLint _xOffset, GLint _yOffset, GLint _zOffset, GLsizei _width, GLsizei _height, GLsizei _depth, GLenum _format, GLenum _type, GLuint _pboHandle)
 Loads data to the texture from a Point Buffer Object.
GLsizei getWidth () const
 Accessor for the texture's width.
GLsizei getHeight () const
 Accessor for the texture's height.
GLsizei getDepth () const
 Accessor for the texture's depth.

Detailed Description

A class for creating 3D textures.

Author:
Nikolaos Verigakis
Version:
1.0
Date:
14/07/11 Revision History : Initial Version 14/07/11

Constructor & Destructor Documentation

Texture3D::Texture3D ( GLenum  _target,
int  _width,
int  _height,
int  _depth,
GLint  _internalFormat,
GLenum  _format,
GLenum  _dataType,
GLenum  _minFilter,
GLenum  _magFilter,
GLenum  _wrapMode,
int  _samplerIndex,
GLint  _mipLevel = 0,
void *  _data = 0 
)

Constructor.

Parameters:
[in]_targetthe target texture (must be GL_TEXTURE_3D or GL_PROXY_TEXTURE_3D)
[in]_widththe texture's width
[in]_heightthe texture's height
[in]_depththe texture's depth
[in]_internalFormatthe number of colour components in the texture
[in]_formatthe format of the pixel data
[in]_dataTypethe data type of the pixel data
[in]_minFilterthe minification filter
[in]_magFilterthe magnification filter
[in]_wrapModethe texture wrapping mode
[in]_samplerIndexthe texture image unit to assign the texture sampler
[in]_mipLevelthe texture's mipmap level
[in]_dataa pointer to the texture data in memory

Member Function Documentation

bool Texture3D::write ( GLint  _mipLevel,
GLint  _xOffset,
GLint  _yOffset,
GLint  _zOffset,
GLsizei  _width,
GLsizei  _height,
GLsizei  _depth,
GLenum  _format,
GLenum  _type,
void *  _data 
)

Loads data to the texture.

Parameters:
[in]_mipLevelthe mipmap level of the texture sub-image
[in]_xOffseta texel offset in the x direction within the texture array
[in]_yOffseta texel offset in the y direction within the texture array
[in]_zOffseta texel offset in the z direction within the texture array
[in]_widththe width of the texture sub-image
[in]_heightthe height of the texture sub-image
[in]_depththe depth of the texture sub-image
[in]_formatthe format of the texture sub-image
[in]_typethe type of the texture sub-image
[in]_datathe data to load
bool Texture3D::writeFromPBO ( GLint  _mipLevel,
GLint  _xOffset,
GLint  _yOffset,
GLint  _zOffset,
GLsizei  _width,
GLsizei  _height,
GLsizei  _depth,
GLenum  _format,
GLenum  _type,
GLuint  _pboHandle 
)

Loads data to the texture from a Point Buffer Object.

Parameters:
[in]_mipLevelthe mipmap level of the texture sub-image
[in]_xOffseta texel offset in the x direction within the texture array
[in]_yOffseta texel offset in the y direction within the texture array
[in]_zOffseta texel offset in the z direction within the texture array
[in]_widththe width of the texture sub-image
[in]_heightthe height of the texture sub-image
[in]_depththe depth of the texture sub-image
[in]_formatthe format of the texture sub-image
[in]_typethe type of the texture sub-image
[in]_pboHandlethe PBO's handle

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables