[ pyopengl-Bugs-2829309 ] glCallLists calls lists twice
"SourceForge.net" <[email protected]> Thu, 30 Jul 2009 05:41:03 +0000
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2829309, was opened at 2009-07-30 01:02
Message generated for change (Comment added) made by lethalman
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2829309&group_id=5988
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GL
Group: v3.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Luca Bruno (lethalman)
Assigned to: Mike C. Fletcher (mcfletch)
Summary: glCallLists calls lists twice
Initial Comment:
Hello,
I'm using pyopengl 3.0.0~c1 from debian and mesa 7.6 from git. I'm almost pretty sure that glCallLists ([1]) calls the list 1 twice, so it happens for more than one list. Reproduce as follows:
1. glRenderMode(GL_SELECT)
2. ... glCallLists([1])
3. glRenderMode(GL_RENDER)
If the list 1 pushed only one name, you get two hits. This doesn't happen if you glCallList(1), you only get one hit as expected. I'm currently doing (glCallList(list) for list in lists) instead of glCallLists as temporarly workaround. I don't know if this happens with C++ directly, couldn't test so I've reported it here.
----------------------------------------------------------------------
>Comment By: Luca Bruno (lethalman)
Date: 2009-07-30 07:41
Message:
I rectify, it happens with GL_COMPILE_AND_EXECUTE (not necessary other
lists) and glCallLists must be in a list to call other lists:
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluPerspective(40.0, 1.0, 1.0, 10.0)
glTranslatef (0, 0, -3)
glMatrixMode (GL_MODELVIEW)
glLoadIdentity ()
glNewList(1, GL_COMPILE_AND_EXECUTE)
glInitNames ()
glCallLists([2]) # replace with gCallList(2)
glEndList ()
glNewList(2, GL_COMPILE)
glPushName (1)
glBegin (GL_POINTS)
glVertex3f (0, 0, 0)
glEnd ()
glPopName ()
glEndList ()
glSelectBuffer (100)
glRenderMode (GL_SELECT)
glCallList(1)
print glRenderMode (GL_RENDER)
----------------------------------------------------------------------
Comment By: Mike C. Fletcher (mcfletch)
Date: 2009-07-30 06:53
Message:
I can't replicate this failure condition. I am using this code, on an
Ubuntu 3.0.1 Jaunty Linux Box with current BZR head of PyOpenGL:
def test_glCallLists_twice( self ):
"""SF#2829309 report that glCallLists doubles operation"""
l = glGenLists(1)
try:
glEnd()
except error.GLerror, err:
pass
glSelectBuffer( 23 )
glRenderMode( GL_SELECT )
glNewList( l, GL_COMPILE )
glPushName( 222 )
glEndList()
depth = glGetIntegerv( GL_NAME_STACK_DEPTH )
assert depth == (0,), depth # shouldn't have added in compile mode
glCallLists( [l] )
depth = glGetIntegerv( GL_NAME_STACK_DEPTH )
assert depth == (1,), depth # should have a single record
glCallLists( [l] )
depth = glGetIntegerv( GL_NAME_STACK_DEPTH )
assert depth == (2,), depth # should have a second (identical) record
glPopName()
glPopName()
glRenderMode( GL_RENDER )
which test passes. Please provide a test that fails on your platform so I
can test whether we're looking at a bug that was fixed in the meantime or
an error in usage or a subtle corner case.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2829309&group_id=5988
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net