From bffe8d11bd1dfec49280fb64a17f0ae529ac3f5d Mon Sep 17 00:00:00 2001 From: xolatile Date: Sun, 17 Aug 2025 18:28:28 +0200 Subject: Compiles, removed a lot of code, do not run it... --- src/shared/glemu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/shared/glemu.cpp') diff --git a/src/shared/glemu.cpp b/src/shared/glemu.cpp index c728b9f..5a5b3df 100644 --- a/src/shared/glemu.cpp +++ b/src/shared/glemu.cpp @@ -69,7 +69,9 @@ namespace gle { if(offset >= MAXQUADS) return; count = MAXQUADS - offset; } - glDrawRangeElements_(GL_TRIANGLES, offset*4, (offset + count)*4-1, count*6, GL_UNSIGNED_SHORT, (ushort *)0 + offset*6); + //~glDrawRangeElements_(GL_TRIANGLES, offset*4, (offset + count)*4-1, count*6, GL_UNSIGNED_SHORT, (ushort*)0+offset*6); + glDrawRangeElements_(GL_TRIANGLES, offset*4, (offset + count)*4-1, count*6, GL_UNSIGNED_SHORT, (const void *)((unsigned long int) (offset*6))); // Fuck you... + //~glDrawRangeElements_(GL_TRIANGLES, offset*4, (offset + count)*4-1, count*6, GL_UNSIGNED_SHORT, (const void *)(offset*6)); } void defattrib(int type, int size, int format) { if(type == ATTRIB_VERTEX) { @@ -217,7 +219,8 @@ namespace gle { else glBufferSubData_(GL_ARRAY_BUFFER, vbooffset, attribbuf.length(), attribbuf.getbuf()); } else glUnmapBuffer_(GL_ARRAY_BUFFER); - buf = (uchar *)0 + vbooffset; + buf = (uchar*)((unsigned long int)vbooffset); /// Fucking piece of shit... + //~buf = (const void*)vbooffset; if(vertexsize == lastvertexsize && buf >= lastbuf) { start = int(buf - lastbuf)/vertexsize; if(primtype == GL_QUADS && (start%4 || start + attribbuf.length()/vertexsize >= 4*MAXQUADS)) -- cgit v1.2.3