Archived

This topic is now archived and is closed to further replies.

Cross platform portability?

This topic is 5943 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A question about OpenGL and porting between platforms... I have some existing code that uses X specific data structures (e.g., GLXDrawable). I want to port this code to Macintosh, which doesn''t use the X data structures, but uses some similar ones (e.g., AGLDrawable). Is conditional compilation the general solution for this type of thing? Or is there a better solution within the OpenGL framework? Thanks. rheiser

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There is stil GLUT, but that''s not always a good solution.
I would include everything system specific in a seperate source file, divided by ifdef''s, and with a standard API. Don''t put multi-platform conditional compilation commands in your general code - that''s going to be #ifdef hell. But if you isolate everything, then this is IMO the best way to do it.

- Alex

Share this post


Link to post
Share on other sites