add debug render groups
This commit is contained in:
parent
1a429bb3c4
commit
9db87fc636
@ -1330,6 +1330,8 @@ CPacManPickups::Render()
|
|||||||
{
|
{
|
||||||
if (!bPMActive) return;
|
if (!bPMActive) return;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CPacManPickups::Render");
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE);
|
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE);
|
||||||
@ -1363,6 +1365,8 @@ CPacManPickups::Render()
|
|||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, FALSE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1313,6 +1313,7 @@ if(gbRenderEverythingBarRoads)
|
|||||||
void
|
void
|
||||||
RenderScene_new(void)
|
RenderScene_new(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("RenderScene_new");
|
||||||
CClouds::Render();
|
CClouds::Render();
|
||||||
DoRWRenderHorizon();
|
DoRWRenderHorizon();
|
||||||
|
|
||||||
@ -1320,6 +1321,7 @@ RenderScene_new(void)
|
|||||||
DefinedState();
|
DefinedState();
|
||||||
// CMattRenderer::ResetRenderStates
|
// CMattRenderer::ResetRenderStates
|
||||||
// moved CRenderer::RenderBoats to before transparent water
|
// moved CRenderer::RenderBoats to before transparent water
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
@ -1327,6 +1329,7 @@ bool FredIsInFirstPersonCam(void) { return false; }
|
|||||||
void
|
void
|
||||||
RenderEffects_new(void)
|
RenderEffects_new(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("RenderEffects_new");
|
||||||
CShadows::RenderStaticShadows();
|
CShadows::RenderStaticShadows();
|
||||||
// CRenderer::GenerateEnvironmentMap
|
// CRenderer::GenerateEnvironmentMap
|
||||||
CShadows::RenderStoredShadows();
|
CShadows::RenderStoredShadows();
|
||||||
@ -1369,6 +1372,7 @@ if(gbRenderFadingInEntities)
|
|||||||
CPointLights::RenderFogEffect();
|
CPointLights::RenderFogEffect();
|
||||||
CMovingThings::Render();
|
CMovingThings::Render();
|
||||||
CRenderer::RenderFirstPersonVehicle();
|
CRenderer::RenderFirstPersonVehicle();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1381,6 +1385,7 @@ RenderScene(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
PUSH_RENDERGROUP("RenderScene");
|
||||||
CClouds::Render();
|
CClouds::Render();
|
||||||
DoRWRenderHorizon();
|
DoRWRenderHorizon();
|
||||||
CRenderer::RenderRoads();
|
CRenderer::RenderRoads();
|
||||||
@ -1395,11 +1400,13 @@ RenderScene(void)
|
|||||||
CRenderer::RenderVehiclesButNotBoats();
|
CRenderer::RenderVehiclesButNotBoats();
|
||||||
#endif
|
#endif
|
||||||
CWeather::RenderRainStreaks();
|
CWeather::RenderRainStreaks();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RenderDebugShit(void)
|
RenderDebugShit(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("RenderDebugShit");
|
||||||
CTheScripts::RenderTheScriptDebugLines();
|
CTheScripts::RenderTheScriptDebugLines();
|
||||||
#ifndef FINAL
|
#ifndef FINAL
|
||||||
if(gbShowCollisionLines)
|
if(gbShowCollisionLines)
|
||||||
@ -1408,6 +1415,7 @@ RenderDebugShit(void)
|
|||||||
CDebug::DrawLines();
|
CDebug::DrawLines();
|
||||||
DefinedState();
|
DefinedState();
|
||||||
#endif
|
#endif
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1419,6 +1427,7 @@ RenderEffects(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
PUSH_RENDERGROUP("RenderEffects");
|
||||||
CGlass::Render();
|
CGlass::Render();
|
||||||
CWaterCannons::Render();
|
CWaterCannons::Render();
|
||||||
CSpecialFX::Render();
|
CSpecialFX::Render();
|
||||||
@ -1434,11 +1443,13 @@ RenderEffects(void)
|
|||||||
CPointLights::RenderFogEffect();
|
CPointLights::RenderFogEffect();
|
||||||
CMovingThings::Render();
|
CMovingThings::Render();
|
||||||
CRenderer::RenderFirstPersonVehicle();
|
CRenderer::RenderFirstPersonVehicle();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Render2dStuff(void)
|
Render2dStuff(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("Render2dStuff");
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
@ -1504,6 +1515,7 @@ Render2dStuff(void)
|
|||||||
#ifdef DEBUGMENU
|
#ifdef DEBUGMENU
|
||||||
DebugMenuRender();
|
DebugMenuRender();
|
||||||
#endif
|
#endif
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1511,21 +1523,25 @@ RenderMenus(void)
|
|||||||
{
|
{
|
||||||
if (FrontEndMenuManager.m_bMenuActive)
|
if (FrontEndMenuManager.m_bMenuActive)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("RenderMenus");
|
||||||
PUSH_MEMID(MEMID_FRONTEND);
|
PUSH_MEMID(MEMID_FRONTEND);
|
||||||
FrontEndMenuManager.DrawFrontEnd();
|
FrontEndMenuManager.DrawFrontEnd();
|
||||||
POP_MEMID();
|
POP_MEMID();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Render2dStuffAfterFade(void)
|
Render2dStuffAfterFade(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("Render2dStuffAfterFade");
|
||||||
#ifndef MASTER
|
#ifndef MASTER
|
||||||
DisplayGameDebugText();
|
DisplayGameDebugText();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHud::DrawAfterFade();
|
CHud::DrawAfterFade();
|
||||||
CFont::DrawFonts();
|
CFont::DrawFonts();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(RW_OPENGL)
|
||||||
|
#define PUSH_RENDERGROUP(str) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, str)
|
||||||
|
#define POP_RENDERGROUP() glPopDebugGroup()
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
|
||||||
struct GlobalScene
|
struct GlobalScene
|
||||||
{
|
{
|
||||||
RpWorld *world;
|
RpWorld *world;
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#error "Need librw for EXTENDED_COLOURFILTER"
|
#error "Need librw for EXTENDED_COLOURFILTER"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "MBlur.h"
|
#include "MBlur.h"
|
||||||
@ -407,6 +408,7 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CPostFX::Render");
|
||||||
if(pFrontBuffer == nil)
|
if(pFrontBuffer == nil)
|
||||||
Open(cam);
|
Open(cam);
|
||||||
assert(pFrontBuffer);
|
assert(pFrontBuffer);
|
||||||
@ -464,6 +466,8 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu
|
|||||||
bJustInitialised = false;
|
bJustInitialised = false;
|
||||||
}else
|
}else
|
||||||
bJustInitialised = true;
|
bJustInitialised = true;
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "Antennas.h"
|
#include "Antennas.h"
|
||||||
|
|
||||||
CAntenna CAntennas::aAntennas[NUMANTENNAS];
|
CAntenna CAntennas::aAntennas[NUMANTENNAS];
|
||||||
@ -70,6 +71,7 @@ CAntennas::Render(void)
|
|||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CAntennas::Render");
|
||||||
for(i = 0; i < NUMANTENNAS; i++){
|
for(i = 0; i < NUMANTENNAS; i++){
|
||||||
if(!aAntennas[i].active)
|
if(!aAntennas[i].active)
|
||||||
continue;
|
continue;
|
||||||
@ -101,6 +103,8 @@ CAntennas::Render(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "Sprite2d.h"
|
#include "Sprite2d.h"
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
@ -123,6 +124,8 @@ CClouds::Render(void)
|
|||||||
RwV3d screenpos;
|
RwV3d screenpos;
|
||||||
RwV3d worldpos;
|
RwV3d worldpos;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CClouds::Render");
|
||||||
|
|
||||||
CCoronas::SunBlockedByClouds = false;
|
CCoronas::SunBlockedByClouds = false;
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
@ -310,6 +313,8 @@ CClouds::Render(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
|
||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -322,6 +327,8 @@ void
|
|||||||
CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
|
CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
|
||||||
int16 botred, int16 botgreen, int16 botblue, int16 alpha)
|
int16 botred, int16 botgreen, int16 botblue, int16 alpha)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CClouds::RenderBackground");
|
||||||
|
|
||||||
CVector left = TheCamera.GetRight();
|
CVector left = TheCamera.GetRight();
|
||||||
float c = left.Magnitude2D();
|
float c = left.Magnitude2D();
|
||||||
if(c > 1.0f)
|
if(c > 1.0f)
|
||||||
@ -422,6 +429,8 @@ CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue,
|
|||||||
ms_colourBottom.g = (topgreen + 2 * botgreen) / 3;
|
ms_colourBottom.g = (topgreen + 2 * botgreen) / 3;
|
||||||
ms_colourBottom.b = (topblue + 2 * botblue) / 3;
|
ms_colourBottom.b = (topblue + 2 * botblue) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -436,6 +445,8 @@ CClouds::RenderHorizon(void)
|
|||||||
if(ms_horizonZ > SCREEN_HEIGHT)
|
if(ms_horizonZ > SCREEN_HEIGHT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CClouds::RenderHorizon");
|
||||||
|
|
||||||
float z1 = Min(ms_horizonZ + SMALLSTRIPHEIGHT, SCREEN_HEIGHT);
|
float z1 = Min(ms_horizonZ + SMALLSTRIPHEIGHT, SCREEN_HEIGHT);
|
||||||
CSprite2d::DrawRectXLU(CRect(0, ms_horizonZ, SCREEN_WIDTH, z1),
|
CSprite2d::DrawRectXLU(CRect(0, ms_horizonZ, SCREEN_WIDTH, z1),
|
||||||
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
|
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
|
||||||
@ -450,4 +461,6 @@ CClouds::RenderHorizon(void)
|
|||||||
z2 = Min(z2, SCREEN_HEIGHT);
|
z2 = Min(z2, SCREEN_HEIGHT);
|
||||||
CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2),
|
CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2),
|
||||||
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
|
ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
@ -235,6 +235,8 @@ CCoronas::Render(void)
|
|||||||
int i, j;
|
int i, j;
|
||||||
int screenw, screenh;
|
int screenw, screenh;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CCoronas::Render");
|
||||||
|
|
||||||
screenw = RwRasterGetWidth(RwCameraGetRaster(Scene.camera));
|
screenw = RwRasterGetWidth(RwCameraGetRaster(Scene.camera));
|
||||||
screenh = RwRasterGetHeight(RwCameraGetRaster(Scene.camera));
|
screenh = RwRasterGetHeight(RwCameraGetRaster(Scene.camera));
|
||||||
|
|
||||||
@ -418,6 +420,8 @@ CCoronas::Render(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -428,6 +432,8 @@ CCoronas::RenderReflections(void)
|
|||||||
CEntity *entity;
|
CEntity *entity;
|
||||||
|
|
||||||
if(CWeather::WetRoads > 0.0f){
|
if(CWeather::WetRoads > 0.0f){
|
||||||
|
PUSH_RENDERGROUP("CCoronas::RenderReflections");
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
CSprite::InitSpriteBuffer();
|
CSprite::InitSpriteBuffer();
|
||||||
#endif
|
#endif
|
||||||
@ -505,6 +511,8 @@ CCoronas::RenderReflections(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}else{
|
}else{
|
||||||
for(i = 0; i < NUMCORONAS; i++)
|
for(i = 0; i < NUMCORONAS; i++)
|
||||||
aCoronas[i].renderReflection = false;
|
aCoronas[i].renderReflection = false;
|
||||||
|
@ -189,6 +189,7 @@ void CMovingThings::Update()
|
|||||||
void CMovingThings::Render()
|
void CMovingThings::Render()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
PUSH_RENDERGROUP("CMovingThings::Render");
|
||||||
for (i = 0; i < ARRAY_SIZE(aScrollBars); ++i)
|
for (i = 0; i < ARRAY_SIZE(aScrollBars); ++i)
|
||||||
{
|
{
|
||||||
if (aScrollBars[i].IsVisible())
|
if (aScrollBars[i].IsVisible())
|
||||||
@ -204,6 +205,7 @@ void CMovingThings::Render()
|
|||||||
if (aDigitalClocks[i].IsVisible())
|
if (aDigitalClocks[i].IsVisible())
|
||||||
aDigitalClocks[i].Render();
|
aDigitalClocks[i].Render();
|
||||||
}
|
}
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- CMovingThing ----------
|
// ---------- CMovingThing ----------
|
||||||
|
@ -261,6 +261,8 @@ CGlass::Render(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDONE);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDONE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CGlass::Render");
|
||||||
|
|
||||||
for ( int32 i = 0; i < NUM_GLASSPANES; i++ )
|
for ( int32 i = 0; i < NUM_GLASSPANES; i++ )
|
||||||
{
|
{
|
||||||
if ( aGlassPanes[i].m_bActive )
|
if ( aGlassPanes[i].m_bActive )
|
||||||
@ -270,6 +272,8 @@ CGlass::Render(void)
|
|||||||
for ( uint32 i = 0; i < NumGlassEntities; i++ )
|
for ( uint32 i = 0; i < NumGlassEntities; i++ )
|
||||||
RenderEntityInGlass(apEntitiesToBeRendered[i]);
|
RenderEntityInGlass(apEntitiesToBeRendered[i]);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
|
|
||||||
NumGlassEntities = 0;
|
NumGlassEntities = 0;
|
||||||
|
|
||||||
RenderHiLightPolys();
|
RenderHiLightPolys();
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <d3d8caps.h>
|
#include <d3d8caps.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "MBlur.h"
|
#include "MBlur.h"
|
||||||
@ -208,6 +209,7 @@ CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, u
|
|||||||
#ifdef EXTENDED_COLOURFILTER
|
#ifdef EXTENDED_COLOURFILTER
|
||||||
CPostFX::Render(cam, red, green, blue, blur, type, bluralpha);
|
CPostFX::Render(cam, red, green, blue, blur, type, bluralpha);
|
||||||
#else
|
#else
|
||||||
|
PUSH_RENDERGROUP("CMBlur::MotionBlurRender");
|
||||||
RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur };
|
RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur };
|
||||||
#ifdef GTA_PS2
|
#ifdef GTA_PS2
|
||||||
if( pFrontBuffer )
|
if( pFrontBuffer )
|
||||||
@ -227,6 +229,7 @@ CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, u
|
|||||||
OverlayRender(cam, nil, color, type, bluralpha);
|
OverlayRender(cam, nil, color, type, bluralpha);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
POP_RENDERGROUP();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "TxdStore.h"
|
#include "TxdStore.h"
|
||||||
@ -1477,6 +1478,8 @@ void CParticle::Update()
|
|||||||
|
|
||||||
void CParticle::Render()
|
void CParticle::Render()
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CParticle::Render");
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void *)rwTEXTUREADDRESSWRAP);
|
RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void *)rwTEXTUREADDRESSWRAP);
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTUREPERSPECTIVE, (void *)TRUE);
|
RwRenderStateSet(rwRENDERSTATETEXTUREPERSPECTIVE, (void *)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void *)FALSE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void *)FALSE);
|
||||||
@ -1794,6 +1797,8 @@ void CParticle::Render()
|
|||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void *)rwBLENDSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void *)rwBLENDSRCALPHA);
|
||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDINVSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDINVSRCALPHA);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CParticle::RemovePSystem(tParticleType type)
|
void CParticle::RemovePSystem(tParticleType type)
|
||||||
|
@ -142,6 +142,8 @@ CPointLights::RenderFogEffect(void)
|
|||||||
CVector spriteCoors;
|
CVector spriteCoors;
|
||||||
float spritew, spriteh;
|
float spritew, spriteh;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CPointLights::RenderFogEffect");
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE);
|
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE);
|
||||||
@ -282,4 +284,6 @@ CPointLights::RenderFogEffect(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
@ -158,6 +158,8 @@ CRenderer::RenderOneRoad(CEntity *e)
|
|||||||
#ifdef EXTENDED_PIPELINES
|
#ifdef EXTENDED_PIPELINES
|
||||||
CustomPipes::AttachGlossPipe(e->GetAtomic());
|
CustomPipes::AttachGlossPipe(e->GetAtomic());
|
||||||
#endif
|
#endif
|
||||||
|
PUSH_RENDERGROUP(CModelInfo::GetModelInfo(e->GetModelIndex())->GetModelName());
|
||||||
|
|
||||||
#ifdef EXTRA_MODEL_FLAGS
|
#ifdef EXTRA_MODEL_FLAGS
|
||||||
if(!e->IsBuilding() || CModelInfo::GetModelInfo(e->GetModelIndex())->RenderDoubleSided()){
|
if(!e->IsBuilding() || CModelInfo::GetModelInfo(e->GetModelIndex())->RenderDoubleSided()){
|
||||||
BACKFACE_CULLING_OFF;
|
BACKFACE_CULLING_OFF;
|
||||||
@ -166,6 +168,8 @@ CRenderer::RenderOneRoad(CEntity *e)
|
|||||||
}else
|
}else
|
||||||
#endif
|
#endif
|
||||||
e->Render();
|
e->Render();
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,6 +217,8 @@ CRenderer::RenderOneNonRoad(CEntity *e)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP(CModelInfo::GetModelInfo(e->GetModelIndex())->GetModelName());
|
||||||
|
|
||||||
resetLights = e->SetupLighting();
|
resetLights = e->SetupLighting();
|
||||||
|
|
||||||
if(e->IsVehicle())
|
if(e->IsVehicle())
|
||||||
@ -246,6 +252,8 @@ CRenderer::RenderOneNonRoad(CEntity *e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
e->RemoveLighting(resetLights);
|
e->RemoveLighting(resetLights);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -271,6 +279,7 @@ CRenderer::RenderRoads(void)
|
|||||||
int i;
|
int i;
|
||||||
CTreadable *t;
|
CTreadable *t;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderRoads");
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
||||||
BACKFACE_CULLING_ON;
|
BACKFACE_CULLING_ON;
|
||||||
DeActivateDirectional();
|
DeActivateDirectional();
|
||||||
@ -296,6 +305,7 @@ CRenderer::RenderRoads(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -306,6 +316,7 @@ CRenderer::RenderEverythingBarRoads(void)
|
|||||||
CVector dist;
|
CVector dist;
|
||||||
EntityInfo ei;
|
EntityInfo ei;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderEverythingBarRoads");
|
||||||
BACKFACE_CULLING_ON;
|
BACKFACE_CULLING_ON;
|
||||||
gSortedVehiclesAndPeds.Clear();
|
gSortedVehiclesAndPeds.Clear();
|
||||||
|
|
||||||
@ -337,6 +348,7 @@ CRenderer::RenderEverythingBarRoads(void)
|
|||||||
}else
|
}else
|
||||||
RenderOneNonRoad(e);
|
RenderOneNonRoad(e);
|
||||||
}
|
}
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -361,6 +373,7 @@ CRenderer::RenderBoats(void)
|
|||||||
{
|
{
|
||||||
CLink<EntityInfo> *node;
|
CLink<EntityInfo> *node;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderBoats");
|
||||||
BACKFACE_CULLING_ON;
|
BACKFACE_CULLING_ON;
|
||||||
|
|
||||||
for(node = gSortedVehiclesAndPeds.tail.prev;
|
for(node = gSortedVehiclesAndPeds.tail.prev;
|
||||||
@ -371,6 +384,7 @@ CRenderer::RenderBoats(void)
|
|||||||
if(v->IsBoat())
|
if(v->IsBoat())
|
||||||
RenderOneNonRoad(v);
|
RenderOneNonRoad(v);
|
||||||
}
|
}
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEW_RENDERER
|
#ifdef NEW_RENDERER
|
||||||
@ -475,6 +489,7 @@ CRenderer::RenderWorld(int pass)
|
|||||||
switch(pass){
|
switch(pass){
|
||||||
case 0:
|
case 0:
|
||||||
// Roads
|
// Roads
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderWorld - Roads");
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
||||||
for(i = 0; i < ms_nNoOfVisibleBuildings; i++){
|
for(i = 0; i < ms_nNoOfVisibleBuildings; i++){
|
||||||
e = ms_aVisibleBuildingPtrs[i];
|
e = ms_aVisibleBuildingPtrs[i];
|
||||||
@ -495,9 +510,11 @@ CRenderer::RenderWorld(int pass)
|
|||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
||||||
WorldRender::RenderBlendPass(PASS_BLEND);
|
WorldRender::RenderBlendPass(PASS_BLEND);
|
||||||
WorldRender::numBlendInsts[PASS_BLEND] = 0;
|
WorldRender::numBlendInsts[PASS_BLEND] = 0;
|
||||||
|
POP_RENDERGROUP();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// Opaque
|
// Opaque
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderWorld - Opaque");
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
||||||
for(i = 0; i < ms_nNoOfVisibleBuildings; i++){
|
for(i = 0; i < ms_nNoOfVisibleBuildings; i++){
|
||||||
e = ms_aVisibleBuildingPtrs[i];
|
e = ms_aVisibleBuildingPtrs[i];
|
||||||
@ -518,14 +535,17 @@ CRenderer::RenderWorld(int pass)
|
|||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||||
WorldRender::RenderBlendPass(PASS_NOZ);
|
WorldRender::RenderBlendPass(PASS_NOZ);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
||||||
|
POP_RENDERGROUP();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Transparent
|
// Transparent
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderWorld - Transparent");
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE);
|
||||||
WorldRender::RenderBlendPass(PASS_ADD);
|
WorldRender::RenderBlendPass(PASS_ADD);
|
||||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
||||||
WorldRender::RenderBlendPass(PASS_BLEND);
|
WorldRender::RenderBlendPass(PASS_BLEND);
|
||||||
|
POP_RENDERGROUP();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -536,11 +556,13 @@ CRenderer::RenderPeds(void)
|
|||||||
int i;
|
int i;
|
||||||
CEntity *e;
|
CEntity *e;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderPeds");
|
||||||
for(i = 0; i < ms_nNoOfVisibleVehicles; i++){
|
for(i = 0; i < ms_nNoOfVisibleVehicles; i++){
|
||||||
e = ms_aVisibleVehiclePtrs[i];
|
e = ms_aVisibleVehiclePtrs[i];
|
||||||
if(e->IsPed())
|
if(e->IsPed())
|
||||||
RenderOneNonRoad(e);
|
RenderOneNonRoad(e);
|
||||||
}
|
}
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -551,6 +573,7 @@ CRenderer::RenderVehicles(void)
|
|||||||
EntityInfo ei;
|
EntityInfo ei;
|
||||||
CLink<EntityInfo> *node;
|
CLink<EntityInfo> *node;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderVehicles");
|
||||||
// not the real thing
|
// not the real thing
|
||||||
for(i = 0; i < ms_nNoOfVisibleVehicles; i++){
|
for(i = 0; i < ms_nNoOfVisibleVehicles; i++){
|
||||||
e = ms_aVisibleVehiclePtrs[i];
|
e = ms_aVisibleVehiclePtrs[i];
|
||||||
@ -567,6 +590,7 @@ CRenderer::RenderVehicles(void)
|
|||||||
node != &gSortedVehiclesAndPeds.head;
|
node != &gSortedVehiclesAndPeds.head;
|
||||||
node = node->prev)
|
node = node->prev)
|
||||||
RenderOneNonRoad(node->item.ent);
|
RenderOneNonRoad(node->item.ent);
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -575,6 +599,7 @@ CRenderer::RenderWater(void)
|
|||||||
int i;
|
int i;
|
||||||
CEntity *e;
|
CEntity *e;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderWater");
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
|
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
||||||
@ -598,6 +623,7 @@ CRenderer::RenderWater(void)
|
|||||||
CWaterLevel::RenderWater();
|
CWaterLevel::RenderWater();
|
||||||
|
|
||||||
SetStencilState(0);
|
SetStencilState(0);
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -618,11 +644,13 @@ CRenderer::ClearForFrame(void)
|
|||||||
void
|
void
|
||||||
CRenderer::RenderFadingInEntities(void)
|
CRenderer::RenderFadingInEntities(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CRenderer::RenderFadingInEntities");
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
||||||
BACKFACE_CULLING_ON;
|
BACKFACE_CULLING_ON;
|
||||||
DeActivateDirectional();
|
DeActivateDirectional();
|
||||||
SetAmbientColours();
|
SetAmbientColours();
|
||||||
CVisibilityPlugins::RenderFadingEntities();
|
CVisibilityPlugins::RenderFadingEntities();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -52,6 +52,8 @@ CRubbish::Render(void)
|
|||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CRubbish::Render");
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
||||||
@ -137,6 +139,8 @@ CRubbish::Render(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -687,6 +687,8 @@ CShadows::SetRenderModeForShadowType(uint8 ShadowType)
|
|||||||
void
|
void
|
||||||
CShadows::RenderStoredShadows(void)
|
CShadows::RenderStoredShadows(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CShadows::RenderStoredShadows");
|
||||||
|
|
||||||
RenderBuffer::ClearRenderBuffer();
|
RenderBuffer::ClearRenderBuffer();
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE);
|
||||||
@ -784,11 +786,15 @@ CShadows::RenderStoredShadows(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)TRUE);
|
||||||
|
|
||||||
ShadowsStoredToBeRendered = 0;
|
ShadowsStoredToBeRendered = 0;
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CShadows::RenderStaticShadows(void)
|
CShadows::RenderStaticShadows(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CShadows::RenderStaticShadows");
|
||||||
|
|
||||||
RenderBuffer::ClearRenderBuffer();
|
RenderBuffer::ClearRenderBuffer();
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE);
|
||||||
@ -855,6 +861,8 @@ CShadows::RenderStaticShadows(void)
|
|||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)TRUE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -118,6 +118,8 @@ CSkidmarks::Render(void)
|
|||||||
int i, j;
|
int i, j;
|
||||||
RwTexture *lastTex = nil;
|
RwTexture *lastTex = nil;
|
||||||
|
|
||||||
|
PUSH_RENDERGROUP("CSkidmarks::Render");
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
|
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
|
||||||
@ -174,6 +176,8 @@ CSkidmarks::Render(void)
|
|||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -136,6 +136,7 @@ CSpecialFX::Shutdown(void)
|
|||||||
void
|
void
|
||||||
CSpecialFX::Render(void)
|
CSpecialFX::Render(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CSpecialFX::Render");
|
||||||
CMotionBlurStreaks::Render();
|
CMotionBlurStreaks::Render();
|
||||||
CBulletTraces::Render();
|
CBulletTraces::Render();
|
||||||
CBrightLights::Render();
|
CBrightLights::Render();
|
||||||
@ -145,6 +146,7 @@ CSpecialFX::Render(void)
|
|||||||
if(!(gbNewRenderer && FredIsInFirstPersonCam()))
|
if(!(gbNewRenderer && FredIsInFirstPersonCam()))
|
||||||
#endif
|
#endif
|
||||||
C3dMarkers::Render();
|
C3dMarkers::Render();
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
CRegisteredMotionBlurStreak CMotionBlurStreaks::aStreaks[NUMMBLURSTREAKS];
|
CRegisteredMotionBlurStreak CMotionBlurStreaks::aStreaks[NUMMBLURSTREAKS];
|
||||||
|
@ -297,9 +297,11 @@ void CWaterCannons::Update(void)
|
|||||||
|
|
||||||
void CWaterCannons::Render(void)
|
void CWaterCannons::Render(void)
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CWaterCannons::Render");
|
||||||
for ( int32 i = 0; i < NUM_WATERCANNONS; i++ )
|
for ( int32 i = 0; i < NUM_WATERCANNONS; i++ )
|
||||||
{
|
{
|
||||||
if ( aCannons[i].m_nId != 0 )
|
if ( aCannons[i].m_nId != 0 )
|
||||||
aCannons[i].Render();
|
aCannons[i].Render();
|
||||||
}
|
}
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
@ -643,6 +643,7 @@ CWaterLevel::RenderWater()
|
|||||||
if (gbDontRenderWater)
|
if (gbDontRenderWater)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
PUSH_RENDERGROUP("CWaterLevel::RenderWater");
|
||||||
bool bUseCamEndX = false;
|
bool bUseCamEndX = false;
|
||||||
bool bUseCamStartY = false;
|
bool bUseCamStartY = false;
|
||||||
|
|
||||||
@ -1066,6 +1067,8 @@ CWaterLevel::RenderWater()
|
|||||||
}
|
}
|
||||||
|
|
||||||
DefinedState();
|
DefinedState();
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -293,6 +293,7 @@ CVisibilityPlugins::RenderFadingEntities(void)
|
|||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(e->GetModelIndex());
|
mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(e->GetModelIndex());
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
if(mi->GetModelType() == MITYPE_SIMPLE && mi->m_noZwrite)
|
if(mi->GetModelType() == MITYPE_SIMPLE && mi->m_noZwrite)
|
||||||
#else
|
#else
|
||||||
@ -308,7 +309,9 @@ CVisibilityPlugins::RenderFadingEntities(void)
|
|||||||
DeActivateDirectional();
|
DeActivateDirectional();
|
||||||
SetAmbientColours();
|
SetAmbientColours();
|
||||||
e->bImBeingRendered = true;
|
e->bImBeingRendered = true;
|
||||||
|
PUSH_RENDERGROUP(mi->GetModelName());
|
||||||
RenderFadingAtomic((RpAtomic*)e->m_rwObject, node->item.sort);
|
RenderFadingAtomic((RpAtomic*)e->m_rwObject, node->item.sort);
|
||||||
|
POP_RENDERGROUP();
|
||||||
e->bImBeingRendered = false;
|
e->bImBeingRendered = false;
|
||||||
}else
|
}else
|
||||||
CRenderer::RenderOneNonRoad(e);
|
CRenderer::RenderOneNonRoad(e);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "WeaponEffects.h"
|
#include "WeaponEffects.h"
|
||||||
#include "TxdStore.h"
|
#include "TxdStore.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
@ -84,11 +85,15 @@ CWeaponEffects::Render(void)
|
|||||||
float w, h;
|
float w, h;
|
||||||
if ( CSprite::CalcScreenCoors(gCrossHair.m_vecPos, &pos, &w, &h, true) )
|
if ( CSprite::CalcScreenCoors(gCrossHair.m_vecPos, &pos, &w, &h, true) )
|
||||||
{
|
{
|
||||||
|
PUSH_RENDERGROUP("CWeaponEffects::Render");
|
||||||
|
|
||||||
float recipz = 1.0f / pos.z;
|
float recipz = 1.0f / pos.z;
|
||||||
CSprite::RenderOneXLUSprite(pos.x, pos.y, pos.z,
|
CSprite::RenderOneXLUSprite(pos.x, pos.y, pos.z,
|
||||||
gCrossHair.m_fSize * w, gCrossHair.m_fSize * h,
|
gCrossHair.m_fSize * w, gCrossHair.m_fSize * h,
|
||||||
gCrossHair.m_nRed, gCrossHair.m_nGreen, gCrossHair.m_nBlue, 255,
|
gCrossHair.m_nRed, gCrossHair.m_nGreen, gCrossHair.m_nBlue, 255,
|
||||||
recipz, 255);
|
recipz, 255);
|
||||||
|
|
||||||
|
POP_RENDERGROUP();
|
||||||
}
|
}
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE);
|
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user