Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F124366
GLVertexBuffer.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
GLVertexBuffer.h
View Options
#ifndef _ECHOGLVERTEXBUFFER_H_
#define _ECHOGLVERTEXBUFFER_H_
#include
<echo/Platforms/GL/GLSupport.h>
#include
<echo/Graphics/VertexBuffer.h>
namespace
Echo
{
/**
* GLVertexBuffer manages the Vertex Array Object and buffer objects for a VertexBuffer.
* One of these is mapped to each VertexBuffer that is used by a GLRenderTarget.
*/
class
GLVertexBuffer
{
public
:
GLVertexBuffer
(
const
VertexBuffer
&
vertexBuffer
);
~
GLVertexBuffer
();
/**
* Check the buffer version and update if required.
* Calling this method will cause the buffer to be bound if required.
* The buffer will not be unbound automatically.
*/
void
Update
(
const
VertexBuffer
&
vertexBuffer
);
/**
* Bind should be called when the buffer is going to be used.
* @note Bind does not need to be called to update the buffer. Binding and Unbinding is managed automatically for updates.
*/
void
Bind
();
/**
* Unbind the buffer as the current vertex buffer
*/
void
Unbind
();
/**
* Get the version of the buffer.
*/
Size
GetVersion
()
const
{
return
mVersion
;
}
/**
* Force a version change.
*/
inline
void
IncrementVersion
()
{
mVersion
++
;
}
private
:
Size
mVersion
;
bool
mIsReady
;
GLuint
mVertexArrayObject
;
GLuint
mVertexBuffer
;
Size
mAllocatedBufferSize
;
};
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Feb 25, 12:28 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72824
Default Alt Text
GLVertexBuffer.h (1 KB)
Attached To
Mode
rEE Echo 3
Attached
Detach File
Event Timeline
Log In to Comment