Correct return values in OpenGL3's Backend_Init
This commit is contained in:
parent
006a20b914
commit
ae8437009d
1 changed files with 2 additions and 3 deletions
|
@ -289,11 +289,11 @@ Backend_Surface* Backend_Init(SDL_Window *p_window)
|
||||||
context = SDL_GL_CreateContext(window);
|
context = SDL_GL_CreateContext(window);
|
||||||
|
|
||||||
if (glewInit() != GLEW_OK)
|
if (glewInit() != GLEW_OK)
|
||||||
return FALSE;
|
return NULL
|
||||||
|
|
||||||
// Check if the platform supports OpenGL 3.2
|
// Check if the platform supports OpenGL 3.2
|
||||||
if (!GLEW_VERSION_3_2)
|
if (!GLEW_VERSION_3_2)
|
||||||
return FALSE;
|
return NULL;
|
||||||
|
|
||||||
glEnable(GL_DEBUG_OUTPUT);
|
glEnable(GL_DEBUG_OUTPUT);
|
||||||
glDebugMessageCallback(MessageCallback, 0);
|
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);
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.texture_id, 0);
|
||||||
glViewport(0, 0, framebuffer.width, framebuffer.height);
|
glViewport(0, 0, framebuffer.width, framebuffer.height);
|
||||||
|
|
||||||
|
|
||||||
return &framebuffer;
|
return &framebuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue