Martin,
I'm more than happy to test and report, but I have to at least get it
compiled. It seems like it's getting closer.
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
On Jul 9, 2008, at 11:24 PM, Martin Landa wrote:
Hi,
thanks for the hits. I have commited some changes [1].
However I have no access to Mac. Needs some investigation how to make
off-screen rendering working.
Martin
[1] http://trac.osgeo.org/grass/changeset/32068
2008/7/10 Glynn Clements <[EMAIL PROTECTED]>:
Michael Barton wrote:
Are we at a place yet where I can compile and test this on a Mac,
given it's location of OpenGL in the agl directory?
The code won't compile on a Mac at present.
AFAICT, it requires at least:
/* TODO */
- rwin->displayId = aglChoosePixelFmt(GDHandle *dev, int ndev,
attributeList);
+ rwin->displayId = aglChoosePixelFmt(NULL, 0, attributeList);
- rwin->contextId = aglCreateContext(rwin->display, NULL);
+ rwin->contextId = aglCreateContext(rwin->displayId, NULL);
/* create win pixmap to render to (same depth as RootWindow) */
- rwin->pixmap = NULL; /* TODO */
+ rwin->pixmap = <no idea what should go here, but it ain't NULL>;
There is some information on AGL at:
[1] http://www.mesa3d.org/brianp/sig97/agl.txt
[2] http://www.mesa3d.org/brianp/sig97/compare.htm
but I don't know how much of that refers to "classic" rather than
OSX.
There's a lot more information in visualization/nviz/src/togl.c, but
it doesn't include creating off-screen pixmaps.
I also note:
[3] http://www.iua.upf.es/~ggeiger/redbookhtml/apc.html
Off-screen Rendering
To render off-screen, first create an off-screen graphics
world in the usual way, and pass the handle into
aglCreateAGLPixmap().
Good luck on figuring out what "the usual way" is ;)
A Google search for aglCreateAGLPixmap produces exactly 7 hits; I've
just posted three of them, and the other 4 seem to be duplicates of
[1] and [3].
IOW, everything that mentions aglCreateAGLPixmap seems to assume that
you are already familiar with normal (non-OpenGL) Mac GUI
programming.
In any case, it's going to require some amount of trial and error
from
someone with a Mac.
--
Glynn Clements <[EMAIL PROTECTED]>
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/
~landa *
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev