mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Add OpenGL support.
This commit is contained in:
parent
c354f59b72
commit
dd08fd2e7d
55 changed files with 2957 additions and 802 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#define _GFXGLPRIMITIVEBUFFER_H_
|
||||
|
||||
#include "gfx/gfxPrimitiveBuffer.h"
|
||||
#include "gfx/gl/util/glFrameAllocatorLockableHelper.h"
|
||||
|
||||
/// This is a primitive buffer (index buffer to GL users) which uses VBOs.
|
||||
class GFXGLPrimitiveBuffer : public GFXPrimitiveBuffer
|
||||
|
|
@ -32,8 +33,8 @@ public:
|
|||
GFXGLPrimitiveBuffer(GFXDevice *device, U32 indexCount, U32 primitiveCount, GFXBufferType bufferType);
|
||||
~GFXGLPrimitiveBuffer();
|
||||
|
||||
virtual void lock(U32 indexStart, U32 indexEnd, void **indexPtr); ///< calls glMapBuffer, offets pointer by indexStart
|
||||
virtual void unlock(); ///< calls glUnmapBuffer, unbinds the buffer
|
||||
virtual void lock(U32 indexStart, U32 indexEnd, void **indexPtr); ///< only write lock are supported
|
||||
virtual void unlock(); ///<
|
||||
virtual void prepare(); ///< binds the buffer
|
||||
virtual void finish(); ///< We're done with this buffer
|
||||
|
||||
|
|
@ -46,8 +47,12 @@ public:
|
|||
private:
|
||||
/// Handle to our GL buffer object
|
||||
GLuint mBuffer;
|
||||
|
||||
U32 mBufferOffset;
|
||||
U8* mZombieCache;
|
||||
|
||||
U32 lockedIndexEnd, lockedIndexStart;
|
||||
|
||||
FrameAllocatorLockableHelper mFrameAllocator;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue