mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-07 08:21:04 +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 FGL2DDrawer;
|
||||||
class FHardwareTexture;
|
class FHardwareTexture;
|
||||||
class SWSceneDrawer;
|
class SWSceneDrawer;
|
||||||
class GLViewpointBuffer;
|
class HWViewpointBuffer;
|
||||||
struct FRenderViewpoint;
|
struct FRenderViewpoint;
|
||||||
|
|
||||||
namespace OpenGLRenderer
|
namespace OpenGLRenderer
|
||||||
|
|
|
@ -154,7 +154,7 @@ void OpenGLFrameBuffer::InitializeState()
|
||||||
|
|
||||||
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
|
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
|
||||||
mSkyData = new FSkyVertexBuffer;
|
mSkyData = new FSkyVertexBuffer;
|
||||||
mViewpoints = new GLViewpointBuffer;
|
mViewpoints = new HWViewpointBuffer;
|
||||||
mLights = new FLightBuffer();
|
mLights = new FLightBuffer();
|
||||||
|
|
||||||
GLRenderer = new FGLRenderer(this);
|
GLRenderer = new FGLRenderer(this);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
static const int INITIAL_BUFFER_SIZE = 100; // 100 viewpoints per frame should nearly always be enough
|
static const int INITIAL_BUFFER_SIZE = 100; // 100 viewpoints per frame should nearly always be enough
|
||||||
|
|
||||||
GLViewpointBuffer::GLViewpointBuffer()
|
HWViewpointBuffer::HWViewpointBuffer()
|
||||||
{
|
{
|
||||||
mBufferSize = INITIAL_BUFFER_SIZE;
|
mBufferSize = INITIAL_BUFFER_SIZE;
|
||||||
mBlockAlign = ((sizeof(HWViewpointUniforms) / screen->uniformblockalignment) + 1) * screen->uniformblockalignment;
|
mBlockAlign = ((sizeof(HWViewpointUniforms) / screen->uniformblockalignment) + 1) * screen->uniformblockalignment;
|
||||||
|
@ -45,13 +45,13 @@ GLViewpointBuffer::GLViewpointBuffer()
|
||||||
mClipPlaneInfo.Push(0);
|
mClipPlaneInfo.Push(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLViewpointBuffer::~GLViewpointBuffer()
|
HWViewpointBuffer::~HWViewpointBuffer()
|
||||||
{
|
{
|
||||||
delete mBuffer;
|
delete mBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GLViewpointBuffer::CheckSize()
|
void HWViewpointBuffer::CheckSize()
|
||||||
{
|
{
|
||||||
if (mUploadIndex >= mBufferSize)
|
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)
|
if (index != mLastMappedIndex)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ int GLViewpointBuffer::Bind(FRenderState &di, unsigned int index)
|
||||||
return 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)
|
if (width != m2DWidth || height != m2DHeight)
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ void GLViewpointBuffer::Set2D(FRenderState &di, int width, int height)
|
||||||
Bind(di, 0);
|
Bind(di, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GLViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
|
int HWViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
|
||||||
{
|
{
|
||||||
CheckSize();
|
CheckSize();
|
||||||
mBuffer->Map();
|
mBuffer->Map();
|
||||||
|
@ -102,7 +102,7 @@ int GLViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
|
||||||
return Bind(di, mUploadIndex++);
|
return Bind(di, mUploadIndex++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLViewpointBuffer::Clear()
|
void HWViewpointBuffer::Clear()
|
||||||
{
|
{
|
||||||
// Index 0 is reserved for the 2D projection.
|
// Index 0 is reserved for the 2D projection.
|
||||||
mUploadIndex = 1;
|
mUploadIndex = 1;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
struct HWViewpointUniforms;
|
struct HWViewpointUniforms;
|
||||||
class FRenderState;
|
class FRenderState;
|
||||||
|
|
||||||
class GLViewpointBuffer
|
class HWViewpointBuffer
|
||||||
{
|
{
|
||||||
IDataBuffer *mBuffer;
|
IDataBuffer *mBuffer;
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ class GLViewpointBuffer
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GLViewpointBuffer();
|
HWViewpointBuffer();
|
||||||
~GLViewpointBuffer();
|
~HWViewpointBuffer();
|
||||||
void Clear();
|
void Clear();
|
||||||
int Bind(FRenderState &di, unsigned int index);
|
int Bind(FRenderState &di, unsigned int index);
|
||||||
void Set2D(FRenderState &di, int width, int height);
|
void Set2D(FRenderState &di, int width, int height);
|
||||||
|
|
|
@ -152,7 +152,7 @@ void VulkanFrameBuffer::InitializeState()
|
||||||
|
|
||||||
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
|
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
|
||||||
mSkyData = new FSkyVertexBuffer;
|
mSkyData = new FSkyVertexBuffer;
|
||||||
mViewpoints = new GLViewpointBuffer;
|
mViewpoints = new HWViewpointBuffer;
|
||||||
mLights = new FLightBuffer();
|
mLights = new FLightBuffer();
|
||||||
|
|
||||||
CreateFanToTrisIndexBuffer();
|
CreateFanToTrisIndexBuffer();
|
||||||
|
|
|
@ -57,7 +57,7 @@ class IIndexBuffer;
|
||||||
class IVertexBuffer;
|
class IVertexBuffer;
|
||||||
class IDataBuffer;
|
class IDataBuffer;
|
||||||
class FFlatVertexBuffer;
|
class FFlatVertexBuffer;
|
||||||
class GLViewpointBuffer;
|
class HWViewpointBuffer;
|
||||||
class FLightBuffer;
|
class FLightBuffer;
|
||||||
struct HWDrawInfo;
|
struct HWDrawInfo;
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ public:
|
||||||
FPortalSceneState *mPortalState; // global portal state.
|
FPortalSceneState *mPortalState; // global portal state.
|
||||||
FSkyVertexBuffer *mSkyData = nullptr; // the sky vertex buffer
|
FSkyVertexBuffer *mSkyData = nullptr; // the sky vertex buffer
|
||||||
FFlatVertexBuffer *mVertexData = nullptr; // Global vertex data
|
FFlatVertexBuffer *mVertexData = nullptr; // Global vertex data
|
||||||
GLViewpointBuffer *mViewpoints = nullptr; // Viewpoint render data.
|
HWViewpointBuffer *mViewpoints = nullptr; // Viewpoint render data.
|
||||||
FLightBuffer *mLights = nullptr; // Dynamic lights
|
FLightBuffer *mLights = nullptr; // Dynamic lights
|
||||||
IShadowMap mShadowMap;
|
IShadowMap mShadowMap;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue