home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Simple fix for OpenGL init

by JeffDC on 10/14/2007 05:02, 4 messages, last message: 10/15/2007 11:18, 1158 views, last view: 04/29/2024 10:21

First I\\\'d like to thank Wouter for the high quality open-source 3D engine he has created and hope he keeps up the good work. Anyway, I downloaded Sauerbraten the other day and upon trying to init video, it threw an exception. So I found it would run with res at 640x480 and 256 colors. Wonderful. Turns out it would only use GDI to render. Now I\\\'m not a coder really, but I went tried some google queries for ATI SDL, etc. I found some coding forums with highly relevant information. It seems the problem is that certain drivers require that you request the number of alpha bits you need, should it be more than zero. So I added \\\"SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE,8)\\\" to to line 513 and now it works great.


PS After I started writing this I tried launching the standard binary and it works. Even after reinstalling I get no error. Bizarre.

   Board Index   

#1: Message censored by administrator

by ATIRULE on 10/14/2007 05:08

#2: ..

by blackdragon on 10/14/2007 19:12

hello,

where most i add it? whitch file?
i have a friend who dont cant play it.

Blackdragon

reply to this message

#3: ..

by JeffDC on 10/15/2007 00:33

Alright, I guess I can give you the rest of the details ;).
Open engine\main.cpp and search for this line:
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
Below it add this line:
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE,8)

My video card is a 9800 PRO with Catalyst 7.10 drivers.


Btw, webmaster: magic_quotes ftl

reply to this message

#4: ..

by blackdragon on 10/15/2007 11:18

thanks

ithink that he can understand it:P

blackdragon

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53873659 visitors requested 71648884 pages
page created in 0.017 seconds using 10 queries
hosted by Boost Digital