View Full Version : How to save drawings in 'jpg' format using opengl on linux?
03-27-2005, 10:18 PM
I want to create pic using opengl on linux, but I prefer save jpg pictures directly instead of snapshooting from the screen.
Can anyone provide me some useful class library?
03-27-2005, 11:12 PM
03-27-2005, 11:55 PM
Try DevIL http://openil.sourceforge.net/
i personally use SDL library so i use the add-on SDL_image (http://www.libsdl.org/projects/SDL_image/) for all my image needs
03-28-2005, 03:24 AM
But maybe I emphasize the wrong thing :)
My problem is the direct picture creating(no screen, window, I don't want to display!).
For example, I read data from the file, imagine that according to the data I render 3d staffs on computer memory instead of the screen, then I save this picture.
That is what I want to do.
Helps are expected!
Then I'm not sure OpenGL can be of help for your requirements. I personally don't know any opengl libraries that can draw without using any window and context. You can at least do off-screen rendering, but you'll need a window. Anyway this will be rendered in a buffer, so drawed somewhere even if it's not shown.
Hope this helps.
03-30-2005, 06:17 AM
if you just don't want to see the rendering in a window, leave out the XMapWindow function call (assuming that you are using Xlib).
Mesa has special functions that can be called to
create a rendering context that does not require X.
off-course everything is software rendered.
This is the first time I've read these forums, and
already I've posted twice about mesa.
But seriously, OSMesa is very useful. I'm just surprised that people have aren't aware of it.
The "OS" part of it, I'm sure they've heard of Mesa.
03-31-2005, 12:13 AM
slightly off-topic -- can glX not create a pbuffer without having a window somewhere?
03-31-2005, 03:34 AM
I have tried osmesa, it's very useful and satisfies the requirements.
People here are very helpful. Thanks again!
Originally posted by OneSadCookie:
slightly off-topic -- can glX not create a pbuffer without having a window somewhere?I haven't used pbuffers before, but I don't
believe a window is necessary. A connection to
the X server _is_ required.
Basically, if you want the card to do any work
you must be connected to the X server.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.