Don't use IBOs

This commit is contained in:
Shinovon 2026-05-03 00:28:22 +05:00
parent 7dae1b0268
commit 1209902fe9
3 changed files with 9 additions and 7 deletions

View file

@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "../rwbase.h"
#include "../rwerror.h"
@ -25,7 +26,7 @@ drawInst_simple(InstanceDataHeader *header, InstanceData *inst)
{
flushCache();
glDrawElements(header->primType, inst->numIndex,
GL_UNSIGNED_SHORT, (void*)(uintptr)inst->offset);
GL_UNSIGNED_SHORT, ((uint8*) header->indexBuffer) + inst->offset);
}
// Emulate PS2 GS alpha test FB_ONLY case: failed alpha writes to frame- but not to depth buffer
@ -93,7 +94,7 @@ disableAttribPointers(AttribDesc *attribDescs, int32 numAttribs)
void
setupVertexInput(InstanceDataHeader *header)
{
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, header->ibo);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glBindBuffer(GL_ARRAY_BUFFER, header->vbo);
setAttribPointers(header->attribDesc, header->numAttribs);
}