- removed the remaining calls from the FRenderer interface from the main game code.
This does not work with a setup where the same backend is driving both renderers. Most of this is now routed through 'screen', and the decision between renderers has to be made inside the actual render functions. The software renderer is still driven by a thin opaque interface to keep it mostly an isolated module.
This commit is contained in:
parent
927b351174
commit
d474b849a5
18 changed files with 243 additions and 238 deletions
|
|
@ -190,6 +190,50 @@ void OpenGLFrameBuffer::Update()
|
|||
GLRenderer->SetOutputViewport(nullptr);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
extern int currentrenderer;
|
||||
|
||||
void OpenGLFrameBuffer::RenderTextureView(FCanvasTexture *tex, AActor *Viewpoint, double FOV)
|
||||
{
|
||||
if (currentrenderer == 0)
|
||||
Super::RenderTextureView(tex, Viewpoint, FOV);
|
||||
else if (GLRenderer != nullptr)
|
||||
{
|
||||
GLRenderer->RenderTextureView(tex, Viewpoint, FOV);
|
||||
camtexcount++;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Render the view to a savegame picture
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void OpenGLFrameBuffer::WriteSavePic(player_t *player, FileWriter *file, int width, int height)
|
||||
{
|
||||
if (GLRenderer != nullptr)
|
||||
GLRenderer->WriteSavePic(player, file, width, height);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void OpenGLFrameBuffer::RenderView(player_t *player)
|
||||
{
|
||||
if (GLRenderer != nullptr)
|
||||
GLRenderer->RenderView(player);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
|
|
@ -198,7 +242,6 @@ void OpenGLFrameBuffer::Update()
|
|||
|
||||
EXTERN_CVAR(Bool, r_drawvoxels)
|
||||
EXTERN_CVAR(Int, gl_tonemap)
|
||||
extern int currentrenderer;
|
||||
|
||||
uint32_t OpenGLFrameBuffer::GetCaps()
|
||||
{
|
||||
|
|
@ -235,7 +278,6 @@ uint32_t OpenGLFrameBuffer::GetCaps()
|
|||
//==========================================================================
|
||||
|
||||
CVAR(Bool, gl_finishbeforeswap, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
extern int camtexcount;
|
||||
|
||||
void OpenGLFrameBuffer::Swap()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue