mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-22 17:47:20 +03:00
Enable effects back
This commit is contained in:
parent
0ad6fe45d1
commit
2b8a26d4d7
3 changed files with 19 additions and 23 deletions
26
vendor/librw/src/gl/gl3immed.cpp
vendored
26
vendor/librw/src/gl/gl3immed.cpp
vendored
|
|
@ -25,14 +25,6 @@ Shader *im2dOverrideShader;
|
|||
static int32 u_xform;
|
||||
|
||||
static Shader *im2dShader;
|
||||
static AttribDesc im2dattribDesc[3] = {
|
||||
{ ATTRIB_POS, GL_FLOAT, GL_FALSE, 4,
|
||||
sizeof(Im2DVertex), 0 },
|
||||
{ ATTRIB_COLOR, GL_UNSIGNED_BYTE, GL_TRUE, 4,
|
||||
sizeof(Im2DVertex), offsetof(Im2DVertex, r) },
|
||||
{ ATTRIB_TEXCOORDS0, GL_FLOAT, GL_FALSE, 2,
|
||||
sizeof(Im2DVertex), offsetof(Im2DVertex, u) },
|
||||
};
|
||||
|
||||
static int primTypeMap[] = {
|
||||
GL_POINTS, // invalid
|
||||
|
|
@ -100,9 +92,13 @@ im2DSetXform(void)
|
|||
// glUniform4fv(currentShader->uniformLocations[u_xform], 1, xform);
|
||||
}
|
||||
|
||||
extern "C" int im2d;
|
||||
extern "C" int im3d;
|
||||
|
||||
void
|
||||
im2DRenderPrimitive(PrimitiveType primType, void *vertices, int32 numVertices)
|
||||
{
|
||||
im2d++;
|
||||
if(im2dOverrideShader)
|
||||
im2dOverrideShader->use();
|
||||
else
|
||||
|
|
@ -134,6 +130,7 @@ im2DRenderIndexedPrimitive(PrimitiveType primType,
|
|||
void *vertices, int32 numVertices,
|
||||
void *indices, int32 numIndices)
|
||||
{
|
||||
im2d++;
|
||||
if(im2dOverrideShader)
|
||||
im2dOverrideShader->use();
|
||||
else
|
||||
|
|
@ -166,16 +163,7 @@ im2DRenderIndexedPrimitive(PrimitiveType primType,
|
|||
|
||||
|
||||
static Shader *im3dShader;
|
||||
static AttribDesc im3dattribDesc[3] = {
|
||||
{ ATTRIB_POS, GL_FLOAT, GL_FALSE, 3,
|
||||
sizeof(Im3DVertex), 0 },
|
||||
{ ATTRIB_COLOR, GL_UNSIGNED_BYTE, GL_TRUE, 4,
|
||||
sizeof(Im3DVertex), offsetof(Im3DVertex, r) },
|
||||
{ ATTRIB_TEXCOORDS0, GL_FLOAT, GL_FALSE, 2,
|
||||
sizeof(Im3DVertex), offsetof(Im3DVertex, u) },
|
||||
};
|
||||
static uint32 im3DVbo, im3DIbo;
|
||||
static int32 num3DVertices; // not actually needed here
|
||||
static int32 num3DVertices;
|
||||
static void* currentIm3dVertices;
|
||||
|
||||
void
|
||||
|
|
@ -219,6 +207,7 @@ im3DTransform(void *vertices, int32 numVertices, Matrix *world, uint32 flags)
|
|||
void
|
||||
im3DRenderPrimitive(PrimitiveType primType)
|
||||
{
|
||||
im3d++;
|
||||
flushCache();
|
||||
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
|
|
@ -242,6 +231,7 @@ im3DRenderPrimitive(PrimitiveType primType)
|
|||
void
|
||||
im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndices)
|
||||
{
|
||||
im3d++;
|
||||
flushCache();
|
||||
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue