Eulerian Smoke Simulation on the GPU
include/Texture3D.h
Go to the documentation of this file.
00001 #ifndef __TEXTURE_3D_H__
00002 #define __TEXTURE_3D_H__
00003 
00004 //---------------------------------------------------------------------
00007 //---------------------------------------------------------------------
00008 
00009 #include "Texture.h"
00010 
00018 class Texture3D : public Texture
00019 {
00020 public:
00035   Texture3D(
00036             GLenum _target,
00037             int    _width,
00038             int    _height,
00039             int    _depth,
00040             GLint  _internalFormat,
00041             GLenum _format,
00042             GLenum _dataType,
00043             GLenum _minFilter,
00044             GLenum _magFilter,
00045             GLenum _wrapMode,
00046             int    _samplerIndex,
00047             GLint  _mipLevel = 0,
00048             void*  _data = 0
00049            );
00050 
00062   bool write(
00063               GLint   _mipLevel,
00064               GLint   _xOffset,
00065               GLint   _yOffset,
00066               GLint   _zOffset,
00067               GLsizei _width,
00068               GLsizei _height,
00069               GLsizei _depth,
00070               GLenum  _format,
00071               GLenum  _type,
00072               void*   _data
00073             );
00074 
00086   bool writeFromPBO(
00087                     GLint   _mipLevel,
00088                     GLint   _xOffset,
00089                     GLint   _yOffset,
00090                     GLint   _zOffset,
00091                     GLsizei _width,
00092                     GLsizei _height,
00093                     GLsizei _depth,
00094                     GLenum  _format,
00095                     GLenum  _type,
00096                     GLuint  _pboHandle
00097                    );
00098 
00100   inline GLsizei getWidth()  const {return m_width;}
00102   inline GLsizei getHeight() const {return m_height;}
00104   inline GLsizei getDepth()  const {return m_depth;}
00105 
00106 private:
00108   GLsizei m_width;
00110   GLsizei m_height;
00112   GLsizei m_depth;
00113 };
00114 
00115 #endif // __TEXTURE_3D_H__
 All Classes Files Functions Variables