Skip to main content
gamedev.net
🔒 Locked

SDL

Started by ShlomiSteinberg 2 replies 550+ views
Original Post
ShlomiSteinberg
ShlomiSteinberg
I am working on a project that uses OpenGL and I want to port it to Linux using SDL, however without including windows.h all the typedefs, #defines and functions I use (like QueryPerformanceCounter and LONGLONG) are unavailable. What can I do? Should I #define and typedef what I need and use other alternative for the APIs? "C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Member of the Shove Pouya Off A Cliff club, SPOAC. (If you wish to join, add this line to your signature.)Member of "Un-Ban nes8bit" association, UNA (to join put this in your sig)
azimuth
azimuth
SDL has its own types that you can use so that it will compile on any system. You''re better off changing to those instead of writing your own defines. That way, you could still compile it on Windows without much source changing.
ShlomiSteinberg
ShlomiSteinberg
Where can I get a guide of SDL types?

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Member of the Shove Pouya Off A Cliff club, SPOAC. (If you wish to join, add this line to your signature.)Member of "Un-Ban nes8bit" association, UNA (to join put this in your sig)
azimuth
azimuth
Go to http://www.libsdl.org/ , and click on "Documentation"
Alternatively, look at the SDL header files to see what they do.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.