Enable effects back

This commit is contained in:
Shinovon 2026-05-03 07:05:34 +05:00
parent 0ad6fe45d1
commit 2b8a26d4d7
3 changed files with 19 additions and 23 deletions

View file

@ -1401,10 +1401,10 @@ RenderScene(void)
}
#endif
PUSH_RENDERGROUP("RenderScene");
// CClouds::Render();
CClouds::Render();
DoRWRenderHorizon();
CRenderer::RenderRoads();
// CCoronas::RenderReflections();
CCoronas::RenderReflections();
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
CRenderer::RenderEverythingBarRoads();
CRenderer::RenderBoats();
@ -1451,7 +1451,7 @@ RenderEffects(void)
// CSkidmarks::Render();
// CAntennas::Render();
// CRubbish::Render();
// CCoronas::Render();
CCoronas::Render();
// CParticle::Render();
CPacManPickups::Render();
// CWeaponEffects::Render();

View file

@ -29,7 +29,6 @@ float MaxFrameTime;
uint32 curMS;
uint32 msCollected[MAX_MS_COLLECTED];
uint frames;
#ifdef FRAMETIME
float FrameInitTime;
#endif
@ -39,12 +38,17 @@ extern "C" int draw;
extern "C" int render;
extern "C" int matfx;
extern "C" int skin;
extern "C" int im2d;
extern "C" int im3d;
int vboUploads;
int draw;
int render;
int matfx;
int skin;
int im2d;
int im3d;
float endOfFrameTime;
uint32 frames;
void tbInit()
{
@ -114,7 +118,7 @@ void tbDisplay()
sprintf(temp, "FPS: %.2f", Diag_GetFPS());
if (frames >= 15) {
RDebug_Printf("FPS: %.2f", Diag_GetFPS());
RDebug_Printf("vbo: %d, draw: %d, render: %d, matfx: %d, skin: %d ", vboUploads, draw, render, matfx, skin);
RDebug_Printf("vbo: %d, draw: %d, render: %d, matfx: %d, skin: %d, im2d: %d, im3d: %d", vboUploads, draw, render, matfx, skin, im2d, im3d);
for (uint32 i = 0; i < TimerBar.count; i++) {
MaxTimes[i] = Max(MaxTimes[i], TimerBar.Timers[i].endTime - TimerBar.Timers[i].startTime);
RDebug_Printf("%s: %.2f", &TimerBar.Timers[i].name[0], MaxTimes[i]);
@ -131,6 +135,8 @@ void tbDisplay()
render = 0;
matfx = 0;
skin = 0;
im2d = 0;
im3d = 0;
AsciiToUnicode(temp, wtemp);
CFont::SetColor(CRGBA(255, 255, 255, 255));

View file

@ -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);