Eulerian Smoke Simulation on the GPU
include/BufferObject.h
Go to the documentation of this file.
00001 #ifndef __BUFFER_OBJECT_H__
00002 #define __BUFFER_OBJECT_H__
00003 
00004 //---------------------------------------------------------------------
00007 //---------------------------------------------------------------------
00008 
00009 #include "GLUtil.h"
00010 
00018 class BufferObject
00019 {
00020 public:
00022   BufferObject();
00023 
00025   ~BufferObject();
00026 
00028   inline GLuint getHandle() const {return m_handle;}
00030   inline GLenum getTarget() const {return m_target;}
00031 
00034   void bind(
00035             GLenum _target
00036            );
00038   void unbind();
00039 
00044   void loadData(
00045                 GLsizeiptr    _dataSize,
00046                 const GLvoid* _data,
00047                 GLenum        _bufferUsage
00048                );
00049 
00054   void updateSubData(
00055                       GLintptr      _dataOffest,
00056                       GLsizeiptr    _dataSize,
00057                       const GLvoid* _data
00058                     );
00059 
00063   void getParameter(
00064                     GLenum _value,
00065                     GLint* _data
00066                    );
00067 
00068 private:
00070   GLuint m_handle;
00072   GLenum m_target;
00073 };
00074 
00075 #endif // __BUFFER_OBJECT_H__
 All Classes Files Functions Variables