user3425881
user3425881

Reputation: 21

Modern OpenGL for 2d graphics

I wanted to use Opengl for 2d graphics because of its hardware acceleration. Would you rather recommend me to use modern Opengl or to use the fixed pipeline for this? This whole shader writing seems like too much overhead to me. I just want to draw some 2d primitives.

Upvotes: 2

Views: 2014

Answers (2)

Lawrence Kok
Lawrence Kok

Reputation: 1598

Even for trivial 2d graphics using the programmable pipeline as opposed to the fixed function pipeline is what you want. In the end, the programmable pipeline gives you more freedom in expressing your graphics. How you decide to program the pipeline is up to you and is driven by your graphical needs. It could be, that you only need a single shader. There is no written rule that you need to have hundreds of shaders for it to be 'modern opengl'.

In that aspect it's debatable if modern opengl really is that much effort at all. It's a shader, a vertex/index buffers and a few textures. In comparison to fixed function pipeline, has it really changed that much that you even have to consider sticking to the fixed function pipeline?

A more compelling reason why you should prefer the programmable pipeline is that the fixed function pipeline is deprecated. In other words, pending removal. In concept a IHV could decide to drop support for it at any moment.

Upvotes: 3

Wagner Patriota
Wagner Patriota

Reputation: 5674

Modern OpenGL is better. Don't be afraid of shaders. Without them, you can't do anything besides draw the image using some blending... You can't go too far... With shaders, you can do pretty much everything (effects like Photoshop, for example).

Upvotes: 0

Related Questions