mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 12:30:32 +00:00
- renamed GLViewpointBuffer to HWViewpointBuffer.
This commit is contained in:
parent
13cab1c0b6
commit
9f2fbc1294
6 changed files with 15 additions and 15 deletions
|
@ -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 @@ public:
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue