Most importantly, the separate command line options for switching on the legacy buffer handling have been removed. There's really no need for them anymore, because unlike in earlier versions many of the implementation differences no longer exist - with the exception of where the light and vertex buffer contents are generated. For testing this, -glversion 3 is sufficient.
37 lines
699 B
C++
37 lines
699 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;
|
|
bool mPersistent;
|
|
|
|
unsigned int m2DWidth = ~0u, m2DHeight = ~0u;
|
|
|
|
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; }
|
|
};
|
|
|