00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _OPENGL_VERTEX_BUFFER_H_
00021 #define _OPENGL_VERTEX_BUFFER_H_
00022
00023 #include "Vector3.h"
00024 #include <boost\shared_array.hpp>
00025 #include <GL\glew.h>
00026 #include <boost\utility.hpp>
00027
00028 namespace TestFrameWork
00029 {
00030
00031
00032
00033
00034 struct Vertex
00035 {
00036 Vector3 m_position;
00037 Vector3 m_normal;
00038 };
00039
00040 typedef boost::shared_array<Vertex> Vertices;
00041
00042 class OpenglVertexBuffer :
00043 boost::noncopyable
00044 {
00045 public:
00046 OpenglVertexBuffer(Vertices vertices, size_t verticesCount);
00047
00048 ~OpenglVertexBuffer(void);
00049
00050 GLuint GetOpenglId(void) const;
00051
00052 private:
00053 GLuint m_id;
00054
00055 GLuint CreateBuffer(Vertices vertices, size_t verticesCount);
00056 };
00057
00058 typedef boost::shared_ptr<OpenglVertexBuffer> OpenglVertexBufferPtr;
00059 }
00060
00061 #endif