aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-22 14:58:20 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-22 14:58:20 +0000
commit15dd96cc03fe7780608cf42a2e66fb1fa3742e59 (patch)
tree87cc8c2ca33f30394f738436e850f7c40e1d60b3 /src/base
parent0214da20cb257aba5a8a9bca35c22efddf3004f3 (diff)
downloadusdx-15dd96cc03fe7780608cf42a2e66fb1fa3742e59.tar.gz
usdx-15dd96cc03fe7780608cf42a2e66fb1fa3742e59.tar.xz
usdx-15dd96cc03fe7780608cf42a2e66fb1fa3742e59.zip
Without SDL_GL_ALPHA_SIZE the lyrics won't work anymore on some systems as the offscreen lyrics rendering needs an alpha component in the back-buffer.
-> Leave SDL_GL_ALPHA_SIZE until the lyrics-engine is changed. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1394 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base')
-rw-r--r--src/base/UGraphic.pas18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/base/UGraphic.pas b/src/base/UGraphic.pas
index 724e3bed..93fac85c 100644
--- a/src/base/UGraphic.pas
+++ b/src/base/UGraphic.pas
@@ -557,15 +557,21 @@ begin
Screens := Ini.Screens + 1;
// Set minimum color component sizes
- // Note: Do NOT use SDL_GL_ALPHA_SIZE here, otherwise on a few systems with
- // some versions of SDL (at least 1.2.11) SDL_SetVideoMode will fail.
- // The problem occured if the adjusted color component sizes did not leave
- // any space for alpha, e.g. red/green/blue ajusted from 5 to 8:
- // r_size+g_size+b_size = 24, so an alpha of at least 5 is just available if
- // the depth is 32bit.
+ // Note:
+ // - SDL_GL_ALPHA_SIZE should not be set here, otherwise on a few systems with
+ // some versions of SDL (at least 1.2.11) SDL_SetVideoMode will fail.
+ // The problem occured if the adjusted color component sizes did not leave
+ // any space for alpha, e.g. red/green/blue ajusted from 5 to 8:
+ // r_size+g_size+b_size = 24, so an alpha of at least 5 is just available if
+ // the depth is 32bit.
+ // - Without SDL_GL_ALPHA_SIZE the lyrics won't work anymore on some systems
+ // as the offscreen lyrics rendering needs an alpha component in the
+ // back-buffer.
+ // -> Leave SDL_GL_ALPHA_SIZE until the lyrics-engine is changed.
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
+ SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); // Z-Buffer depth
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);