- Moved the code that renders the view from D_Display into a virtual function

of the frame buffer so I can get rid of the last remaining renderer check
  outside the display code in GZDoom.
- made V_SetResolution a virtual function in IVideo. It's probably not a perfect
  solution but at least it allows overriding it (which I need in GZDoom.)
  Note: There's a lot of redundancy between hardware.cpp/h in the SDL and Win32
  folders so some cleaning up might be a good idea.


SVN r692 (trunk)
This commit is contained in:
Christoph Oelckers 2008-01-11 21:04:22 +00:00
commit e06c645310
6 changed files with 36 additions and 9 deletions

View file

@ -89,6 +89,7 @@
#include "st_start.h"
#include "templates.h"
#include "teaminfo.h"
#include "hardware.h"
// MACROS ------------------------------------------------------------------
@ -466,7 +467,7 @@ void D_Display ()
if (setmodeneeded)
{
// Change screen mode.
if (V_SetResolution (NewWidth, NewHeight, NewBits))
if (Video->SetResolution (NewWidth, NewHeight, NewBits))
{
// Recalculate various view parameters.
setsizeneeded = true;
@ -556,10 +557,7 @@ void D_Display ()
screen->SetBlendingRect(viewwindowx, viewwindowy,
viewwindowx + realviewwidth, viewwindowy + realviewheight);
P_CheckPlayerSprites();
R_RenderActorView (players[consoleplayer].mo);
R_DetailDouble (); // [RH] Apply detail mode expansion
// [RH] Let cameras draw onto textures that were visible this frame.
FCanvasTextureInfo::UpdateAll ();
screen->RenderView(&players[consoleplayer]);
if ((hw2d = screen->Begin2D(viewactive)))
{
// Redraw everything every frame when using 2D accel