d3d9 improvements

This commit is contained in:
aap
2020-04-24 19:06:11 +02:00
parent 374f951d7c
commit 5a16d845aa
23 changed files with 452 additions and 152 deletions

View File

@@ -1166,7 +1166,8 @@ Device renderdevice = {
gl3::im2DRenderPrimitive,
gl3::im2DRenderIndexedPrimitive,
gl3::im3DTransform,
gl3::im3DRenderIndexed,
gl3::im3DRenderPrimitive,
gl3::im3DRenderIndexedPrimitive,
gl3::im3DEnd,
#ifdef LIBRW_SDL2
gl3::deviceSystemSDL2

View File

@@ -220,7 +220,18 @@ im3DTransform(void *vertices, int32 numVertices, Matrix *world)
}
void
im3DRenderIndexed(PrimitiveType primType, void *indices, int32 numIndices)
im3DRenderPrimitive(PrimitiveType primType)
{
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, im3DIbo);
flushCache();
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
disableAttribPointers(im3dattribDesc, 3);
}
void
im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndices)
{
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, im3DIbo);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, numIndices*2,

View File

@@ -18,7 +18,8 @@ void im2DRenderIndexedPrimitive(PrimitiveType primType,
void openIm3D(void);
void closeIm3D(void);
void im3DTransform(void *vertices, int32 numVertices, Matrix *world);
void im3DRenderIndexed(PrimitiveType primType, void *indices, int32 numIndices);
void im3DRenderPrimitive(PrimitiveType primType);
void im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndices);
void im3DEnd(void);
#endif