Questions tagged [pyglet]

Pyglet is a cross-platform windowing and multimedia library for Python which provides interface to the platform's OpenGL library.

Pyglet is a cross-platform windowing and multimedia library for Python which provides interface to the platform's OpenGL library.

Pyglet has built-in support for mouse and keyboard events, and can load several multimedia file formats (optionally via AVbin). OpenAL, DirectSound or ALSA can be used for audio playback, with 3D positional audio support.

Pyglet is divided into several interdependent modules such as pyglet.gl, pyglet.graphics, pyglet.image, pyglet.media, pyglet.text, and pyglet.window.

919 questions
0
votes
1 answer

What does @ do in Python 3 (Pyglet)?

I was trying out Pyglet via this tutorial when I noticed this portion of the code, which is not documented on the page.. I have not been able to find anything on it by searching the web either. What exactly does it do? Can it be used with other…
ever99
  • 65
  • 1
  • 6
0
votes
2 answers

pyglet image resources from dictionary

I have a question about pyglet image resource definition. If I have lot of pictures can I describe them in a dictionary and make images with for loop? Fast way: images = {'pic1':'pic1.jpg', 'pic2':'pic2.jpg', ...} for (name,…
0
votes
1 answer

bitwise numbers python

I'm using tiled map editor to make 2d maps for making a game with pyglet. The tiles are numbered and saved to a .tmx file. The tiles numbers start at 1 and keeps ascending but when you flip a tile that tile number is changed with bitwise so when you…
0
votes
2 answers

gluPerspective has vanishing point in corner. Opengl

I'm using pyglet: http://www.pyglet.org/ to work with opengl. However, i have some problems. My vanishing point appears in the corner of the screen (0,0) the lower left corner. The following image should show illustrate this:…
shimao
  • 312
  • 2
  • 6
  • 15
0
votes
1 answer

Pyglet, surface not showing

I'm trying some stuff under PyGlet and I'm facing an issue I can't manage to solve by myself. import pyglet from pyglet import gl win = pyglet.window.Window() @win.event def on_draw(): gl.glClear(gl.GL_COLOR_BUFFER_BIT) z = 0 …
Nicolas Appriou
  • 2,208
  • 19
  • 32
0
votes
3 answers

Python & Pyglet Minecraft Example Code Error

So I built Pyglet on my Mac and I tried using it with a Minecraft (Python) demo code, but I got this error, and I realize that it stems from Pyglet itself. Here is the complete error: Traceback (most recent call last): File…
noahbkim
  • 528
  • 2
  • 13
0
votes
1 answer

Attempting to embed a video in pygame using pyglet

im trying to display a video on a pygame surface using the pyglet library to import, play and then convert the frames into an image. I managed to battle my way through installing avbin but now I'm hitting a type error with my code def…
Ryytikki
  • 11
  • 3
0
votes
1 answer

Render and scroll through multiline paragraphs using pyglet and ScrollableTextLayout

How can one display and scroll through a multi-line strings (contain "\n") via pyglet using the features of ScrollableTextLayout? STL crops what is display, and seems to be the most efficient way to implement scrolling. However I have no idea as to…
torger
  • 2,308
  • 4
  • 28
  • 35
0
votes
1 answer

3D Collision detection not functioning properly

I have a problem with collision detection I've been creating for a 3D thing I'm doing. The way I made the collision detection is, first I store the old xyz coordinates in to variables, then call the moving function, and then the collision function.…
Arcticcu
  • 31
  • 1
  • 8
0
votes
1 answer

Pyglet window will not redraw on resize

I have a class that is subclassed to pyglet.window.Window, and I need it to be a resizable window. I figured out how to enable it to be resized, but I need to make it redraw everything on the screen when I actually do resize it. Here's what I have…
Nick Taber
  • 177
  • 1
  • 2
  • 10
0
votes
1 answer

Manual pyglet loop freezes after a few iterations

I am testing out pyglet for usage in a larger project, and apparently pyglet recommends/wants you to use it's own loop (with pyglet.app.run()) This is a something I don't want, for reasons of compatibility of other packages and also to not have to…
Orpheon
  • 181
  • 2
  • 10
0
votes
2 answers

python pyglet and opengl

I am trying to get 3D capabilities through python and have download pyglet. While going through the first example in this tutorial I got a bunch of strange errors that I cannot discern. The following is the script I am trying to run: import…
CodeKingPlusPlus
  • 15,383
  • 51
  • 135
  • 216
0
votes
1 answer

Pyglet: Unstable fps when using Vsync... and no other software

I am using Pyopengl and Pyglet for an simple application. I am using Vsync to swap buffers at 120 Hz. Here is the problem. When I run many applications like Outlook, Chrome, NotePad++, Dora's great adventure on background, the Fps is steady enough…
BaldDude
  • 1,025
  • 1
  • 19
  • 33
0
votes
1 answer

Python install of setup.py files not running 2to3

Recently, when trying to install the pyglet module for openGL in python, I have run into a problem. It appears that when running a setup.py file, it is not converted with 2to3. Due to this issue, I am unable to use pyglet in python 3 due to errors…
NAME__
  • 625
  • 1
  • 7
  • 17
0
votes
1 answer

how to decode JPEG's and encode video in python?

Basically, I'm trying to create a stop-motion film making application, due to the absence of any decent free versions that work on the internet, by taking images (JPEG preferably, but any format will do) and encode them into a video (any format is…