mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-11 05:00:58 +00:00
- fixed some of those supremely annoying and supremely pointless GCC/Clang compiler warnings.
This commit is contained in:
parent
c5e00dbc53
commit
92dcf2e5ef
3 changed files with 9 additions and 10 deletions
|
@ -51,8 +51,8 @@ class FFlatVertexBuffer : public FVertexBuffer
|
|||
|
||||
void CheckPlanes(sector_t *sector);
|
||||
|
||||
const unsigned int BUFFER_SIZE = 2000000;
|
||||
const unsigned int BUFFER_SIZE_TO_USE = 1999500;
|
||||
static const unsigned int BUFFER_SIZE = 2000000;
|
||||
static const unsigned int BUFFER_SIZE_TO_USE = 1999500;
|
||||
|
||||
void ImmRenderBuffer(unsigned int primtype, unsigned int offset, unsigned int count);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ FLightBuffer::FLightBuffer()
|
|||
if (gl.flags & RFL_SHADER_STORAGE_BUFFER)
|
||||
{
|
||||
mBufferType = GL_SHADER_STORAGE_BUFFER;
|
||||
mBlockAlign = -1;
|
||||
mBlockAlign = 0;
|
||||
mBlockSize = mBufferSize;
|
||||
}
|
||||
else
|
||||
|
@ -100,12 +100,12 @@ void FLightBuffer::Clear()
|
|||
|
||||
int FLightBuffer::UploadLights(FDynLightData &data)
|
||||
{
|
||||
int size0 = data.arrays[0].Size()/4;
|
||||
int size1 = data.arrays[1].Size()/4;
|
||||
int size2 = data.arrays[2].Size()/4;
|
||||
int totalsize = size0 + size1 + size2 + 1;
|
||||
unsigned int size0 = data.arrays[0].Size()/4;
|
||||
unsigned int size1 = data.arrays[1].Size()/4;
|
||||
unsigned int size2 = data.arrays[2].Size()/4;
|
||||
unsigned int totalsize = size0 + size1 + size2 + 1;
|
||||
|
||||
if (mBlockAlign >= 0 && totalsize + (mIndex % mBlockAlign) > mBlockSize)
|
||||
if (mBlockAlign > 0 && totalsize + (mIndex % mBlockAlign) > mBlockSize)
|
||||
{
|
||||
mIndex = ((mIndex + mBlockAlign) / mBlockAlign) * mBlockAlign;
|
||||
|
||||
|
@ -172,7 +172,7 @@ int FLightBuffer::UploadLights(FDynLightData &data)
|
|||
if (mBufferPointer == NULL) return -1;
|
||||
copyptr = mBufferPointer + mIndex * 4;
|
||||
|
||||
float parmcnt[] = { 0, size0, size0 + size1, size0 + size1 + size2 };
|
||||
float parmcnt[] = { 0, float(size0), float(size0 + size1), float(size0 + size1 + size2) };
|
||||
|
||||
memcpy(©ptr[0], parmcnt, 4 * sizeof(float));
|
||||
memcpy(©ptr[4], &data.arrays[0][0], 4 * size0*sizeof(float));
|
||||
|
|
|
@ -8,7 +8,6 @@ enum GLDrawItemType
|
|||
GLDIT_WALL,
|
||||
GLDIT_FLAT,
|
||||
GLDIT_SPRITE,
|
||||
GLDIT_POLY,
|
||||
};
|
||||
|
||||
enum DrawListType
|
||||
|
|
Loading…
Reference in a new issue