baseballkvm.blogg.se

Hello triangle in opengl es 2.0 example
Hello triangle in opengl es 2.0 example









It's like C in that regard, I'd say.īut OpenGL, in general, is intended to maintain good compatibility between versions. Vulkan does not put the same emphasis on backward compatibility, but sidesteps the constant rewrite problem by being basically low-level enough that what it does offer is pretty universal. Not a big problem if you've been doing this for a while and are keeping up, but it's a pain in the ass if you're coming to it fresh. So when the new functions get added, they supersede the old functions in terms of performance or convenience or whatever, but the old ones stick around. at about the time a new technique is becoming supported by an extension. So a big problem in OpenGL is that some technique is new and awesome, so extensions are added to support it, and then those get adopted into the standard.

hello triangle in opengl es 2.0 example

Deprecating and removing "old" functions would mean that older codebases, like all the CAD and animation software in the world, would either require old graphics drivers or would require potentially-major rewrites to upgrade. So if I request a 3.3 Core version, I'm guaranteed to get back an OpenGL context that will have all of that stuff. Well, they did remove a huge amount of properly-deprecated shit between 3.2 and 3.3 (iirc).īut OpenGL, in general, is intended to maintain good compatibility between versions. so reading the manual for the black box becomes the hardest part. You really have to think "OpenGL is a black box that paints the pixels I ask for, and if I ask in the right way, it'll draw them real quick". But OpenGL can be frustrating, because of its antiquated state machine programming model, and the enormous API full of deprecated and quasi-deprecated functions and techniques. If you are also a beginning programmer, OpenGL will get you pixels on the screen with less software engineering than Vulkan. If you think about it as "Vulkan is a system for accessing the GPU, but I tell the GPU how to draw pixels" it's not bad at all. You will need to track and manage a bunch of stuff for yourself that OpenGL hides from you.

hello triangle in opengl es 2.0 example hello triangle in opengl es 2.0 example

But building anything in it kind of requires you to write (or borrow) a mini graphics engine. The Vulkan API is much, much more modern. If you are a competent systems-level programmer, comfortable working in C++ close to low-level interfaces, you might find it easier to learn Vulkan than OpenGL.











Hello triangle in opengl es 2.0 example