Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

OpenGL 2D Book

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 Jacob Jingle   Members   

226
Like
0Likes
Like

Posted 29 November 2012 - 09:11 AM

Anyone have a good recommandation for an OpenGL book for learning 2d graphics? (C++/Windows/OpenGL 4.3 preferred)

Thx ahead of time,
JJ

#2 ifthen   Members   

820
Like
1Likes
Like

Posted 29 November 2012 - 02:11 PM

OpenGL is a 3D graphics library. The only way to make OpenGL "2D" is to set up ortographic projection, but there is no functionality to deal with 2D rendering techniques like sprites or tiles. You would need to code all of that yourself, which is a super overkill.

Use SDL (OpenGL windowing library that has, among other extending functionality, support for 2D rendering) or DirectDraw (Windows only).

Edited by ifthen, 29 November 2012 - 02:13 PM.


#3 Servant of the Lord   Members   

33700
Like
2Likes
Like

Posted 29 November 2012 - 02:22 PM

SFML uses OpenGL under the hood. SFML is much better suited for 2D graphics.

However, if you are insistent upon using OpenGL, I still recommend downloading SFML since it is open source (and has very simple, straight-forward, clean code), and see how they do it.
It's perfectly fine to abbreviate my username to 'Servant' or 'SotL' rather than copy+pasting it all the time.
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 | [Fly with me on Twitter]

#4 Jacob Jingle   Members   

226
Like
0Likes
Like

Posted 30 November 2012 - 01:30 AM

OpenGL is a 3D graphics library

I understand this. I'm looking for a book that is geared towards using it to do 2D graphics.

Use SDL/SFML

I've actually been making simple 2D games and stuff with straight OpenGL. I just want a book that gives me more insight into what I've been doing.

#5 J. Evola's Apprentice   Members   

307
Like
0Likes
Like

Posted 30 November 2012 - 04:59 AM

2D is just a special case of 3D. What's the problem? If you know how to display transformed, flat, textured quads with blending and alpha-testing, you know everything about 2D in OpenGL.

Edited by J. Evola's Apprentice, 30 November 2012 - 05:01 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.