diff options
| author | Ray <[email protected]> | 2017-09-26 09:13:16 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-26 09:13:16 +0200 |
| commit | 4a63e5dfb3006483cace85c8161d12057a9e8488 (patch) | |
| tree | 53f1ca68df7c2d398a157a825c21fc4ea704f07d /src/rlgl.c | |
| parent | 7ca90d87f9fa6f399d3316df347c63baf0eb675d (diff) | |
| parent | 5ace947a809d32d0177334933b0709b3164a79d5 (diff) | |
| download | raylib-4a63e5dfb3006483cace85c8161d12057a9e8488.tar.gz raylib-4a63e5dfb3006483cace85c8161d12057a9e8488.zip | |
Merge pull request #360 from raysan5/develop
Integrate Develop branch
Diffstat (limited to 'src/rlgl.c')
| -rw-r--r-- | src/rlgl.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -418,7 +418,6 @@ void rlPushMatrix(void) } stack[stackCounter] = *currentMatrix; - rlLoadIdentity(); stackCounter++; if (currentMatrixMode == RL_MODELVIEW) useTempBuffer = true; @@ -814,6 +813,12 @@ void rlEnableTexture(unsigned int id) if (draws[drawsCounter - 1].textureId != id) { if (draws[drawsCounter - 1].vertexCount > 0) drawsCounter++; + + if (drawsCounter >= MAX_DRAWS_BY_TEXTURE) + { + rlglDraw(); + drawsCounter = 1; + } draws[drawsCounter - 1].textureId = id; draws[drawsCounter - 1].vertexCount = 0; @@ -2207,7 +2212,6 @@ void *rlReadTexturePixels(Texture2D texture) // 2 - Create an fbo, activate it, render quad with texture, glReadPixels() #define GET_TEXTURE_FBO_OPTION_1 // It works - #if defined(GET_TEXTURE_FBO_OPTION_1) glBindFramebuffer(GL_FRAMEBUFFER, fbo.id); glBindTexture(GL_TEXTURE_2D, 0); @@ -2941,7 +2945,7 @@ void ToggleVrMode(void) // Reset viewport and default projection-modelview matrices 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(); } else vrStereoRender = true; @@ -3043,7 +3047,7 @@ void EndVrDrawing(void) // Reset viewport and default projection-modelview matrices 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(); rlDisableDepthTest(); |
