- moved some buffer variables out of GLRenderer into common parts of the code so that they can be accessed from hwrenderer as well.

This will allow more code to be moved out of the API dependent parts.
This commit is contained in:
Christoph Oelckers 2018-10-28 13:56:24 +01:00
parent c5b3b9e107
commit f7c7c8d1c5
12 changed files with 66 additions and 104 deletions

View file

@ -52,7 +52,7 @@ CVAR(Int, gl_dither_bpc, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
void FGLRenderer::RenderScreenQuad() void FGLRenderer::RenderScreenQuad()
{ {
mVBO->Bind(gl_RenderState); screen->mVertexData->Bind(gl_RenderState);
gl_RenderState.ApplyBuffers(); gl_RenderState.ApplyBuffers();
glDrawArrays(GL_TRIANGLE_STRIP, FFlatVertexBuffer::PRESENT_INDEX, 4); glDrawArrays(GL_TRIANGLE_STRIP, FFlatVertexBuffer::PRESENT_INDEX, 4);
} }

View file

@ -102,15 +102,10 @@ void FGLRenderer::Initialize(int width, int height)
glBindVertexArray(mVAOID); glBindVertexArray(mVAOID);
FGLDebug::LabelObject(GL_VERTEX_ARRAY, mVAOID, "FGLRenderer.mVAOID"); FGLDebug::LabelObject(GL_VERTEX_ARRAY, mVAOID, "FGLRenderer.mVAOID");
mVBO = new FFlatVertexBuffer(width, height);
mSkyVBO = new FSkyVertexBuffer;
mLights = new FLightBuffer(); mLights = new FLightBuffer();
mViewpoints = new GLViewpointBuffer;
GLRenderer->mVBO->Bind(gl_RenderState);
mFBID = 0; mFBID = 0;
mOldFBID = 0; mOldFBID = 0;
SetupLevel();
mShaderManager = new FShaderManager; mShaderManager = new FShaderManager;
mSamplerManager = new FSamplerManager; mSamplerManager = new FSamplerManager;
} }
@ -122,10 +117,7 @@ FGLRenderer::~FGLRenderer()
FMaterial::FlushAll(); FMaterial::FlushAll();
if (mShaderManager != nullptr) delete mShaderManager; if (mShaderManager != nullptr) delete mShaderManager;
if (mSamplerManager != nullptr) delete mSamplerManager; if (mSamplerManager != nullptr) delete mSamplerManager;
if (mVBO != nullptr) delete mVBO;
if (mSkyVBO != nullptr) delete mSkyVBO;
if (mLights != nullptr) delete mLights; if (mLights != nullptr) delete mLights;
if (mViewpoints != nullptr) delete mViewpoints;
if (mFBID != 0) glDeleteFramebuffers(1, &mFBID); if (mFBID != 0) glDeleteFramebuffers(1, &mFBID);
if (mVAOID != 0) if (mVAOID != 0)
{ {
@ -160,7 +152,7 @@ void FGLRenderer::ResetSWScene()
void FGLRenderer::SetupLevel() void FGLRenderer::SetupLevel()
{ {
mVBO->CreateVBO(); screen->mVertexData->CreateVBO();
} }
//=========================================================================== //===========================================================================
@ -200,8 +192,8 @@ void FGLRenderer::EndOffscreen()
sector_t *FGLRenderer::RenderView(player_t* player) sector_t *FGLRenderer::RenderView(player_t* player)
{ {
GLRenderer->mVBO->Bind(gl_RenderState); screen->mVertexData->Bind(gl_RenderState);
mVBO->Reset(); screen->mVertexData->Reset();
sector_t *retsec; sector_t *retsec;
if (!V_IsHardwareRenderer()) if (!V_IsHardwareRenderer())
@ -223,7 +215,7 @@ sector_t *FGLRenderer::RenderView(player_t* player)
P_FindParticleSubsectors(); P_FindParticleSubsectors();
mLights->Clear(); mLights->Clear();
mViewpoints->Clear(); screen->mViewpoints->Clear();
// NoInterpolateView should have no bearing on camera textures, but needs to be preserved for the main view below. // NoInterpolateView should have no bearing on camera textures, but needs to be preserved for the main view below.
bool saved_niv = NoInterpolateView; bool saved_niv = NoInterpolateView;
@ -315,17 +307,17 @@ void FGLRenderer::WriteSavePic (player_t *player, FileWriter *file, int width, i
bounds.width = width; bounds.width = width;
bounds.height = height; bounds.height = height;
// if mVBO is persistently mapped we must be sure the GPU finished reading from it before we fill it with new data. // we must be sure the GPU finished reading from the buffer before we fill it with new data.
glFinish(); glFinish();
// Switch to render buffers dimensioned for the savepic // Switch to render buffers dimensioned for the savepic
mBuffers = mSaveBuffers; mBuffers = mSaveBuffers;
P_FindParticleSubsectors(); // make sure that all recently spawned particles have a valid subsector. P_FindParticleSubsectors(); // make sure that all recently spawned particles have a valid subsector.
GLRenderer->mVBO->Bind(gl_RenderState); screen->mVertexData->Bind(gl_RenderState);
mVBO->Reset(); screen->mVertexData->Reset();
mLights->Clear(); mLights->Clear();
mViewpoints->Clear(); screen->mViewpoints->Clear();
// This shouldn't overwrite the global viewpoint even for a short time. // This shouldn't overwrite the global viewpoint even for a short time.
FRenderViewpoint savevp; FRenderViewpoint savevp;
@ -422,7 +414,7 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
FDrawInfo di; // For access to the virtual interface. This should be placed elsewhere... FDrawInfo di; // For access to the virtual interface. This should be placed elsewhere...
const auto &mScreenViewport = screen->mScreenViewport; const auto &mScreenViewport = screen->mScreenViewport;
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height); glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);
GLRenderer->mViewpoints->Set2D(&di, screen->GetWidth(), screen->GetHeight()); screen->mViewpoints->Set2D(&di, screen->GetWidth(), screen->GetHeight());
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
@ -543,7 +535,7 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
glDisable(GL_SCISSOR_TEST); glDisable(GL_SCISSOR_TEST);
gl_RenderState.SetRenderStyle(STYLE_Translucent); gl_RenderState.SetRenderStyle(STYLE_Translucent);
GLRenderer->mVBO->Bind(gl_RenderState); screen->mVertexData->Bind(gl_RenderState);
gl_RenderState.EnableTexture(true); gl_RenderState.EnableTexture(true);
gl_RenderState.EnableBrightmap(true); gl_RenderState.EnableBrightmap(true);
gl_RenderState.SetTextureMode(TM_NORMAL); gl_RenderState.SetTextureMode(TM_NORMAL);

View file

@ -69,10 +69,7 @@ public:
//FRotator mAngles; //FRotator mAngles;
FFlatVertexBuffer *mVBO = nullptr;
FSkyVertexBuffer *mSkyVBO = nullptr;
FLightBuffer *mLights = nullptr; FLightBuffer *mLights = nullptr;
GLViewpointBuffer *mViewpoints = nullptr;
SWSceneDrawer *swdrawer = nullptr; SWSceneDrawer *swdrawer = nullptr;
float mSceneClearColor[3]; float mSceneClearColor[3];

View file

@ -71,22 +71,16 @@ void FDrawInfo::DrawSorted(int listindex)
if (!dl->sorted) if (!dl->sorted)
{ {
GLRenderer->mVBO->Map(); screen->mVertexData->Map();
dl->Sort(this); dl->Sort(this);
GLRenderer->mVBO->Unmap(); screen->mVertexData->Unmap();
} }
gl_RenderState.ClearClipSplit(); gl_RenderState.ClearClipSplit();
if (!(gl.flags & RFL_NO_CLIP_PLANES)) EnableClipDistance(1, true);
{ EnableClipDistance(2, true);
glEnable(GL_CLIP_DISTANCE1);
glEnable(GL_CLIP_DISTANCE2);
}
dl->DrawSorted(this, gl_RenderState, dl->sorted); dl->DrawSorted(this, gl_RenderState, dl->sorted);
if (!(gl.flags & RFL_NO_CLIP_PLANES)) EnableClipDistance(1, false);
{ EnableClipDistance(2, false);
glDisable(GL_CLIP_DISTANCE1);
glDisable(GL_CLIP_DISTANCE2);
}
gl_RenderState.ClearClipSplit(); gl_RenderState.ClearClipSplit();
} }
@ -128,7 +122,6 @@ static Clipper staticClipper;
FDrawInfo *FDrawInfo::StartDrawInfo(FRenderViewpoint &parentvp, HWViewpointUniforms *uniforms) FDrawInfo *FDrawInfo::StartDrawInfo(FRenderViewpoint &parentvp, HWViewpointUniforms *uniforms)
{ {
FDrawInfo *di=di_list.GetNew(); FDrawInfo *di=di_list.GetNew();
di->mVBO = GLRenderer->mVBO;
di->mClipper = &staticClipper; di->mClipper = &staticClipper;
di->Viewpoint = parentvp; di->Viewpoint = parentvp;
if (uniforms) if (uniforms)
@ -193,7 +186,7 @@ void FDrawInfo::AddSubsectorToPortal(FSectorPortalGroup *ptg, subsector_t *sub)
std::pair<FFlatVertex *, unsigned int> FDrawInfo::AllocVertices(unsigned int count) std::pair<FFlatVertex *, unsigned int> FDrawInfo::AllocVertices(unsigned int count)
{ {
unsigned int index = -1; unsigned int index = -1;
auto p = GLRenderer->mVBO->Alloc(count, &index); auto p = screen->mVertexData->Alloc(count, &index);
return std::make_pair(p, index); return std::make_pair(p, index);
} }
@ -243,14 +236,14 @@ void FDrawInfo::DrawModel(GLSprite *spr, FRenderState &state)
{ {
FGLModelRenderer renderer(this, state, spr->dynlightindex); FGLModelRenderer renderer(this, state, spr->dynlightindex);
renderer.RenderModel(spr->x, spr->y, spr->z, spr->modelframe, spr->actor, Viewpoint.TicFrac); renderer.RenderModel(spr->x, spr->y, spr->z, spr->modelframe, spr->actor, Viewpoint.TicFrac);
GLRenderer->mVBO->Bind(state); screen->mVertexData->Bind(state);
} }
void FDrawInfo::DrawHUDModel(HUDSprite *huds, FRenderState &state) void FDrawInfo::DrawHUDModel(HUDSprite *huds, FRenderState &state)
{ {
FGLModelRenderer renderer(this, state, huds->lightindex); FGLModelRenderer renderer(this, state, huds->lightindex);
renderer.RenderHUDModel(huds->weapon, huds->mx, huds->my); renderer.RenderHUDModel(huds->weapon, huds->mx, huds->my);
GLRenderer->mVBO->Bind(state); screen->mVertexData->Bind(state);
} }
void FDrawInfo::RenderPortal(HWPortal *p, bool usestencil) void FDrawInfo::RenderPortal(HWPortal *p, bool usestencil)
@ -262,8 +255,8 @@ void FDrawInfo::RenderPortal(HWPortal *p, bool usestencil)
gl_RenderState.SetLightIndex(-1); gl_RenderState.SetLightIndex(-1);
gp->DrawContents(new_di, gl_RenderState); gp->DrawContents(new_di, gl_RenderState);
new_di->EndDrawInfo(); new_di->EndDrawInfo();
GLRenderer->mVBO->Bind(gl_RenderState); screen->mVertexData->Bind(gl_RenderState);
GLRenderer->mViewpoints->Bind(this, vpIndex); screen->mViewpoints->Bind(this, vpIndex);
gp->RemoveStencil(this, gl_RenderState, usestencil); gp->RemoveStencil(this, gl_RenderState, usestencil);
} }
@ -345,7 +338,7 @@ void FDrawInfo::ClearScreen()
{ {
bool multi = !!glIsEnabled(GL_MULTISAMPLE); bool multi = !!glIsEnabled(GL_MULTISAMPLE);
GLRenderer->mViewpoints->Set2D(this, SCREENWIDTH, SCREENHEIGHT); screen->mViewpoints->Set2D(this, SCREENWIDTH, SCREENHEIGHT);
gl_RenderState.SetColor(0, 0, 0); gl_RenderState.SetColor(0, 0, 0);
gl_RenderState.Apply(); gl_RenderState.Apply();

View file

@ -78,7 +78,7 @@ EXTERN_CVAR (Bool, r_drawvoxels)
void FDrawInfo::ApplyVPUniforms() void FDrawInfo::ApplyVPUniforms()
{ {
VPUniforms.CalcDependencies(); VPUniforms.CalcDependencies();
vpIndex = GLRenderer->mViewpoints->SetViewpoint(this, &VPUniforms); vpIndex = screen->mViewpoints->SetViewpoint(this, &VPUniforms);
} }
@ -104,7 +104,7 @@ void FDrawInfo::CreateScene()
// clip the scene and fill the drawlists // clip the scene and fill the drawlists
Bsp.Clock(); Bsp.Clock();
GLRenderer->mVBO->Map(); screen->mVertexData->Map();
GLRenderer->mLights->Begin(); GLRenderer->mLights->Begin();
// Give the DrawInfo the viewpoint in fixed point because that's what the nodes are. // Give the DrawInfo the viewpoint in fixed point because that's what the nodes are.
@ -131,7 +131,7 @@ void FDrawInfo::CreateScene()
ProcessSectorStacks(in_area); // merge visplanes of sector stacks ProcessSectorStacks(in_area); // merge visplanes of sector stacks
PrepareUnhandledMissingTextures(); PrepareUnhandledMissingTextures();
GLRenderer->mLights->Finish(); GLRenderer->mLights->Finish();
GLRenderer->mVBO->Unmap(); screen->mVertexData->Unmap();
ProcessAll.Unclock(); ProcessAll.Unclock();
@ -280,7 +280,7 @@ void FDrawInfo::DrawScene(int drawmode)
GLRenderer->mBuffers->BindSceneFB(true); GLRenderer->mBuffers->BindSceneFB(true);
gl_RenderState.EnableDrawBuffers(gl_RenderState.GetPassDrawBufferCount()); gl_RenderState.EnableDrawBuffers(gl_RenderState.GetPassDrawBufferCount());
gl_RenderState.Apply(); gl_RenderState.Apply();
GLRenderer->mViewpoints->Bind(this, vpIndex); screen->mViewpoints->Bind(this, vpIndex);
} }
// Handle all portals after rendering the opaque objects but before // Handle all portals after rendering the opaque objects but before
@ -329,7 +329,7 @@ void FDrawInfo::DrawEndScene2D(sector_t * viewsector)
HWViewpointUniforms vp = VPUniforms; HWViewpointUniforms vp = VPUniforms;
vp.mViewMatrix.loadIdentity(); vp.mViewMatrix.loadIdentity();
vp.mProjectionMatrix = vrmode->GetHUDSpriteProjection(); vp.mProjectionMatrix = vrmode->GetHUDSpriteProjection();
GLRenderer->mViewpoints->SetViewpoint(this, &vp); screen->mViewpoints->SetViewpoint(this, &vp);
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glDisable(GL_MULTISAMPLE); glDisable(GL_MULTISAMPLE);

View file

@ -39,6 +39,8 @@
#include "hwrenderer/utility/hw_clock.h" #include "hwrenderer/utility/hw_clock.h"
#include "hwrenderer/utility/hw_vrmodes.h" #include "hwrenderer/utility/hw_vrmodes.h"
#include "hwrenderer/models/hw_models.h" #include "hwrenderer/models/hw_models.h"
#include "hwrenderer/scene/hw_skydome.h"
#include "hwrenderer/data/hw_viewpointbuffer.h"
#include "gl/shaders/gl_shaderprogram.h" #include "gl/shaders/gl_shaderprogram.h"
#include "gl_debug.h" #include "gl_debug.h"
#include "r_videoscale.h" #include "r_videoscale.h"
@ -82,6 +84,10 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, bool fullscreen) :
OpenGLFrameBuffer::~OpenGLFrameBuffer() OpenGLFrameBuffer::~OpenGLFrameBuffer()
{ {
if (mVertexData != nullptr) delete mVertexData;
if (mSkyData != nullptr) delete mSkyData;
if (mViewpoints != nullptr) delete mViewpoints;
if (GLRenderer) if (GLRenderer)
{ {
delete GLRenderer; delete GLRenderer;
@ -140,6 +146,10 @@ void OpenGLFrameBuffer::InitializeState()
GLRenderer->Initialize(GetWidth(), GetHeight()); GLRenderer->Initialize(GetWidth(), GetHeight());
SetViewportRects(nullptr); SetViewportRects(nullptr);
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
mSkyData = new FSkyVertexBuffer;
mViewpoints = new GLViewpointBuffer;
mDebug = std::make_shared<FGLDebug>(); mDebug = std::make_shared<FGLDebug>();
mDebug->Update(); mDebug->Update();
} }
@ -160,20 +170,7 @@ void OpenGLFrameBuffer::Update()
Flush3D.Unclock(); Flush3D.Unclock();
Swap(); Swap();
CheckBench(); Super::Update();
int initialWidth = GetClientWidth();
int initialHeight = GetClientHeight();
int clientWidth = ViewportScaledWidth(initialWidth, initialHeight);
int clientHeight = ViewportScaledHeight(initialWidth, initialHeight);
if (clientWidth < 320) clientWidth = 320;
if (clientHeight < 200) clientHeight = 200;
if (clientWidth > 0 && clientHeight > 0 && (GetWidth() != clientWidth || GetHeight() != clientHeight))
{
SetVirtualSize(clientWidth, clientHeight);
V_OutputResized(clientWidth, clientHeight);
GLRenderer->mVBO->OutputResized(clientWidth, clientHeight);
}
} }
//=========================================================================== //===========================================================================

View file

@ -458,7 +458,7 @@ void HWDrawInfo::DoSubsector(subsector_t * sub)
{ {
int a = 0; int a = 0;
} }
mVBO->CheckUpdate(sector); screen->mVertexData->CheckUpdate(sector);
} }
// [RH] Add particles // [RH] Add particles

View file

@ -199,7 +199,6 @@ struct HWDrawInfo
BitArray CurrentMapSections; // this cannot be a single number, because a group of portals with the same displacement may link different sections. BitArray CurrentMapSections; // this cannot be a single number, because a group of portals with the same displacement may link different sections.
area_t in_area; area_t in_area;
fixed_t viewx, viewy; // since the nodes are still fixed point, keeping the view position also fixed point for node traversal is faster. fixed_t viewx, viewy; // since the nodes are still fixed point, keeping the view position also fixed point for node traversal is faster.
FFlatVertexBuffer *mVBO; // this class needs access because the sector vertex updating is part of BSP traversal.
private: private:

View file

@ -84,7 +84,6 @@ EXTERN_CVAR(Float, skyoffset)
FSkyVertexBuffer::FSkyVertexBuffer() FSkyVertexBuffer::FSkyVertexBuffer()
{ {
screen->mSkyData = this;
CreateDome(); CreateDome();
mVertexBuffer = screen->CreateVertexBuffer(); mVertexBuffer = screen->CreateVertexBuffer();
@ -103,17 +102,6 @@ FSkyVertexBuffer::FSkyVertexBuffer()
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
FSkyVertexBuffer::~FSkyVertexBuffer()
{
if (screen && screen->mSkyData) screen->mSkyData = nullptr;
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::Bind(FRenderState &state) void FSkyVertexBuffer::Bind(FRenderState &state)
{ {
state.SetVertexBuffer(mVertexBuffer, 0, 0); state.SetVertexBuffer(mVertexBuffer, 0, 0);

View file

@ -67,7 +67,6 @@ public:
public: public:
FSkyVertexBuffer(); FSkyVertexBuffer();
virtual ~FSkyVertexBuffer();
void SetupMatrices(FMaterial *tex, float x_offset, float y_offset, bool mirror, int mode, VSMatrix &modelmatrix, VSMatrix &textureMatrix); void SetupMatrices(FMaterial *tex, float x_offset, float y_offset, bool mirror, int mode, VSMatrix &modelmatrix, VSMatrix &textureMatrix);
void Bind(FRenderState &state); void Bind(FRenderState &state);

View file

@ -49,6 +49,8 @@
#include "r_videoscale.h" #include "r_videoscale.h"
#include "i_time.h" #include "i_time.h"
#include "hwrenderer/scene/hw_portal.h" #include "hwrenderer/scene/hw_portal.h"
#include "hwrenderer/utility/hw_clock.h"
#include "hwrenderer/data/flatvertices.h"
CVAR(Bool, gl_scale_viewport, true, CVAR_ARCHIVE); CVAR(Bool, gl_scale_viewport, true, CVAR_ARCHIVE);
@ -286,6 +288,24 @@ void DFrameBuffer::GetFlashedPalette(PalEntry pal[256])
DoBlending(SourcePalette, pal, 256, Flash.r, Flash.g, Flash.b, Flash.a); DoBlending(SourcePalette, pal, 256, Flash.r, Flash.g, Flash.b, Flash.a);
} }
void DFrameBuffer::Update()
{
CheckBench();
int initialWidth = GetClientWidth();
int initialHeight = GetClientHeight();
int clientWidth = ViewportScaledWidth(initialWidth, initialHeight);
int clientHeight = ViewportScaledHeight(initialWidth, initialHeight);
if (clientWidth < 320) clientWidth = 320;
if (clientHeight < 200) clientHeight = 200;
if (clientWidth > 0 && clientHeight > 0 && (GetWidth() != clientWidth || GetHeight() != clientHeight))
{
SetVirtualSize(clientWidth, clientHeight);
V_OutputResized(clientWidth, clientHeight);
mVertexData->OutputResized(clientWidth, clientHeight);
}
}
PalEntry *DFrameBuffer::GetPalette() PalEntry *DFrameBuffer::GetPalette()
{ {
return SourcePalette; return SourcePalette;
@ -533,30 +553,3 @@ void DFrameBuffer::ScaleCoordsFromWindow(int16_t &x, int16_t &y)
x = int16_t((x - letterboxX) * Width / letterboxWidth); x = int16_t((x - letterboxX) * Width / letterboxWidth);
y = int16_t((y - letterboxY) * Height / letterboxHeight); y = int16_t((y - letterboxY) * Height / letterboxHeight);
} }
//===========================================================================
//
//
//
//===========================================================================
#define DBGBREAK assert(0)
class DDummyFrameBuffer : public DFrameBuffer
{
typedef DFrameBuffer Super;
public:
DDummyFrameBuffer(int width, int height)
: DFrameBuffer(0, 0)
{
SetVirtualSize(width, height);
}
// These methods should never be called.
void Update() { DBGBREAK; }
bool IsFullscreen() { DBGBREAK; return 0; }
int GetClientWidth() { DBGBREAK; return 0; }
int GetClientHeight() { DBGBREAK; return 0; }
float Gamma;
};

View file

@ -53,6 +53,8 @@ class FSkyVertexBuffer;
class IIndexBuffer; class IIndexBuffer;
class IVertexBuffer; class IVertexBuffer;
class IDataBuffer; class IDataBuffer;
class FFlatVertexBuffer;
class GLViewpointBuffer;
enum EHWCaps enum EHWCaps
{ {
@ -373,7 +375,9 @@ public:
bool enable_quadbuffered = false; // Quad-buffered stereo available? bool enable_quadbuffered = false; // Quad-buffered stereo available?
unsigned int uniformblockalignment = 256; // Hardware dependent uniform buffer alignment. unsigned int uniformblockalignment = 256; // Hardware dependent uniform buffer alignment.
FPortalSceneState *mPortalState; // global portal state. FPortalSceneState *mPortalState; // global portal state.
FSkyVertexBuffer *mSkyData; // we need access to this in the device independent part, but cannot depend on how the renderer manages it internally. FSkyVertexBuffer *mSkyData = nullptr; // the sky vertex buffer
FFlatVertexBuffer *mVertexData = nullptr; // Global vertex data
GLViewpointBuffer *mViewpoints = nullptr; // Viewpoint render data.
IntRect mScreenViewport; IntRect mScreenViewport;
IntRect mSceneViewport; IntRect mSceneViewport;
@ -404,7 +408,7 @@ public:
} }
// Make the surface visible. // Make the surface visible.
virtual void Update () = 0; virtual void Update ();
// Return a pointer to 256 palette entries that can be written to. // Return a pointer to 256 palette entries that can be written to.
PalEntry *GetPalette (); PalEntry *GetPalette ();