]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Updated stuff to fix bork
authorAndy Belle-Isle <abelleisle@roadrunner.com>
Tue, 8 Sep 2015 22:26:43 +0000 (18:26 -0400)
committerAndy Belle-Isle <abelleisle@roadrunner.com>
Tue, 8 Sep 2015 22:27:01 +0000 (18:27 -0400)
Makefile
include/common.h
src/main.cpp

index 13a7119654c4d3a39d14bcbb0d0a96f6bedf6e25..083b86b1dcb6a329d391c369887bc140256952f1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,10 @@ FLAGS_WIN32 = -lopengl32 -lmingw32 #-lSDL2_Image
 FLAGS = -m32 -Iinclude -Wall -Werror -lSDL2main -lSDL2
 
 all:
-       @g++ src/main.cpp src/UIClass.cpp src/Quest.cpp -o main $(FLAGS_LINUX) $(FLAGS)
+       @g++ src/main.cpp src/UIClass.cpp src/windowClass.cpp src/Quest.cpp -o main $(FLAGS_LINUX) $(FLAGS)
 
 win32:
-       @g++ -L lib/ src/main.cpp src/UIClass.cpp -o main.exe $(FLAGS_WIN32) $(FLAGS)
+       @g++ -L lib/ src/main.cpp src/UIClass.cpp src/windowClass.cpp src/Quest.cpp -o main.exe $(FLAGS_WIN32) $(FLAGS)
 
 clean:
        rm main*
index db0824b0075185f4256414e3674b58bd2a8e5d98..4b05e5d5a483db94ad9006cb9ff1a20de929ce46 100644 (file)
@@ -8,6 +8,7 @@
 #include <SDL2/SDL.h>
 #include <SDL2/SDL_opengl.h>
 #include <UIClass.h>
+#include <windowClass.h>
 
 #define SCREEN_WIDTH 1280
 #define SCREEN_HEIGHT 720
index 78163db2e0dd25d5ccf633c64eda67993db14ca0..9ce98a18421797179843fd50e62f45dde4749429 100644 (file)
@@ -7,6 +7,7 @@ SDL_GLContext  mainGLContext = NULL;
 bool gameRunning = true;
 
 UIClass ui;
+Window win;
 
 int main(int argc,char **argv){
     //runs start-up procedures
@@ -38,12 +39,10 @@ int main(int argc,char **argv){
        ****     GAMELOOP      ****
        **************************/
        
-       glClearColor(1,1,1,0);
+       win.setupRender();
        while(gameRunning){
-               glClear(GL_COLOR_BUFFER_BIT);
-               SDL_GL_SwapWindow(window);
-               
                ui.handleEvents();
+               win.render();
        }
        
        /**************************