mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-23 01:57:21 +03:00
something
This commit is contained in:
parent
85d6e68889
commit
baa6d4e1c2
3 changed files with 2 additions and 39 deletions
|
|
@ -84,9 +84,6 @@ void tbEndTimer(Const char* name)
|
||||||
}
|
}
|
||||||
assert(n != 1500);
|
assert(n != 1500);
|
||||||
TimerBar.Timers[n].endTime = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerFrame();
|
TimerBar.Timers[n].endTime = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerFrame();
|
||||||
if (strcmp(name, "EndOfFrame")) {
|
|
||||||
endOfFrameTime = TimerBar.Timers[n].endTime - TimerBar.Timers[n].startTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float Diag_GetFPS()
|
float Diag_GetFPS()
|
||||||
|
|
|
||||||
32
vendor/librw/src/gl/gl3immed.cpp
vendored
32
vendor/librw/src/gl/gl3immed.cpp
vendored
|
|
@ -113,18 +113,10 @@ im2DRenderPrimitive(PrimitiveType primType, void *vertices, int32 numVertices)
|
||||||
glVertexAttribPointer(ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + 0);
|
glVertexAttribPointer(ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + 0);
|
||||||
|
|
||||||
glEnableVertexAttribArray(ATTRIB_COLOR);
|
glEnableVertexAttribArray(ATTRIB_COLOR);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, r));
|
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);
|
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, u));
|
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);
|
glDrawArrays(primTypeMap[primType], 0, numVertices);
|
||||||
|
|
||||||
|
|
@ -154,18 +146,10 @@ im2DRenderIndexedPrimitive(PrimitiveType primType,
|
||||||
glVertexAttribPointer(ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + 0);
|
glVertexAttribPointer(ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + 0);
|
||||||
|
|
||||||
glEnableVertexAttribArray(ATTRIB_COLOR);
|
glEnableVertexAttribArray(ATTRIB_COLOR);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, r));
|
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);
|
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im2DVertex), (uint8*)vertices + OFFSET_OF(Im2DVertex, u));
|
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);
|
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, indices);
|
||||||
|
|
||||||
|
|
@ -232,18 +216,10 @@ im3DRenderPrimitive(PrimitiveType primType)
|
||||||
glVertexAttribPointer(ATTRIB_POS, 3, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + 0);
|
glVertexAttribPointer(ATTRIB_POS, 3, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + 0);
|
||||||
|
|
||||||
glEnableVertexAttribArray(ATTRIB_COLOR);
|
glEnableVertexAttribArray(ATTRIB_COLOR);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, r));
|
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);
|
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, u));
|
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);
|
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
|
||||||
|
|
||||||
|
|
@ -264,18 +240,10 @@ im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndic
|
||||||
glVertexAttribPointer(ATTRIB_POS, 3, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + 0);
|
glVertexAttribPointer(ATTRIB_POS, 3, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + 0);
|
||||||
|
|
||||||
glEnableVertexAttribArray(ATTRIB_COLOR);
|
glEnableVertexAttribArray(ATTRIB_COLOR);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, r));
|
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);
|
glEnableVertexAttribArray(ATTRIB_TEXCOORDS0);
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
glVertexAttribPointer(ATTRIB_TEXCOORDS0, 2, GL_FLOAT, GL_FALSE, sizeof(Im3DVertex), (uint8*)currentIm3dVertices + OFFSET_OF(Im3DVertex, u));
|
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);
|
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, indices);
|
||||||
|
|
||||||
|
|
|
||||||
6
vendor/librw/src/rwbase.h
vendored
6
vendor/librw/src/rwbase.h
vendored
|
|
@ -11,14 +11,12 @@
|
||||||
#ifdef __SYMBIAN32__
|
#ifdef __SYMBIAN32__
|
||||||
#undef stderr
|
#undef stderr
|
||||||
#define stderr stdout
|
#define stderr stdout
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef OFFSET_OF
|
#ifdef OFFSET_OF
|
||||||
#undef OFFSET_OF
|
#undef OFFSET_OF
|
||||||
#endif
|
#endif
|
||||||
|
#define OFFSET_OF(type, member) ((size_t)&(((type*)0)->member))
|
||||||
#define OFFSET_OF(type, member) \
|
|
||||||
((size_t)((char*)&(((type*)0)->member) - (char*)0))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TODO: clean up the opengl defines
|
// TODO: clean up the opengl defines
|
||||||
// and figure out what we even want here...
|
// and figure out what we even want here...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue