mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- backported GZDoom extensions to renderer interface.
SVN r3266 (trunk)
This commit is contained in:
parent
85bd2e02c9
commit
55bb4afac8
3 changed files with 14 additions and 8 deletions
|
@ -46,9 +46,7 @@
|
|||
#include "c_dispatch.h"
|
||||
#include "sc_man.h"
|
||||
#include "g_level.h"
|
||||
#ifdef GLSUPPORT
|
||||
#include "gl/gl_functions.h"
|
||||
#endif
|
||||
#include "r_renderer.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -186,9 +184,7 @@ void FS_EmulateCmd(char * string)
|
|||
{
|
||||
sc.MustGetNumber();
|
||||
// Using this disables most MAPINFO fog options!
|
||||
#ifdef GLSUPPORT
|
||||
gl_SetFogParams(sc.Number*70/400, 0xff000000, 0, 0);
|
||||
#endif
|
||||
Renderer->SetFogParams(sc.Number*70/400, 0xff000000, 0, 0);
|
||||
}
|
||||
else if (sc.Compare("gr_fogcolor"))
|
||||
{
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "md5.h"
|
||||
#include "compatibility.h"
|
||||
#include "po_man.h"
|
||||
#include "r_renderer.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
#include "fragglescript/t_fs.h"
|
||||
|
@ -3273,6 +3274,7 @@ extern polyblock_t **PolyBlockMap;
|
|||
|
||||
void P_FreeLevelData ()
|
||||
{
|
||||
Renderer->CleanLevelData();
|
||||
FPolyObj::ClearAllSubsectorLinks(); // can't be done as part of the polyobj deletion process.
|
||||
SN_StopAllSequences ();
|
||||
DThinker::DestroyAllThinkers ();
|
||||
|
@ -3445,7 +3447,8 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
bool buildmap;
|
||||
|
||||
// This is motivated as follows:
|
||||
bool RequireGLNodes = am_textured;
|
||||
|
||||
bool RequireGLNodes = Renderer->RequireGLNodes() || am_textured;
|
||||
|
||||
for (i = 0; i < (int)countof(times); ++i)
|
||||
{
|
||||
|
@ -3756,7 +3759,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
bool BuildGLNodes;
|
||||
if (ForceNodeBuild)
|
||||
{
|
||||
BuildGLNodes = am_textured || multiplayer || demoplayback || demorecording || genglnodes;
|
||||
BuildGLNodes = Renderer->RequireGLNodes() || am_textured || multiplayer || demoplayback || demorecording || genglnodes;
|
||||
|
||||
startTime = I_FPSTime ();
|
||||
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
|
||||
|
@ -3900,6 +3903,9 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
// set up world state
|
||||
P_SpawnSpecials ();
|
||||
|
||||
// This must be done BEFORE the PolyObj Spawn!!!
|
||||
Renderer->PreprocessLevel();
|
||||
|
||||
times[16].Clock();
|
||||
if (reloop) P_LoopSidedefs (false);
|
||||
PO_Init (); // Initialize the polyobjs
|
||||
|
|
|
@ -60,6 +60,10 @@ struct FRenderer
|
|||
virtual void CopyStackedViewParameters() {}
|
||||
virtual void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) = 0;
|
||||
virtual sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) = 0;
|
||||
virtual void SetFogParams(int _fogdensity, PalEntry _outsidefogcolor, int _outsidefogdensity, int _skyfog) {}
|
||||
virtual void PreprocessLevel() {}
|
||||
virtual void CleanLevelData() {}
|
||||
virtual bool RequireGLNodes() { return false; }
|
||||
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue