mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
35 lines
709 B
C++
35 lines
709 B
C++
|
|
#include "tarray.h"
|
|
#include "hwrenderer/data/buffers.h"
|
|
|
|
struct HWViewpointUniforms;
|
|
class FRenderState;
|
|
|
|
class HWViewpointBuffer
|
|
{
|
|
IDataBuffer *mBuffer;
|
|
|
|
unsigned int mBufferSize;
|
|
unsigned int mBlockAlign;
|
|
unsigned int mUploadIndex;
|
|
unsigned int mLastMappedIndex;
|
|
unsigned int mByteSize;
|
|
TArray<bool> mClipPlaneInfo;
|
|
|
|
int m2DWidth = -1, m2DHeight = -1;
|
|
|
|
unsigned int mBlockSize;
|
|
|
|
void CheckSize();
|
|
|
|
public:
|
|
|
|
HWViewpointBuffer();
|
|
~HWViewpointBuffer();
|
|
void Clear();
|
|
int Bind(FRenderState &di, unsigned int index);
|
|
void Set2D(FRenderState &di, int width, int height);
|
|
int SetViewpoint(FRenderState &di, HWViewpointUniforms *vp);
|
|
unsigned int GetBlockSize() const { return mBlockSize; }
|
|
};
|
|
|