![]() |
|
Graphics API's - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: C, C++, & Obj-C (https://sinister.li/Forum-C-C-Obj-C) +--- Thread: Graphics API's (/Thread-Graphics-API-s) |
Graphics API's - Burning Taco - 09-14-2015 So I want to learn C++ to develop games and I'm wondering how game code communicates with graphics API's such as Direct X and OpenGL RE: Graphics API's - bitm0de - 09-14-2015 What do you mean how game code interacts with the graphics API's? You create your own game logic and the drawing methods are a reflection of that on its own side. If you are storing the position of a ball and an object, and you determine that the properties of the positions of the 2 things define a collision, then you write code to make the ball bounce off and start moving away from the object and draw the ball at the updated positions every frame drawn from that point forward. You're responsible for the game logic and drawing methods that reflect the game state. RE: Graphics API's - Dijkstra - 09-15-2015 You use OpenGL to blit to the screen. Everything else is you. At the basics of game development, you have your game loop that constantly calls "update" and "render" which do exactly what they are called. The logic of the game is in your hands and OpenGL does nothing but give the user visuals. |