Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the OpenGL CPAN distribution.

Report information
The Basics
Id: 36091
Status: resolved
Worked: 5 min
Priority: 0/
Queue: OpenGL

People
Owner: BFREE [...] cpan.org
Requestors: ickphum [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.56
Fixed in: (no value)



Subject: Depth buffer setting (GLX_DEPTH_SIZE) missing in light example script
The example script "light" is missing a setting for GLX_DEPTH_SIZE in the call shown below: glpOpenWindow(width=>300,height=>300, attributes=> [GLX_DOUBLEBUFFER,GLX_RGBA,GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE,1]); This causes the object to appear mangled; depth testing is not working so rear facets cover front facets. This fixes the problem: glpOpenWindow(width=>300,height=>300, attributes=> [GLX_DOUBLEBUFFER,GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE,1]); I've seen 16 used for GLX_DEPTH_SIZE in other sample code; I believe this is saying "allow 64k overlapping windows", which sounds like enough.
RT-Send-CC: grafman [...] graphcomp.com
Thanks for the report. I'll be submitting 0.57 shortly, I'll fold this fix in. On Thu May 22 03:24:51 2008, ickphum wrote: Show quoted text
> The example script "light" is missing a setting for GLX_DEPTH_SIZE in > the call shown below: > > glpOpenWindow(width=>300,height=>300, > attributes=> [GLX_DOUBLEBUFFER,GLX_RGBA,GLX_RED_SIZE, 1, > GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE,1]); > > This causes the object to appear mangled; depth testing is not working > so rear facets cover front facets. > > This fixes the problem: > > glpOpenWindow(width=>300,height=>300, > attributes=> [GLX_DOUBLEBUFFER,GLX_RGBA, > GLX_DEPTH_SIZE, 16, > GLX_RED_SIZE, 1, > GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE,1]); > > I've seen 16 used for GLX_DEPTH_SIZE in other sample code; I believe > this is saying "allow 64k overlapping windows", which sounds like
enough. Show quoted text
>
I've folded in your fix into SVN (http://graphcomp.com/opengl/downloads); it'll be in the 0.57 release shortly. On Thu May 22 03:24:51 2008, ickphum wrote: Show quoted text
> The example script "light" is missing a setting for GLX_DEPTH_SIZE in > the call shown below: > > glpOpenWindow(width=>300,height=>300, > attributes=> [GLX_DOUBLEBUFFER,GLX_RGBA,GLX_RED_SIZE, 1, > GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE,1]); > > This causes the object to appear mangled; depth testing is not working > so rear facets cover front facets. > > This fixes the problem: > > glpOpenWindow(width=>300,height=>300, > attributes=> [GLX_DOUBLEBUFFER,GLX_RGBA, > GLX_DEPTH_SIZE, 16, > GLX_RED_SIZE, 1, > GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE,1]); > > I've seen 16 used for GLX_DEPTH_SIZE in other sample code; I believe > this is saying "allow 64k overlapping windows", which sounds like
enough. Show quoted text
>