From a9c08d76fb324137d4e673433809899286673c21 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 3 Nov 2019 14:19:37 +0100 Subject: [PATCH] fixed CAP_VERTEXBUFFER --- glhr.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/glhr.cpp b/glhr.cpp index 994b9d1b..d3419d80 100644 --- a/glhr.cpp +++ b/glhr.cpp @@ -678,11 +678,11 @@ EX void vertices(const vector& v, int vshift IS(0)) { if(&v[0] == current_vertices) return; current_vertices = buffered_vertices; glBindBuffer(GL_ARRAY_BUFFER, buf_buffered); - glVertexAttribPointer(glhr::aPosition, SHDIM, GL_FLOAT, GL_FALSE, sizeof(glvertex), 0); + glVertexAttribPointer(aPosition, SHDIM, GL_FLOAT, GL_FALSE, sizeof(glvertex), 0); return; } bindbuffer(v); - glVertexAttribPointer(glhr::aPosition, SHDIM, GL_FLOAT, GL_FALSE, sizeof(glvertex), 0); + glVertexAttribPointer(aPosition, SHDIM, GL_FLOAT, GL_FALSE, sizeof(glvertex), 0); #else if(current_vertices == &v[vshift]) return; current_vertices = &v[vshift]; @@ -714,8 +714,8 @@ EX void vertices_texture(const vector& v, const vector& t, i EX void prepare(vector& v) { #if CAP_VERTEXBUFFER bindbuffer(v); - PTR(glhr::aPosition, SHDIM, coords); - PTR(glhr::aColor, 4, color); + PTR(aPosition, SHDIM, coords); + PTR(aColor, 4, color); #else if(current_vertices == &v[0]) return; current_vertices = &v[0]; @@ -732,8 +732,8 @@ EX void prepare(vector& v) { EX void prepare(vector& v) { #if CAP_VERTEXBUFFER bindbuffer(v); - PTR(glhr::aPosition, SHDIM, coords); - PTR(glhr::aTexture, 2, texture); + PTR(aPosition, SHDIM, coords); + PTR(aTexture, 2, texture); #else if(current_vertices == &v[0]) return; current_vertices = &v[0]; @@ -751,9 +751,9 @@ EX void prepare(vector& v) { EX void prepare(vector& v) { #if CAP_VERTEXBUFFER bindbuffer(v); - PTR(glhr::aPosition, SHDIM, coords); - PTR(glhr::aColor, 4, color); - PTR(glhr::aTexture, 2, texture); + PTR(aPosition, SHDIM, coords); + PTR(aColor, 4, color); + PTR(aTexture, 2, texture); #else if(current_vertices == &v[0]) return; current_vertices = &v[0]; @@ -778,7 +778,7 @@ EX void store_in_buffer(vector& v) { printf("storing %d in buffer: %p\n", isize(v), &v[0]); current_vertices = buffered_vertices = &v[0]; glBindBuffer(GL_ARRAY_BUFFER, buf_buffered); - glVertexAttribPointer(glhr::aPosition, SHDIM, GL_FLOAT, GL_FALSE, sizeof(glvertex), 0); + glVertexAttribPointer(aPosition, SHDIM, GL_FLOAT, GL_FALSE, sizeof(glvertex), 0); glBufferData(GL_ARRAY_BUFFER, isize(v) * sizeof(glvertex), &v[0], GL_STATIC_DRAW); printf("Stored.\n"); #endif