I am drawing cubes and trying to name the individual faces of a cube. Seems like a reasonable thing to do. I'm just drawing the faces individually now.
On Apr 7, 3:35 pm, Gary Herron <[EMAIL PROTECTED]> wrote: > John Harrison wrote: > > Nevermind. I violated the rule of never putting the glPushName or > > glLoadName in between glBegin and glEnd statements: > >http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/... > > > Something of an annoying restriction, but I can deal with it. > > But... You are supposed to think of the names as naming objects (defined > by glBegin/glEnd pairs), not individual vertices. From that point of > view, changing an object's name half way through its definition brings > up the question of which name to report in the selection buffer, the > name in effect at the glBegin, or the name in effect at the glEnd, or > one (but which) of the (many) names in effect between the two or ... > Better to just avoid that ambiguity by disallowing it. > > Gary Herron > > > On Apr 7, 12:41 pm, John Harrison <[EMAIL PROTECTED]> wrote: > > >> I am attempting to use pyglet to do mousepress picking. This works > >> fine if I keep all my picking code in a single method or function. > >> However, if I try to do any decomposition I run into problems. I can > >> put drawing code in other functions, but if I put either glLoadName or > >> glPushName calls into another function I get the following error: > >> File "city.py", line 755, in pick > >> glSelectBuffer (512, selectBuf) > >> File "build/bdist.linux-x86_64/egg/pyglet/gl/lib.py", line 89, in > >> errcheck > >> pyglet.gl.lib.GLException: invalid operation > > >> I don't understand why I can't declare a selection buffer in one > >> method and then push names onto the stack in another. > > >> Anybody have any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
