vkdoom_m/src/gl/data/gl_viewpointbuffer.h
alexey.lysiuk 49c3ec6a87 - fixed compilation warnings reported by GCC and Clang
src/gl/data/gl_viewpointbuffer.cpp:142:12: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
src/gl/data/gl_viewpointbuffer.cpp:142:34: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
2018-10-28 15:59:28 +02:00

36 lines
669 B
C++

#include "tarray.h"
struct HWViewpointUniforms;
class GLViewpointBuffer
{
unsigned int mBufferId;
unsigned int mBufferSize;
unsigned int mBlockAlign;
unsigned int mUploadIndex;
unsigned int mLastMappedIndex;
unsigned int mByteSize;
void * mBufferPointer;
TArray<bool> mClipPlaneInfo;
int m2DWidth = -1, m2DHeight = -1;
unsigned int mBlockSize;
void CheckSize();
void Allocate();
public:
GLViewpointBuffer();
~GLViewpointBuffer();
void Clear();
void Map();
void Unmap();
int Bind(unsigned int index);
void Set2D(int width, int height);
int SetViewpoint(HWViewpointUniforms *vp);
unsigned int GetBlockSize() const { return mBlockSize; }
};