REVIEWED: Software renderer flag, renamed to GRAPHICS_API_OPENGL_SOFTWARE

Dropped the `11` relative to OpenGL 1.1 because latest `rlsw 1.5` also includes support for FBOs and could potentially implemented other higher level features in the feature, discerning from OpenGL 1.1 limitations
This commit is contained in:
Ray
2026-03-17 18:33:15 +01:00
parent 6ddf9a1885
commit 18756bb79d
8 changed files with 50 additions and 50 deletions

View File

@ -60,7 +60,7 @@
#include "SDL.h"
#endif
#if !defined(GRAPHICS_API_OPENGL_11_SOFTWARE)
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
#if defined(GRAPHICS_API_OPENGL_ES2)
// It seems it does not need to be included to work
//#include "SDL_opengles2.h"
@ -1259,7 +1259,7 @@ void DisableCursor(void)
// Swap back buffer with front buffer (screen drawing)
void SwapScreenBuffer(void)
{
#if defined(GRAPHICS_API_OPENGL_11_SOFTWARE)
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
// NOTE: Using a preprocessor condition here because rlCopyFramebuffer() is only declared for software rendering
SDL_Surface *surface = SDL_GetWindowSurface(platform.window);
rlCopyFramebuffer(0, 0, CORE.Window.render.width, CORE.Window.render.height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, surface->pixels);
@ -1981,7 +1981,7 @@ int InitPlatform(void)
// NOTE: Some OpenGL context attributes must be set before window creation
if (rlGetVersion() != RL_OPENGL_11_SOFTWARE)
if (rlGetVersion() != RL_OPENGL_SOFTWARE)
{
// Add the flag telling the window to use an OpenGL context
flags |= SDL_WINDOW_OPENGL;
@ -2044,12 +2044,12 @@ int InitPlatform(void)
#endif
// Init OpenGL context
if (rlGetVersion() != RL_OPENGL_11_SOFTWARE)
if (rlGetVersion() != RL_OPENGL_SOFTWARE)
{
platform.glContext = SDL_GL_CreateContext(platform.window);
}
if ((platform.window != NULL) && ((rlGetVersion() == RL_OPENGL_11_SOFTWARE) || (platform.glContext != NULL)))
if ((platform.window != NULL) && ((rlGetVersion() == RL_OPENGL_SOFTWARE) || (platform.glContext != NULL)))
{
CORE.Window.ready = true;