On 26/06/14 15:43, Jose Luis Da wrote:
> Hi Juan, thank you for your response.
>
> The attached code from the thread you linked give me the same output
> ('OpenGL version:', '2.1 NVIDIA-1.6.24')
> ('OpenGL 3.2 support:', False)
>
> However, I do not have a lot of experience in pyglet, thus I do not know
> how to use the patch to solve this problem.
>
> If I include the line *pyglet.options['shadow_window'] == False* I still
> get a blank screen.
>
> I am using OSX 10.6, but I need the code to run on the recent OSX
> platforms too.
OK, the "shadow window" is "easy" to understand (and hopefully I can
explain it heh), but I'm not sure if it's related to your problem. Keep
reading, just in case :)
When pyglet loads resources (images) it will create textures etc in your
GPU, so an opengl context is required.
If you load images *before* the opengl context is created (this is: when
the window is created), pyglet will create a "hidden" window with an
opengl context. Then it will share all the objects on that temporal
context with the final window when it's created.
This approach is really cool and makes everything simpler from the point
of view of the pyglet user without experience with opengl and the
internal on "how things work".
BUT sometimes this doesn't work too well (eg, crappy opengl drivers not
allowing shared opengl contexts -specially in Microsoft Windows-), and
apparently in the case described in that ticket.
Abstractions are useful until they get in the way. I never had a problem
with the shadow window until recently, and reviewing my old code it was
just a coincidence that I did things right loading resources after I
created the main window hah! :)
You can:
- disable the shadow window with the aforementioned option
- be sure you load all your resources *after* your window (and hence)
the opengl context is created
If you need a stencil (whatever that is; opengl newbie here!), it's
fine. If your problem is because of the shadow window and the shared
contexts, avoiding the shadow window should fix it!
More about this:
http://pyglet.org/doc-current/programming_guide/context.html#sharing-objects-between-contexts
http://pyglet.org/doc-current/internal/main.html#pyglet.options
Regards,
Juan
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.