[SDL] [WIP]my opengl gui project

Simon Roby simon.roby at gmail.com
Fri Jan 12 23:32:55 PST 2007


On 1/13/07, Bill Conan <billconan at gmail.com> wrote:
> the test project can be download here:
>
> http://www.box.net/public/0qh74jhzm5#f4286161
>
> but, right now it is windows only, because i used too many "#pragma
> once" and two lines of system calls to detect the system resolution.

"#pragma once" is not standard C (even though it is standard ObjC),
but it sure as hell isn't windows-only. Most versions of gcc support
it.

> SDL do not support resolution detection, right?

Yes, it does. Since SDL 1.2.10, SDL_VideoInfo contains the current
resolution's width and height in current_w and current_h,
respectively. You can also pass 0 to the width and height parameters
of SDL_SetVideoMode() to use the current desktop resolution. Check the
wiki for more details.
-- 
- SR




More information about the SDL mailing list