Advertisement

X11 on Mac OSX

Started by April 04, 2005 02:13 PM
4 comments, last by Icefox 19 years, 7 months ago
Hey guys.. I'm considering porting a game project of mine from Windows to OSX for educational (and recreational) purposes. I don't yet have access to a mac but I'm trying to look through the possibilities. The game's already using OpenGL so that's not an issue. I'm looking at the various available cross-platform APIs that allow you to create windows and provide basic keyboard input access and stuff like that. If possible I'd really like to use one that provides font rendering, but most of the obvious ones (GLUT and its clones) seem to support X11 but not OSX. I know OSX is an X server.. does that mean that any library that's written to X11 will actually built and run on OSX?
Use SDL, it's exactly what you are looking for. Then the little bit of porting (nearly none at all) will be painless.

Oh and no, libs on x11 don't nativly work on OSX, but you can get x11 installed on OSX and run anything for x11 on OSX with a simple recompile.


-----------------------I wanna know everything....I wanna do something that matters.
Advertisement
Thanks. As far as I can tell SDL provides no support for font rendering, although it looks like there are some extensions to that end. I'll look into those.
Nah best thing to do for font rendering is either check out nehe's tutorials for TTF's or just use bitmap fonts, which is just a single texture full of letters and symbols then tex-coord onto a quad for each letter.
-----------------------I wanna know everything....I wanna do something that matters.
Font rendering is a snap to do, I'm sure you'll find plenty of resources in the OpenGL/NeHe forums.
There's an extension module called sdl_ttf that does basic Truetype font rendering.

http://www.libsdl.org/projects/SDL_ttf/
-----http://alopex.liLet's Program: http://youtube.com/user/icefox192

This topic is closed to new replies.

Advertisement