473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Saving PyOpenGl figures as ps

Hi,

I installed pyopengl (opengl for python) on my linux box and
everything works fine. But now I want to save the generated images as,
e.g., ps or eps. How can I do that and how can I adjust the resolution
(if necessary)? This is probably simple but for some reason I can not
find out how to do that.

I appreciate every hint!

Thanks, Frank

Feb 11 '07 #1
2 1629
On Feb 12, 3:11 am, "Frank" <super...@gmail.comwrote:
Hi,

I installed pyopengl (opengl for python) on my linux box and
everything works fine. But now I want to save the generated images as,
e.g., ps or eps. How can I do that and how can I adjust the resolution
(if necessary)? This is probably simple but for some reason I can not
find out how to do that.

I appreciate every hint!
Well, that's not that simple. Search the web, there are several
tutorials about PostScipt output.

Feb 12 '07 #2
Frank wrote:
Hi,

I installed pyopengl (opengl for python) on my linux box and
everything works fine. But now I want to save the generated images as,
e.g., ps or eps. How can I do that and how can I adjust the resolution
(if necessary)? This is probably simple but for some reason I can not
find out how to do that.

I appreciate every hint!

Thanks, Frank
Hi Frank,

Take a look at the demos in OpenGL, particularly:

OpenGL-ctypes/OpenGL/Demo/GLUT/tom/conesave.py

which is a little GLUT application that renders into a GLUT windows and
then allows you to save it. That's raster operation though (i.e.
produces a PNG or JPG). Raster operations can only save a portion of
the screen as rendered, so if you want a higher resolution image you
need to make a larger window. If you want to get more advanced you can
try using an off-screen buffer (pbuffer or MESA) for the rendering,
which may (depending on implementation) allow for higher resolutions.

If you want a true vector graphic (PS, EPS) you'll need to use something
like GL2PS.

http://www.geuz.org/gl2ps/

HTH,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com

Feb 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jimmy Johns | last post by:
Hi, why hasn't there a version of pyOpenGL for python 2.3.x yet? Currently the binary installers for windows only work with python 2.2, and will give an when installing for python 2.3. I can't...
2
by: Erik Max Francis | last post by:
I was interesting in adding selection and hit testing to ZOE, and was looking at the PyOpenGL wrappers' handling of selection and picking. I see glSelectBuffer to specify the size of the buffer,...
5
by: Sébastien Ramage | last post by:
Bonjour à tous, Dans la folie j'ai installé le nouveau python, impatient de voir les nouveautés mais je pense que j'ai été un peu rapide car j'ai voulu utiliser pyOpenGL et là problème il...
1
by: joroy | last post by:
Hi all, I think this is ctypes related but how can I call the glShaderSourceARB function? The function have this header: glShaderSourceARB( GLhandleARB(shaderObj), GLsizei(count),...
0
by: sweetmelon | last post by:
(I'm a newbie in Python and pyOpenGL.) Environment: WinXP SP2 Python ver. 2.5 WingIDE easy_install is installed PIL, pyNum is installed Download PyOpenGL-3.0.0a5-py2.5.egg run: easy_install...
0
by: shirish | last post by:
Hi all, Is it possible to have Python+Pygame+PyOpenGL in one compact package so people can play the games released at pyweek.org . I have been having a hard time getting the whole thing on windows...
2
by: seb.haase | last post by:
Hi, I am distributing a package with a precompiled collection of modules and packages useful for Python based medical/biological/astronomical image analysis and algorithm development. (Codename:...
0
by: Colin J. Williams | last post by:
I have just installed PyOpenGL and get a series of warning messages: Best match: PyOpenGL 3.0.0b3 Downloading...
1
by: Clay Hobbs | last post by:
I need a tutorial for PyOpenGL (specifically, to be used with wxPython). I searched with Google and didn't find one. Does anybody know where one is? -- Ratfink
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.