[GRASS5] Re: NVIZ cleanup (update)

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Jun 10 11:20:39 EDT 2003


Hello Bob
I can confirm it compiles and runs on Irix. However it won't display any
sites; that problem seems to have come back again since the last version
you sent me which works all right.

If I do
g.gisenv set="X3D_HEIGHT=576"
g.gisenv set="X3D_WIDTH=768"
the new viewport sizing feature works, but I would prefer if it read
environment variables (like GRASS_WISH, GRASS_SIZE etc.) like most other
modules do. And it first draws the scene and then resizes the window and
redraws it instead of opening the window at the correct size. And the control
panel starts on top of the viewport and I have to drag it out of the way. But
it is still very good to be able to set the size automatically.

The pbuffer bits won't have compiled; the relevant macros on my system are
GLX_PBUFFER_BIT_SGIX and GLX_PIXMAP_BIT_SGIX . The width and height names
are something different as well; I think I sent you details in an e-mail
ages ago. It needs a bit more embedded logic to work out the correct
extensions for the function names etc., but I could always do this some
time when I have more time if it is in CVS.

Sorry I can't test more at the minute. I am still using SG3d for some of
my PhD work so I do not have much use for NVIZ at present, but it is good
to know it is working if I should need it. I think you should go ahead and
put all the changes into CVS and then they will get much more testing.

I will copy this to the developers' mailing list so everyone is up-to-date
with what is going on.

Paul

On Mon, 9 Jun 2003, Bob Covill wrote:

> Markus, Paul;
>
> I figured I would send you an update of the NVIZ stuff for more testing.
>
> I have cleaned up the off screen stuff. The compile flags are now
> GLX_PBUFFER_BIT and GLX_PIXMAP_BIT instead of the previous VERSION
> options. I have finally got the GLX Pixmap routines working (better). I
> realized that the image was blank due to the fact that the lights were
> not initialized in the new context. I have added an off-screen compenent
> to the "max. size" image output. When the user selects this, an
> off-screen context is open (if available) at the screen size and the
> tiles are drawn to make up the max. viewport size. If off-screen
> rendering is unavailable, the tiles are drawn in the users current window.
>
> I have reset the nearclip / farclip defaults to 10 and 10000
> respectively. This was at the heart of the error reported by Helena with
> mismatched surfaces at different views. These values are used in
> gluPerspective. The greater the difference between these values the
> lower the accuracy of the Z buffer. An optimum ratio for the values is
> approx., 1000. It would be nice to make these values auto-respond to the
> users current view to avoid scene clipping when outside the range.
>
> I have cleaned up a couple of other bugs reported by Helena. The first
> was NVIZ crashing when a vector was loaded outside the current region.
> The exit from this is much more graceful and the vector is not loaded at
> all. The second error was crashes related to cutting planes drawn
> between surfaces with diffeent resolutions (nviz). An error is now
> reported to standard output and the cutting plane is not drawn.
>
> Again, let me know if you have any questions or problems. Should we
> apply to CVS soon so others can test?
>
> --
> Bob Covill
>
> Tekmap Consulting
> P.O. Box 2016
> Fall River, N.S.
> B2T 1K6
> Canada
>
> E-Mail: bcovill at tekmap.ns.ca
> Phone: 902-860-1496
> Fax: 902-860-1498
>




More information about the grass-dev mailing list