From 97b5f227669651bc71328296e95df386a31ddf7b Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 2 May 2008 12:37:17 +0000 Subject: Replaced OpenGL12 with SDL's gl/glu/glext units because OpenGL12 was removed from SDL (several years ago? Last update was done in 2004). In addition OpenGL12 was very buggy (see last commit). The new units support OpenGL up to version 2.0 (extensions must be loaded first, see UGraphic.LoadOpenGLExtensions). At the moment, only 1.2 extensions are loaded. Some constants, that were introduced in OpenGL 1.2 and above (like GL_BGR or GL_CLAMP_TO_EDGE) are in glext.pas, so check this file first for missing constants. The MacOS build depends on OpenGL12.pas but has its own file in the MacOSX/Wrapper folder instead of using the JEDI-SDL one. Sorry, that I broke MacOSX build for now but it should be no problem to get this working again. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1052 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Menu/UDisplay.pas | 3 ++- Game/Code/Menu/UDrawTexture.pas | 3 ++- Game/Code/Menu/UMenu.pas | 2 +- Game/Code/Menu/UMenuButton.pas | 2 +- Game/Code/Menu/UMenuSelect.pas | 2 +- Game/Code/Menu/UMenuSelectSlide.pas | 2 +- Game/Code/Menu/UMenuStatic.pas | 2 +- Game/Code/Menu/UMenuText.pas | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) (limited to 'Game/Code/Menu') diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas index 9ce81983..7d31e578 100644 --- a/Game/Code/Menu/UDisplay.pas +++ b/Game/Code/Menu/UDisplay.pas @@ -12,7 +12,8 @@ uses ucommon, SDL, UMenu, - OpenGL12, + gl, + glu, SysUtils; type diff --git a/Game/Code/Menu/UDrawTexture.pas b/Game/Code/Menu/UDrawTexture.pas index de20bd4b..3dddaabc 100644 --- a/Game/Code/Menu/UDrawTexture.pas +++ b/Game/Code/Menu/UDrawTexture.pas @@ -11,7 +11,8 @@ procedure DrawQuad(X, Y, W, H, ColR, ColG, ColB: real); procedure DrawTexture(Texture: TTexture); implementation -uses OpenGL12; + +uses gl; procedure DrawLine(X1, Y1, X2, Y2, ColR, ColG, ColB: real); begin diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas index a5d14cdb..eb5c49a0 100644 --- a/Game/Code/Menu/UMenu.pas +++ b/Game/Code/Menu/UMenu.pas @@ -8,7 +8,7 @@ interface {$I switches.inc} -uses OpenGL12, SysUtils, UTexture, UMenuStatic, UMenuText, UMenuButton, UMenuSelect, UMenuSelectSlide, +uses gl, SysUtils, UTexture, UMenuStatic, UMenuText, UMenuButton, UMenuSelect, UMenuSelectSlide, UMenuInteract, UThemes, UMenuButtonCollection, Math, UMusic; type diff --git a/Game/Code/Menu/UMenuButton.pas b/Game/Code/Menu/UMenuButton.pas index 8cda0b1d..2a6861a5 100644 --- a/Game/Code/Menu/UMenuButton.pas +++ b/Game/Code/Menu/UMenuButton.pas @@ -4,7 +4,7 @@ interface {$I switches.inc} -uses TextGL, UTexture, OpenGL12, UMenuText,SDL; +uses TextGL, UTexture, gl, UMenuText,SDL; type CButton = class of TButton; diff --git a/Game/Code/Menu/UMenuSelect.pas b/Game/Code/Menu/UMenuSelect.pas index b0ee2b78..0699868b 100644 --- a/Game/Code/Menu/UMenuSelect.pas +++ b/Game/Code/Menu/UMenuSelect.pas @@ -4,7 +4,7 @@ interface {$I switches.inc} -uses TextGL, UTexture, OpenGL12, UMenuText; +uses TextGL, UTexture, gl, UMenuText; type PSelect = ^TSelect; diff --git a/Game/Code/Menu/UMenuSelectSlide.pas b/Game/Code/Menu/UMenuSelectSlide.pas index d52474e6..76299e80 100644 --- a/Game/Code/Menu/UMenuSelectSlide.pas +++ b/Game/Code/Menu/UMenuSelectSlide.pas @@ -10,7 +10,7 @@ interface uses TextGL, UTexture, - OpenGL12, + gl, UMenuText; type diff --git a/Game/Code/Menu/UMenuStatic.pas b/Game/Code/Menu/UMenuStatic.pas index a2c709ad..320f3851 100644 --- a/Game/Code/Menu/UMenuStatic.pas +++ b/Game/Code/Menu/UMenuStatic.pas @@ -4,7 +4,7 @@ interface {$I switches.inc} -uses UTexture, OpenGL12; +uses UTexture, gl; type TStatic = class diff --git a/Game/Code/Menu/UMenuText.pas b/Game/Code/Menu/UMenuText.pas index 25264c64..4b376a90 100644 --- a/Game/Code/Menu/UMenuText.pas +++ b/Game/Code/Menu/UMenuText.pas @@ -10,7 +10,7 @@ interface uses TextGL, UTexture, - OpenGL12, + gl, SysUtils, SDL; -- cgit v1.2.3