Correct return values in OpenGL3's Backend_Init

This commit is contained in:
Clownacy 2019-10-26 01:54:43 +01:00
parent 006a20b914
commit ae8437009d

View file

@ -289,11 +289,11 @@ Backend_Surface* Backend_Init(SDL_Window *p_window)
context = SDL_GL_CreateContext(window);
if (glewInit() != GLEW_OK)
return FALSE;
return NULL
// Check if the platform supports OpenGL 3.2
if (!GLEW_VERSION_3_2)
return FALSE;
return NULL;
glEnable(GL_DEBUG_OUTPUT);
glDebugMessageCallback(MessageCallback, 0);
@ -351,7 +351,6 @@ Backend_Surface* Backend_Init(SDL_Window *p_window)
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.texture_id, 0);
glViewport(0, 0, framebuffer.width, framebuffer.height);
return &framebuffer;
}