summaryrefslogtreecommitdiff
path: root/src/shared/glemu.cpp
diff options
context:
space:
mode:
authorxolatile2025-08-17 18:28:28 +0200
committerxolatile2025-08-17 18:28:28 +0200
commitbffe8d11bd1dfec49280fb64a17f0ae529ac3f5d (patch)
tree9f4f7b6f5003585e5a170bd55ccaa335b8f26f90 /src/shared/glemu.cpp
parentbec4167d29a68efd0cd2da36143e7f1c78a119a0 (diff)
downloadxolatile-badassbug-master.tar.xz
xolatile-badassbug-master.tar.zst
Compiles, removed a lot of code, do not run it...HEADmaster
Diffstat (limited to 'src/shared/glemu.cpp')
-rw-r--r--src/shared/glemu.cpp7
1 files changed, 5 insertions, 2 deletions
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))