diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-23 13:59:07 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-23 13:59:07 (GMT) |
| commit | f5547f267b9e73be3d8153df3dd36d7e3b69a2d9 (patch) | |
| tree | d34603fa1776beac9009c42f77126db434891546 /src/PowderToySDL.cpp | |
| parent | 4cf42e786bd0e2871a5bc580bed14f4d2c742788 (diff) | |
| download | powder-f5547f267b9e73be3d8153df3dd36d7e3b69a2d9.zip powder-f5547f267b9e73be3d8153df3dd36d7e3b69a2d9.tar.gz | |
Option to use OpenGL JUST for the interface
Diffstat (limited to 'src/PowderToySDL.cpp')
| -rw-r--r-- | src/PowderToySDL.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index a8bb9a0..079986a 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -38,7 +38,7 @@ extern "C" IMAGE_DOS_HEADER __ImageBase; SDL_Surface * sdl_scrn; -#ifdef OGLR +#ifdef OGLI void blit() { SDL_GL_SwapBuffers(); @@ -110,13 +110,13 @@ SDL_Surface * SDLOpen() SDL_WM_SetCaption("The Powder Toy", "Powder Toy"); //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); -#ifndef OGLR +#ifndef OGLI surface = SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); #else surface = SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_OPENGL); #endif -#if defined(OGLR) +#if defined(OGLI) int status = glewInit(); if(status != GLEW_OK) { @@ -135,7 +135,7 @@ int main(int argc, char * argv[]) float fps = 0, delta = 1.0f; sdl_scrn = SDLOpen(); -#ifdef OGLR +#ifdef OGLI SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); #endif @@ -195,14 +195,14 @@ int main(int argc, char * argv[]) engine->Tick(); engine->Draw(); - if(SDL_GetTicks()-lastTick>1000) + if(SDL_GetTicks()-lastTick>500) { //Run client tick every second lastTick = SDL_GetTicks(); Client::Ref().Tick(); } -#ifdef OGLR +#ifdef OGLI blit(); #else blit(engine->g->vid); |
