diff -up methane-1.5.0/sources/global.h.gl1 methane-1.5.0/sources/global.h --- methane-1.5.0/sources/global.h.gl1 2009-10-01 18:03:01.000000000 +0200 +++ methane-1.5.0/sources/global.h 2009-11-16 12:10:16.000000000 +0100 @@ -18,7 +18,8 @@ enum RenderTarget { - opengl, + opengl1, + opengl2, gdi }; diff -up methane-1.5.0/sources/methane.cpp.gl1 methane-1.5.0/sources/methane.cpp --- methane-1.5.0/sources/methane.cpp.gl1 2009-11-16 12:08:28.000000000 +0100 +++ methane-1.5.0/sources/methane.cpp 2009-11-16 12:10:32.000000000 +0100 @@ -25,6 +25,7 @@ #include <ClanLib/display.h> #include <ClanLib/gdi.h> #include <ClanLib/gl.h> +#include <ClanLib/gl1.h> #include <ClanLib/sound.h> #include <ClanLib/mikmod.h> @@ -34,7 +35,7 @@ FILE *methanescoresfptr = NULL; -RenderTarget GLOBAL_RenderTarget = opengl; +RenderTarget GLOBAL_RenderTarget = gdi; bool GLOBAL_SoundEnable = true; bool GLOBAL_FullScreenEnable = true; @@ -78,7 +79,8 @@ public: CL_ConsoleWindow console("Console"); try { - CL_SetupGL target_opengl; + CL_SetupGL1 target_opengl1; + CL_SetupGL target_opengl2; CL_SetupGDI target_gdi; // Since GDI is compatible and fast - Use that as the default setting options @@ -88,11 +90,15 @@ public: { switch (GLOBAL_RenderTarget) { - case (opengl): - target_opengl.set_current(); + case opengl1: + target_opengl1.set_current(); break; - case (gdi): + case opengl2: + target_opengl2.set_current(); + break; + + case gdi: target_gdi.set_current(); break; } @@ -324,13 +330,17 @@ public: if ( (LastKey == 'g') || (LastKey == 'G') ) { LastKey = 0; - if (GLOBAL_RenderTarget == opengl) - { - GLOBAL_RenderTarget = gdi; - }else - { - GLOBAL_RenderTarget = opengl; - } + switch (GLOBAL_RenderTarget) { + case opengl1: + GLOBAL_RenderTarget = opengl2; + break; + case opengl2: + GLOBAL_RenderTarget = gdi; + break; + case gdi: + GLOBAL_RenderTarget = opengl1; + break; + } } if ( (LastKey == 'f') || (LastKey == 'F') ) @@ -344,13 +354,16 @@ public: int ypos = 40; options_font.draw_text(gc, 10, ypos, "Global Options"); ypos += 50; - if (GLOBAL_RenderTarget == opengl) - { - options_font.draw_text(gc, 10, ypos, "OpenGL - Enabled. Press 'G' to modify"); - } - else - { + switch (GLOBAL_RenderTarget) { + case opengl1: + options_font.draw_text(gc, 10, ypos, "OpenGL - Version 1. Press 'G' to modify"); + break; + case opengl2: + options_font.draw_text(gc, 10, ypos, "OpenGL - Version 2. Press 'G' to modify"); + break; + case gdi: options_font.draw_text(gc, 10, ypos, "OpenGL - Disabled. Press 'G' to modify"); + break; } ypos += 50; if (GLOBAL_SoundEnable) diff -up methane-1.5.0/Makefile~ methane-1.5.0/Makefile --- methane-1.5.0/Makefile~ 2009-10-22 10:33:21.000000000 +0200 +++ methane-1.5.0/Makefile 2009-11-16 12:14:00.000000000 +0100 @@ -1,5 +1,5 @@ METHANE_FLAGS = -DENABLE_SOUND `pkg-config --cflags clanCore-2.1 clanDisplay-2.1 clanApp-2.1 clanGL-2.1 clanGDI-2.1 clanSound-2.1 clanMikMod-2.1` -METHANE_LIBS = `pkg-config --libs clanCore-2.1 clanDisplay-2.1 clanApp-2.1 clanGL-2.1 clanGDI-2.1 clanSound-2.1 clanMikMod-2.1` +METHANE_LIBS = `pkg-config --libs clanCore-2.1 clanDisplay-2.1 clanApp-2.1 clanGL-2.1 clanGL1-2.1 clanGDI-2.1 clanSound-2.1 clanMikMod-2.1` OBJF = build/game.o build/baddie.o build/methane.o build/target.o build/maps.o build/gfxoff.o build/mapdata.o build/objlist.o build/doc.o build/bitdraw.o build/global.o build/suck.o build/power.o build/goodie.o build/bititem.o build/player.o build/weapon.o build/bitgroup.o build/boss.o build/sound.o build/gasobj.o build/misc.o diff -up methane-1.5.0/sources/target.cpp~ methane-1.5.0/sources/target.cpp --- methane-1.5.0/sources/target.cpp~ 2009-10-22 10:47:43.000000000 +0200 +++ methane-1.5.0/sources/target.cpp 2009-11-16 12:12:31.000000000 +0100 @@ -312,7 +312,7 @@ void CGameTarget::InitGame() m_MOD_tune2 = CL_SoundBuffer(filename); } - if (GLOBAL_RenderTarget == opengl) + if (GLOBAL_RenderTarget == opengl2) { CL_ShaderObject vertex_shader(gc, cl_shadertype_vertex, Shader_Vertex_White); @@ -623,7 +623,7 @@ void CGameTarget::Draw(int dest_xpos, in CL_Rectf source = CL_Rectf(texture_xpos, texture_ypos, (texture_xpos+width), (texture_ypos+height)); - if (GLOBAL_RenderTarget == opengl) + if (GLOBAL_RenderTarget == opengl2) { gc.set_texture(0, m_Texture[texture_number]);