open gl
I am designing a asteroids/space invaders game with wire frame space ships using open gl. I have two space ships drawn on the screen but they overlap each other, I want them to move independtly with keyboard interaction, I am using gl_line_strip and some function (renderscene) calls, I am very new to open gl and could use any help I can get, thanks
i want to draw two space ships on the screen independent of each other, using open gl I want to interact with them using the keyboard
Phil,
No offense, but that seems less like a simple question and more like a "how do I write a game". Its going to be very tough to get anyone to answer such a broad question.
With that being said, I'll give you an overview. First, OpenGL is strictly a rendering api and has nothing to do with user input. You'll need to use either the standard win32 api or DirectInput if you want to capture keyboard/mouse events.
As for rendering multiple ships. You need to send the ship to the renderer multiple times. Each time you set a different world transform matrix. In doing this, the renderer will draw it in a different location.
Beyond the above, the rest is really part of being a solid C++ programmer. Divide and Conquer. Take larger problems, break them up into smaller problems, and then solve them one step at a time.
Good Luck!
No offense, but that seems less like a simple question and more like a "how do I write a game". Its going to be very tough to get anyone to answer such a broad question.
With that being said, I'll give you an overview. First, OpenGL is strictly a rendering api and has nothing to do with user input. You'll need to use either the standard win32 api or DirectInput if you want to capture keyboard/mouse events.
As for rendering multiple ships. You need to send the ship to the renderer multiple times. Each time you set a different world transform matrix. In doing this, the renderer will draw it in a different location.
Beyond the above, the rest is really part of being a solid C++ programmer. Divide and Conquer. Take larger problems, break them up into smaller problems, and then solve them one step at a time.
Good Luck!
What about openIL? :-p (to the OP, openIL is not related to openGL at all, just in name and most likely shares openGL's procedural style)
(you know what would be cool? if openAL, openGL, openIL came together to make somewhat of a competitor for ALL of DirectX)
anywho... that was useless...
-Dan
(you know what would be cool? if openAL, openGL, openIL came together to make somewhat of a competitor for ALL of DirectX)
anywho... that was useless...
-Dan
Quote:Original post by Ademan555you forgot SDL for user input and threading </offtopic>
(you know what would be cool? if openAL, openGL, openIL came together to make somewhat of a competitor for ALL of DirectX)
anyway, as jwalsh said, you should ask a more specific question, maybe ask many questions, just make them more specific than "how do I make a game?"(btw, OpenGL is for graphics ONLY, no input, try using a library like SDL or GLUT and OpenGL together)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement