Advertisement Jump to content
Sign in to follow this  

SDL Equivalent of Win32's POINT

This topic is 3872 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 quick search on Google lead nowhere, so I'm asking here. It would be good to use as a variable for velocity but is there something like this in SDL? Or should I just use two int's?

Share this post

Link to post
Share on other sites
SDL actually uses SDL_Rect for the same purpose, some of the time, and just ignores the .w and .h members. (For example, when positioning a image)

As mentioned, you can just create your own, as a simple struct.
struct SDL_Point
Uint32 x; //You could use Sint32 also, for a unsigned int.
Uint32 y;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!