diff options
| author | Ray <[email protected]> | 2020-06-27 14:10:53 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-06-27 14:10:53 +0200 |
| commit | 5b294b7cff6bb43ef2234f618187c344488b4cc3 (patch) | |
| tree | 4505cd69d961b490d4c662d7fc742b9b40ffda28 /src | |
| parent | 03846342bbb0a8b6b99025467bc6038119cf71ee (diff) | |
| download | raylib-5b294b7cff6bb43ef2234f618187c344488b4cc3.tar.gz raylib-5b294b7cff6bb43ef2234f618187c344488b4cc3.zip | |
Corrected issue with OpenGL 1.1 support
Diffstat (limited to 'src')
| -rw-r--r-- | src/rlgl.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1761,6 +1761,7 @@ void rlglInit(int width, int height) glClearDepth(1.0f); // Set clear depth value (default) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear color and depth buffers (depth buffer required for 3D) +#if defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_21) // Store screen size into global variables RLGL.State.framebufferWidth = width; RLGL.State.framebufferHeight = height; @@ -1768,6 +1769,7 @@ void rlglInit(int width, int height) // Init texture and rectangle used on basic shapes drawing RLGL.State.shapesTexture = GetTextureDefault(); RLGL.State.shapesTextureRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; +#endif TRACELOG(LOG_INFO, "RLGL: Default state initialized successfully"); } @@ -2974,20 +2976,32 @@ Texture2D GetTextureDefault(void) // Get texture to draw shapes (RAII) Texture2D GetShapesTexture(void) { +#if defined(GRAPHICS_API_OPENGL_11) + Texture2D texture = { 0 }; + return texture; +#else return RLGL.State.shapesTexture; +#endif } // Get texture rectangle to draw shapes Rectangle GetShapesTextureRec(void) { +#if defined(GRAPHICS_API_OPENGL_11) + Rectangle rec = { 0 }; + return rec; +#else return RLGL.State.shapesTextureRec; +#endif } // Define default texture used to draw shapes void SetShapesTexture(Texture2D texture, Rectangle source) { +#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) RLGL.State.shapesTexture = texture; RLGL.State.shapesTextureRec = source; +#endif } // Get default shader |
