Corrected issue with framebuffer size storage #1298

This commit is contained in:
raysan5 2020-07-28 11:44:45 +02:00
parent 488c60d139
commit 20301d1e5d

View file

@ -1078,7 +1078,6 @@ void rlOrtho(double left, double right, double bottom, double top, double znear,
#endif #endif
// Set the viewport area (transformation from normalized device coordinates to window coordinates) // Set the viewport area (transformation from normalized device coordinates to window coordinates)
// NOTE: Updates global variables: RLGL.State.framebufferWidth, RLGL.State.framebufferHeight
void rlViewport(int x, int y, int width, int height) void rlViewport(int x, int y, int width, int height)
{ {
glViewport(x, y, width, height); glViewport(x, y, width, height);
@ -1763,7 +1762,6 @@ void rlglInit(int width, int height)
glClearDepth(1.0f); // Set clear depth value (default) 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) 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 // Store screen size into global variables
RLGL.State.framebufferWidth = width; RLGL.State.framebufferWidth = width;
RLGL.State.framebufferHeight = height; RLGL.State.framebufferHeight = height;
@ -1771,7 +1769,6 @@ void rlglInit(int width, int height)
// Init texture and rectangle used on basic shapes drawing // Init texture and rectangle used on basic shapes drawing
RLGL.State.shapesTexture = GetTextureDefault(); RLGL.State.shapesTexture = GetTextureDefault();
RLGL.State.shapesTextureRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; RLGL.State.shapesTextureRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f };
#endif
TRACELOG(LOG_INFO, "RLGL: Default state initialized successfully"); TRACELOG(LOG_INFO, "RLGL: Default state initialized successfully");
} }