No , No and No. 

If you say to opengl coders that Cairo is for 2d and Opengl is for 3d they
will start tearing their hair out. :D

Cairo is library for Vector Graphics , period. 

Opengl is the GOD of graphics :D 

Opengl  is a library for a direct access to GPU. True many of its functions
are 3d orientated but especially with the new architecture which is a pain
to use, opengl is having as the basic component the fragment shader which is
little program that defines of the behavior of a single pixel. Fragment
shaders are written by coders with the new architecture where everything are
shaders. Shaders are just little programms that GPU can run and operate on
GPU data. Anything that opengl is doing ends in the fragment shader which
the last stage of opengl rendering. So opengl is perfect for 2d of any kind.
Its just hard and very low level to use. Hence why we need Cairo.  

Actually Opengl is by far the most popular for 2d graphics. For example you
use Pharo, Pharo uses Morphic for GUI, Morphic uses MACOS Carbon , which in
turn based on Opengl. The entire macos GUI is based on opengl, same story
for Linux GUIs too. So openg is THE MATRIX. Blender for example uses Opengl
1.1 for its GUI which is all vector based, scalable , etc etc. Windows is
not opengl based or even DirectX , they use their own internal software api
called the GDI. 

And Igor coming to you. 

Yes I am aware of opengVG, but unless I misunderstood what I read the first
time I visited the website few months ago and it wont be the first time, its
NOT based on opengl. What I am trying to avoid here is promising you guys
that I will implement my own vector graphics library, which of course I wont
because I dont have the knowledge or the time for it. I have seen how one
can use Cairo to draw on opengl surfaces and looks like a easy enough thing
to do in the short run. So I am more in favor of quick solutions. 

>From what I read on the website OpenVG is not related to Opengl , and its
hardware accelaration depends on whether the hardware itself implement
hardware acceleration for openvg which from the list in the website there
are only a handful of hardware that does so. So unless I am missing
something here I dont think its a good idea. 

>From the time being my only focus is learning Opengl and continue
contributing tutorial classes to NBOpengl repository. Then start moving
Morphic to Athens , using existing cairo binding with NBOpengl. Looks to me
like the easiest choice right now. But as always I am open to suggestions
and corections.





--
View this message in context: 
http://forum.world.st/Pharo-dev-Cairo-vs-openGL-tp4692947p4693039.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to