Mercurial > hg > forks > gldragon
diff dmglrender.h @ 63:d6ffc59bb84d
Move more of the SDL and GL setup code to the renderer class.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 14 Dec 2019 20:13:32 +0200 |
parents | baccf2044289 |
children | 1d24faa5bfb9 |
line wrap: on
line diff
--- a/dmglrender.h Sat Dec 14 16:39:20 2019 +0200 +++ b/dmglrender.h Sat Dec 14 20:13:32 2019 +0200 @@ -15,17 +15,21 @@ struct DMGLSimpleRenderer : DMSimpleRenderer { - SDL_GLContext glContext; + SDL_GLContext sdlGLContext; DMGLSimpleRenderer() { - glContext = NULL; + sdlWindow = NULL; + sdlGLContext = NULL; } bool checkErrors(void); - bool initRender1(void); - bool initRender2(SDL_Window *window); - bool initRender3(const int width, const int height); + + bool initRenderer1(const char *title, + const int width, const int height, + const int sdlWindowHPos, const int sdlWindowVPos, + const int sdlFlags); + bool initRenderer2(void); void shutdownRenderer(void); void drawModel(const DMSimpleScene &scene, const DMModel &model, const float time);