mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
OpenGL: encapsulate VBOs into a class
internal only for now but this will be handy
This commit is contained in:
parent
b087e2554f
commit
bb550158fc
6 changed files with 147 additions and 58 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "SIrrCreationParameters.h"
|
||||
#include "Common.h"
|
||||
#include "VBO.h"
|
||||
#include "CNullDriver.h"
|
||||
#include "IMaterialRendererServices.h"
|
||||
#include "EDriverFeatures.h"
|
||||
|
@ -49,8 +50,7 @@ public:
|
|||
SHWBufferLink_opengl(const scene::IVertexBuffer *vb) : SHWBufferLink(vb) {}
|
||||
SHWBufferLink_opengl(const scene::IIndexBuffer *ib) : SHWBufferLink(ib) {}
|
||||
|
||||
GLuint vbo_ID = 0;
|
||||
u32 vbo_Size = 0;
|
||||
OpenGLVBO Vbo;
|
||||
};
|
||||
|
||||
bool updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer);
|
||||
|
@ -300,7 +300,7 @@ protected:
|
|||
LockRenderStateMode = false;
|
||||
}
|
||||
|
||||
bool updateHardwareBuffer(SHWBufferLink_opengl *b, const void *buffer, size_t bufferSize, scene::E_HARDWARE_MAPPING hint);
|
||||
bool uploadHardwareBuffer(OpenGLVBO &vbo, const void *buffer, size_t bufferSize, scene::E_HARDWARE_MAPPING hint);
|
||||
|
||||
void createMaterialRenderers();
|
||||
|
||||
|
@ -372,9 +372,8 @@ private:
|
|||
|
||||
bool EnableErrorTest;
|
||||
|
||||
unsigned QuadIndexCount;
|
||||
GLuint QuadIndexBuffer = 0;
|
||||
void initQuadsIndices(int max_vertex_count = 65536);
|
||||
OpenGLVBO QuadIndexVBO;
|
||||
void initQuadsIndices(u32 max_vertex_count = 65536);
|
||||
|
||||
void debugCb(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message);
|
||||
static void APIENTRY debugCb(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue