Re: draw using pycairo on glut interface

Chris Barker <[email protected]>
Newsgroups gmane.comp.python.opengl.user
Message-ID <CALGmxEK8VZx+mJRzmB8_3_9URaaVCP9BKxXEN=o3f9R=iCUdXA@mail.gmail.com>
On Sun, Apr 22, 2012 at 7:40 AM, Alejandro Segovia <[email protected]> wrote:

> I don't have experience with Cairo, but either if it's a software or
> GPU-based renderer,

There was talk of a real GPU-based Cairo back-end, but it never got far.

However, there is (was) a "OpenGL" back-end that used the software
renderer, and dumped the image to OPenGL as a texture. If it isn't
funcional, it wouldn't be hard to do, as Alejandro points out.

-Chris



 there might be a way to capture its output and use it as
> a texture.
>
> If Cairo is software based, check to see if you can have it render to a byte
> array or color matrix, then (after proper formatting) use that to create a
> 2D texture.
>
> If Cairo is GPU-based, and it uses OpenGL, you should be able to have it
> render to a FBO (with a texture color attachment) or Pbuffer.
>
> Once you have a texture, you can map it on a quad or a triangle fan aligned
> to the screen. Results will be better if you use an Orthographic projection.
>
> I hope these ideas help. If anyone knows about Cairo, please do weight in :)
>
> Best,
> Alejandro.-
>
> 2012/4/21 Prashant Saxena <[email protected]>
>>
>> Hi,
>>
>> Is it possible to draw using pycairo on glut interface? For example,
>> drawing a cairo gradient surface.
>> I would appreciate if some one can show some light on this topic.
>>
>> Cheers
>>
>> Prashant
>>
>>
>> ------------------------------------------------------------------------------
>> For Developers, A Lot Can Happen In A Second.
>> Boundary is the first to Know...and Tell You.
>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
>> http://p.sf.net/sfu/Boundary-d2dvs2
>> _______________________________________________
>> PyOpenGL Homepage
>> http://pyopengl.sourceforge.net
>> _______________________________________________
>> PyOpenGL-Users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pyopengl-users
>>
>
>
>
> --
> http://alejandrosegovia.net
>
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> PyOpenGL Homepage
> http://pyopengl.sourceforge.net
> _______________________________________________
> PyOpenGL-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyopengl-users
>



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.