buttons in opengl
Moderator: Coders of Rage
buttons in opengl
How would you use sdl to get mouse input in opengl? To be more specific how do you convert event.motion.x to opengls coordinate system or vice versa?
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: buttons in opengl
SDL and OpenGL use the same x coords. OpenGL will let you define the coordinate system you use. But if you need to invert the y just take the screen height and subtract the y value of your mouse event.
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup