Chris: Off-screen rendering with Mesa?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Axel

Chris: Off-screen rendering with Mesa?

Post #1by Axel » 18.06.2002, 11:42

Hi Chris,

how are you? I hope you're doing well. Have you finally received the logo-concept?

Ok, now to my question: I went through the Mesa3D site and they state this:

"Off-screen rendering:
Mesa 1.2.4 introduced off-screen rendering, a facility for generating
3-D imagery without having to open a window on your display. Mesa's
simple off-screen rendering interface is completely operating system
and window system independent so programs which use off-screen rendering
should be very portable. This new feature effectively enables you to
use Mesa as an off-line, batch-oriented renderer.

The "OSMesa" API provides 3 functions for making off-screen renderings:
OSMesaCreateContext(), OSMesaMakeCurrent(), and OSMesaDestroyContext().
See the Mesa/include/GL/osmesa.h header for more information. See the
demos/osdemo.c file for an example program. There is no facility for
writing images to files"

Do you remeber my sugestion to let Celestia render to the desktop? Much like 'The Playa' or 'Milkdrop' (of Ryan Geiss) can do. The icons and windows are still usable, but the desktop is used to display Celestia 8)

If Mesa provides the off-screen rendering, then all you have to do for desktop rendering is: #1. Fill the desktop with a solid, overlay color and #2. Copy pixel per pixel from off-screen to background where pixel has solid color. :idea:

That ought to be possibe...

Linux Xserver can redirect it's output to the desktop-window (e.g. xplanet), so that ought to work as well.

Only remaining question would be if OpenGL itself on Win provides off-screen rendering as well.

Any thoughts?

Take care,
Axel

axel

Offscreen rendering to desktop

Post #2by axel » 18.06.2002, 11:47

OpenGL can do (of course :)

http://www.mesa3d.org/brianp/sig97/offscrn.htm

CU, Axel

Topic author
Axel

Offscreen rendering to desktop

Post #3by Axel » 18.06.2002, 13:27

Hi,

just to make myself more precise:

Image

This was taken from http://www.geisswerks.com/drempels/index.html ,another Ryan Geiss application which does render to the destop.

Obviously the application's title isn't there during normal operation.

Take care,
Axel

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Post #4by chris » 18.06.2002, 17:03

Axel: I did get the logo; I still need to resend a couple messages to you :)

I don't think that Mesa is going to help with off-screen rendering. Anything that can be done with Mesa on Windows can also be done with vendors' OpenGL libraries. The offscreen rendering described on the Mesa3D sight would be primarily useful for noninteractive rendering; for example, if you wanted to write a web application that accepted coordinates through a form and then called on a tweaked version of Celestia to generate a JPEG.

--Chris

Topic author
Axel

Offscreen rendering to desktop?

Post #5by Axel » 18.06.2002, 20:44

Hi Chris,

yes, please resend a few messages. My web.de acount got knocked down a few times and there are some infos I have to catch up with, I'm sure :)

Reg. the offscreen render appraoch to a Celestia possible 'desktop mode': I'd agree with you that Mesa will give us only a fraction of what can be done with vendor hw accelerated ICDs.

But the question would be if we could use them to render to an off-screen surface or window. If that's really possible, we just have to be able to access that offscreen window bit-wise and we'd be done.

Comments?

CU,
Axel

Topic author
Axel

Offscreen rendering to desktop?

Post #6by Axel » 18.06.2002, 20:53

Hi,

I just followed my own link to the Mesa site again and they have some info about methods to render to off-screen with plain vanilla vendor OpenGL:

"...5. Auxiliary Buffers
The OpenGL specification includes auxillary buffers. These are buffers intended for off-screen rendering. They are addressed via the glDrawBuffer and glReadBuffer functions. Up to four auxiliary buffers named GL_AUX0, GL_AUX1, GL_AUX2, and GL_AUX3 are available. The actual number of auxiliary buffers available can be queried with glGetIntegerv(GL_AUX_BUFFERS, numBuffers).
Pros:

A simple off-screen facility standard to OpenGL.
Cons:
Aux buffers are optional and few implementations of OpenGL support them."

Can we check if at least the major vendors (nVidia and ATI) support this standard? Can these accessed pixel-wise as well?

Take care,
Axel


Return to “Development”