Skip to content
Permalink
Browse files

- renamed GLViewpointBuffer to HWViewpointBuffer.

  • Loading branch information...
coelckers committed Jun 10, 2019
1 parent 13cab1c commit 9f2fbc1294ec453b3ac9cd2b8d7b3186d6d28c98
@@ -27,7 +27,7 @@ class FGLRenderBuffers;
class FGL2DDrawer;
class FHardwareTexture;
class SWSceneDrawer;
class GLViewpointBuffer;
class HWViewpointBuffer;
struct FRenderViewpoint;

namespace OpenGLRenderer
@@ -154,7 +154,7 @@ void OpenGLFrameBuffer::InitializeState()

mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
mSkyData = new FSkyVertexBuffer;
mViewpoints = new GLViewpointBuffer;
mViewpoints = new HWViewpointBuffer;
mLights = new FLightBuffer();

GLRenderer = new FGLRenderer(this);
@@ -33,7 +33,7 @@

static const int INITIAL_BUFFER_SIZE = 100; // 100 viewpoints per frame should nearly always be enough

GLViewpointBuffer::GLViewpointBuffer()
HWViewpointBuffer::HWViewpointBuffer()
{
mBufferSize = INITIAL_BUFFER_SIZE;
mBlockAlign = ((sizeof(HWViewpointUniforms) / screen->uniformblockalignment) + 1) * screen->uniformblockalignment;
@@ -45,13 +45,13 @@ GLViewpointBuffer::GLViewpointBuffer()
mClipPlaneInfo.Push(0);
}

GLViewpointBuffer::~GLViewpointBuffer()
HWViewpointBuffer::~HWViewpointBuffer()
{
delete mBuffer;
}


void GLViewpointBuffer::CheckSize()
void HWViewpointBuffer::CheckSize()
{
if (mUploadIndex >= mBufferSize)
{
@@ -62,7 +62,7 @@ void GLViewpointBuffer::CheckSize()
}
}

int GLViewpointBuffer::Bind(FRenderState &di, unsigned int index)
int HWViewpointBuffer::Bind(FRenderState &di, unsigned int index)
{
if (index != mLastMappedIndex)
{
@@ -73,7 +73,7 @@ int GLViewpointBuffer::Bind(FRenderState &di, unsigned int index)
return index;
}

void GLViewpointBuffer::Set2D(FRenderState &di, int width, int height)
void HWViewpointBuffer::Set2D(FRenderState &di, int width, int height)
{
if (width != m2DWidth || height != m2DHeight)
{
@@ -91,7 +91,7 @@ void GLViewpointBuffer::Set2D(FRenderState &di, int width, int height)
Bind(di, 0);
}

int GLViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
int HWViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
{
CheckSize();
mBuffer->Map();
@@ -102,7 +102,7 @@ int GLViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
return Bind(di, mUploadIndex++);
}

void GLViewpointBuffer::Clear()
void HWViewpointBuffer::Clear()
{
// Index 0 is reserved for the 2D projection.
mUploadIndex = 1;
@@ -5,7 +5,7 @@
struct HWViewpointUniforms;
class FRenderState;

class GLViewpointBuffer
class HWViewpointBuffer
{
IDataBuffer *mBuffer;

@@ -24,8 +24,8 @@ class GLViewpointBuffer

public:

GLViewpointBuffer();
~GLViewpointBuffer();
HWViewpointBuffer();
~HWViewpointBuffer();
void Clear();
int Bind(FRenderState &di, unsigned int index);
void Set2D(FRenderState &di, int width, int height);
@@ -152,7 +152,7 @@ void VulkanFrameBuffer::InitializeState()

mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
mSkyData = new FSkyVertexBuffer;
mViewpoints = new GLViewpointBuffer;
mViewpoints = new HWViewpointBuffer;
mLights = new FLightBuffer();

CreateFanToTrisIndexBuffer();
@@ -57,7 +57,7 @@ class IIndexBuffer;
class IVertexBuffer;
class IDataBuffer;
class FFlatVertexBuffer;
class GLViewpointBuffer;
class HWViewpointBuffer;
class FLightBuffer;
struct HWDrawInfo;

@@ -379,7 +379,7 @@ class DFrameBuffer
FPortalSceneState *mPortalState; // global portal state.
FSkyVertexBuffer *mSkyData = nullptr; // the sky vertex buffer
FFlatVertexBuffer *mVertexData = nullptr; // Global vertex data
GLViewpointBuffer *mViewpoints = nullptr; // Viewpoint render data.
HWViewpointBuffer *mViewpoints = nullptr; // Viewpoint render data.
FLightBuffer *mLights = nullptr; // Dynamic lights
IShadowMap mShadowMap;

0 comments on commit 9f2fbc1

Please sign in to comment.
You can’t perform that action at this time.