I have no idea why I used SDL_CreateWindowAndRenderer, that's only for applications using the SDL_Renderer, not opengl
This commit is contained in:
@@ -60,14 +60,12 @@ void init(State* self)
|
|||||||
log_info(STATE_MIX_INIT_INFO);
|
log_info(STATE_MIX_INIT_INFO);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SDL_CreateWindowAndRenderer
|
self->window = SDL_CreateWindow
|
||||||
(
|
(
|
||||||
WINDOW_TITLE,
|
WINDOW_TITLE,
|
||||||
self->settings.windowSize.x,
|
self->settings.windowSize.x,
|
||||||
self->settings.windowSize.y,
|
self->settings.windowSize.y,
|
||||||
WINDOW_FLAGS,
|
WINDOW_FLAGS
|
||||||
&self->window,
|
|
||||||
&self->renderer
|
|
||||||
);
|
);
|
||||||
|
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
struct State
|
struct State
|
||||||
{
|
{
|
||||||
SDL_Window* window;
|
SDL_Window* window;
|
||||||
SDL_Renderer* renderer;
|
|
||||||
SDL_GLContext glContext;
|
SDL_GLContext glContext;
|
||||||
Imgui imgui;
|
Imgui imgui;
|
||||||
Dialog dialog;
|
Dialog dialog;
|
||||||
|
Reference in New Issue
Block a user