Corrected out-of-bounds array issue
This commit is contained in:
parent
f3f6d3fd8e
commit
1d91a46008
@ -69,6 +69,7 @@
|
|||||||
#define SUPPORT_FILEFORMAT_WAV
|
#define SUPPORT_FILEFORMAT_WAV
|
||||||
#define SUPPORT_FILEFORMAT_OGG
|
#define SUPPORT_FILEFORMAT_OGG
|
||||||
#define SUPPORT_FILEFORMAT_XM
|
#define SUPPORT_FILEFORMAT_XM
|
||||||
|
#define SUPPORT_FILEFORMAT_MOD
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
#if defined(AUDIO_STANDALONE)
|
#if defined(AUDIO_STANDALONE)
|
||||||
|
10
src/rlgl.c
10
src/rlgl.c
@ -815,6 +815,12 @@ void rlEnableTexture(unsigned int id)
|
|||||||
{
|
{
|
||||||
if (draws[drawsCounter - 1].vertexCount > 0) drawsCounter++;
|
if (draws[drawsCounter - 1].vertexCount > 0) drawsCounter++;
|
||||||
|
|
||||||
|
if (drawsCounter >= MAX_DRAWS_BY_TEXTURE)
|
||||||
|
{
|
||||||
|
rlglDraw();
|
||||||
|
drawsCounter = 1;
|
||||||
|
}
|
||||||
|
|
||||||
draws[drawsCounter - 1].textureId = id;
|
draws[drawsCounter - 1].textureId = id;
|
||||||
draws[drawsCounter - 1].vertexCount = 0;
|
draws[drawsCounter - 1].vertexCount = 0;
|
||||||
}
|
}
|
||||||
@ -2941,7 +2947,7 @@ void ToggleVrMode(void)
|
|||||||
|
|
||||||
// Reset viewport and default projection-modelview matrices
|
// Reset viewport and default projection-modelview matrices
|
||||||
rlViewport(0, 0, screenWidth, screenHeight);
|
rlViewport(0, 0, screenWidth, screenHeight);
|
||||||
projection = MatrixOrtho(0, screenWidth, screenHeight, 0, 0.0f, 1.0f);
|
projection = MatrixOrtho(0.0, screenWidth, screenHeight, 0.0, 0.0, 1.0);
|
||||||
modelview = MatrixIdentity();
|
modelview = MatrixIdentity();
|
||||||
}
|
}
|
||||||
else vrStereoRender = true;
|
else vrStereoRender = true;
|
||||||
@ -3043,7 +3049,7 @@ void EndVrDrawing(void)
|
|||||||
|
|
||||||
// Reset viewport and default projection-modelview matrices
|
// Reset viewport and default projection-modelview matrices
|
||||||
rlViewport(0, 0, screenWidth, screenHeight);
|
rlViewport(0, 0, screenWidth, screenHeight);
|
||||||
projection = MatrixOrtho(0, screenWidth, screenHeight, 0, 0.0f, 1.0f);
|
projection = MatrixOrtho(0.0, screenWidth, screenHeight, 0.0, 0.0, 1.0);
|
||||||
modelview = MatrixIdentity();
|
modelview = MatrixIdentity();
|
||||||
|
|
||||||
rlDisableDepthTest();
|
rlDisableDepthTest();
|
||||||
|
Loading…
Reference in New Issue
Block a user