summaryrefslogtreecommitdiff
path: root/src/shared/glemu.cpp
diff options
context:
space:
mode:
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))