prog
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "display/spritebatch/spritebatch.h"
|
||||
#include "display/mesh/quad.h"
|
||||
#include "game/game.h"
|
||||
#include "display/screen.h"
|
||||
|
||||
display_t DISPLAY;
|
||||
|
||||
@@ -71,6 +72,7 @@ errorret_t displayInit(void) {
|
||||
quadInit();
|
||||
frameBufferInitBackbuffer();
|
||||
spriteBatchInit();
|
||||
screenInit();
|
||||
|
||||
errorOk();
|
||||
}
|
||||
@@ -106,11 +108,19 @@ errorret_t displayUpdate(void) {
|
||||
|
||||
SDL_GL_MakeCurrent(DISPLAY.window, DISPLAY.glContext);
|
||||
#endif
|
||||
|
||||
|
||||
// Reset state
|
||||
spriteBatchClear();
|
||||
frameBufferBind(NULL);
|
||||
|
||||
// Bind screen and render scene
|
||||
screenBind();
|
||||
sceneManagerRender();
|
||||
|
||||
// Finish up
|
||||
spriteBatchFlush();
|
||||
screenUnbind();
|
||||
screenRender();
|
||||
|
||||
#if DISPLAY_SDL2
|
||||
SDL_GL_SwapWindow(DISPLAY.window);
|
||||
@@ -127,6 +137,7 @@ errorret_t displayUpdate(void) {
|
||||
|
||||
errorret_t displayDispose(void) {
|
||||
spriteBatchDispose();
|
||||
screenDispose();
|
||||
|
||||
#if DISPLAY_SDL2
|
||||
if(DISPLAY.glContext) {
|
||||
|
Reference in New Issue
Block a user