Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "GuiGame.h"
- #include "../../Engine/engine.h"
- #include "../../../Main/main.h"
- #include "../../../Map/User/User.h"
- #include "../../../Map/map.h"
- #include "../../../../3D/Render/Engine/sdlglutils.h"
- #include "../../../../Logger/logger.h"
- #include "../Hud/Hud.h"
- #include <gl.h>
- #include <glu.h>
- void GuiGame::initGui()
- {
- SDL_GL_CreateContext(screen);
- glBasics();
- initializeMapRender();
- addUser(username);
- }
- void GuiGame::renderGui()
- {
- glBasics();
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- camera->look();
- renderUsers();
- renderMap();
- drawAxis();
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- prepare2D();
- renderHud();
- if(actualGuiInGame != "")
- renderGuiInGame();
- }
- void GuiGame::resizeGui()
- {
- glViewport(0, 0, windowWidth, windowHeight);
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho( 0, windowWidth, windowHeight, 0, -1, 1 );
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- }
- bool GuiGame::isDynamic()
- {
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement