Eulerian Smoke Simulation on the GPU
Texture1D Class Reference

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

#include <Texture1D.h>

Inheritance diagram for Texture1D:
Texture

List of all members.

Public Member Functions

 Texture1D (GLenum _target, int _width, 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, GLsizei _width, GLenum _format, GLenum _type, void *_data)
 Loads data to the texture.
bool writeFromPBO (GLint _mipLevel, GLint _xOffset, GLsizei _width, GLenum _format, GLenum _type, GLuint _pboHandle)
 Load data to the texture from a Point Buffer Object.
GLsizei getWidth () const
 Accessor for the texture's width.

Detailed Description

A class for creating 1D textures.

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

Constructor & Destructor Documentation

Texture1D::Texture1D ( GLenum  _target,
int  _width,
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_1D or GL_PROXY_TEXTURE_1D)
[in]_widththe texture's width
[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 Texture1D::write ( GLint  _mipLevel,
GLint  _xOffset,
GLsizei  _width,
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]_widththe width 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 Texture1D::writeFromPBO ( GLint  _mipLevel,
GLint  _xOffset,
GLsizei  _width,
GLenum  _format,
GLenum  _type,
GLuint  _pboHandle 
)

Load 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]_widththe width 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