added im3d transform flags

This commit is contained in:
aap
2020-05-06 09:22:29 +02:00
parent b3ad490d1b
commit 40eae78e79
9 changed files with 26 additions and 10 deletions

View File

@@ -208,7 +208,7 @@ closeIm3D(void)
}
void
im3DTransform(void *vertices, int32 numVertices, Matrix *world)
im3DTransform(void *vertices, int32 numVertices, Matrix *world, uint32 flags)
{
if(world == nil){
Matrix ident;
@@ -218,6 +218,9 @@ im3DTransform(void *vertices, int32 numVertices, Matrix *world)
setWorldMatrix(world);
im3dShader->use();
if((flags & im3d::VERTEXUV) == 0)
SetRenderStatePtr(TEXTURERASTER, nil);
// TODO: fixed size
glBindBuffer(GL_ARRAY_BUFFER, im3DVbo);
glBufferData(GL_ARRAY_BUFFER, numVertices*sizeof(Im3DVertex),

View File

@@ -17,7 +17,7 @@ void im2DRenderIndexedPrimitive(PrimitiveType primType,
void openIm3D(void);
void closeIm3D(void);
void im3DTransform(void *vertices, int32 numVertices, Matrix *world);
void im3DTransform(void *vertices, int32 numVertices, Matrix *world, uint32 flags);
void im3DRenderPrimitive(PrimitiveType primType);
void im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndices);
void im3DEnd(void);