Changes to allow compilation. A new PKG was created for the Symbian S60v3 version

This commit is contained in:
Dante Leoncini 2026-05-06 23:22:34 -03:00
parent 7592dde85c
commit e747590879
3 changed files with 62 additions and 6 deletions

View file

@ -113,10 +113,18 @@ im2DRenderPrimitive(PrimitiveType primType, void *vertices, int32 numVertices)
glVertexAttribPointer(ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + 0);
glEnableVertexAttribArray(ATTRIB_COLOR);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, r));
#else
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im2DVertex), (uint8*)vertices + offsetof(Im2DVertex, r));
#endif
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, u));
#else
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + offsetof(Im2DVertex, u));
#endif
glDrawArrays(primTypeMap[primType], 0, numVertices);
@ -146,10 +154,18 @@ im2DRenderIndexedPrimitive(PrimitiveType primType,
glVertexAttribPointer(ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + 0);
glEnableVertexAttribArray(ATTRIB_COLOR);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, r));
#else
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im2DVertex), (uint8*)vertices + offsetof(Im2DVertex, r));
#endif
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, u));
#else
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + offsetof(Im2DVertex, u));
#endif
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, indices);
@ -216,10 +232,18 @@ im3DRenderPrimitive(PrimitiveType primType)
glVertexAttribPointer(ATTRIB_POS, 3, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + 0);
glEnableVertexAttribArray(ATTRIB_COLOR);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, r));
#else
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + offsetof(Im3DVertex, r));
#endif
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, u));
#else
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + offsetof(Im3DVertex, u));
#endif
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
@ -240,10 +264,18 @@ im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndic
glVertexAttribPointer(ATTRIB_POS, 3, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + 0);
glEnableVertexAttribArray(ATTRIB_COLOR);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, r));
#else
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + offsetof(Im3DVertex, r));
#endif
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
#ifdef __SYMBIAN32__
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, u));
#else
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + offsetof(Im3DVertex, u));
#endif
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, indices);