#1 Members - Reputation: 366
Posted 17 June 2012 - 01:53 PM
So far I've only worked with 3D games, and I know you can use an orthogonal projection matrix to make things look 2D, but is this how most 2D-only games generally work?
I ask because it seems like a lot of overhead to have to deal with the full 3D pipeline of triangle meshes and shaders and 3D matrices when all you want to do is draw some 2D boxes and lines on the screen.
I've heard of Direct2D, for 2D drawing in Windows, but I haven't looked into it at all, and I'm hoping for a cross-platform solution. Other 2D drawing libraries I've seen (i.e. Cairo) seem to be more about image generation, and not hardware-accelerated real-time rendering.
#3 Marketplace Seller - Reputation: 8951
Posted 17 June 2012 - 02:21 PM
If you are using C++, try SDL or SFML. SDL is mostly software based but can do hardware rendering, whereas SFML is fully hardware rendering. SFML is built ontop of OpenGL, and also offers easy window creation and input handling (plus audio via OpenAL).I've heard of Direct2D, for 2D drawing in Windows, but I haven't looked into it at all, and I'm hoping for a cross-platform solution. Other 2D drawing libraries I've seen (i.e. Cairo) seem to be more about image generation, and not hardware-accelerated real-time rendering.
SDL is C or C++, but SFML is designed for C++, with nice small and compact C++ classes. Both are cross platform for at least Windows, Linux, and Mac.
Edited by Servant of the Lord, 17 June 2012 - 02:22 PM.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal






