Questions tagged [pyopengl]

Python binding to the OpenGL API

PyOpenGL is a cross platform Python binding to OpenGL API, which also supports libraries like the following ones:

This bindings are interoperable with external GUI libraries, such as , and .

It includes a learning library called OpenGLContext, which contains sample code for common operations and it is not needed to work with PyOpenGL.

Resources

945 questions
3
votes
0 answers

Unable to run an (Py)OpenGL application via SSH - failed to load driver swrast

I'm working on an OpenGL application written in Python, using PyOpenGL. It runs well on my Mac and also on other Linux system, however if I run it on our remote cluster via SSH and X-forwarding, I get the error (also when running glxinfo): libGL:…
tamasgal
  • 24,826
  • 18
  • 96
  • 135
3
votes
0 answers

Segmentation fault using Python gtk3 with pyOpenGL

I use Python in combination with the gtk3 and the GTKGLExt fork from https://github.com/tdz/gtkglext so I can use the gobject introspection feature to use Gtk3 from python. I created a Gtk.DrawingArea to draw my OpenGL stuff. Everything works fine…
jenzzaflow
  • 46
  • 2
3
votes
3 answers

No Module Named pydispatch when using pyOpenGL

I have been attempting to follow a tutorial online and I have followed every single line and for some reason I get the following error: Traceback (most recent call last): File "C:/Users/User/Desktop/OpenGLContextTest.py", line 2, in
GoodPie
  • 967
  • 3
  • 23
  • 41
3
votes
2 answers

PyOpenGL - A tutorial about shaders that doesn't work

This is an example from: http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml It is creating a vbo, binging it, and running it with a shader, but somewhere along the way, it is not working properly. I searched a lot on the internet and…
3
votes
1 answer

pyopengl - dynamically updating values in a vertex buffer object

I'd like to create polygons with draggable vertices in PyOpenGL. Having read around a bit, VBOs seemed like a sensible way to achieve this. Having never used VBOs before, I'm having trouble figuring out how to dynamically update them - ideally I'd…
ali_m
  • 71,714
  • 23
  • 223
  • 298
3
votes
1 answer

I installed PyOpenGl for python3, and when I import packages I get value errors

I wanted to start with some PyOpenGL, and so I booted into Mac Osx to try it. I went on the PyOpenGl website, downloaded the PyOpenGl and PyOpenGl_accelerate tars, cd'd into my downloads directory, and typed these commands into terminal to…
pipsqueaker117
  • 2,280
  • 9
  • 35
  • 47
3
votes
1 answer

Porting OpenGL code from C++ to Python

I have written a game in C++ / OpenGL and am supposed to port the same to Python. After some research online, I found out PyOpenGL 3.0.2 and WxPython 2.8.12.1 bindings for 2.7 version of Python work good for Python / OpenGL programming. Can you…
user1859793
  • 129
  • 1
  • 1
  • 2
3
votes
2 answers

PyOpengl without PyGame

I see that all tutorials about the pyopengl implements pygame, is posible use PyOpengl without pygame?. and if is so, then, is most faster without pygame or not?
Cristian
  • 1,480
  • 5
  • 32
  • 65
3
votes
1 answer

Displaying a simple 2D textured rectangle inside a wxGLCanvas using PyOpenGL

I'm trying to write some code that will display a single image as a simple 2D textured rectangle within a wxGLCanvas container. Here's a runnable example of what I've got so far: import wx from wxPython.glcanvas import wxGLCanvas from OpenGL.GLU…
ali_m
  • 71,714
  • 23
  • 223
  • 298
3
votes
1 answer

pyOpenGL exe made with PyInstaller gives attributeerror

I'm trying to make lesson18.py from the pyOpenGL examples into an exe but when compiled it gives this error: Traceback (most recent call last): File "", line 46, in File "C:\pyinstaller-1.5.1\iu.py", line 436, in importHook …
MakerDrone
  • 109
  • 3
  • 9
3
votes
1 answer

how to copy a texture into a pbo in PyOpenGL?

after having used PyOpenGL happily for some time, I'm now seriously stuck. I am working on a Python package that allows me to use GLSL shaders and OpenCL programs for image processing, using textures as the standardized way to get my data in and out…
Joost Rekveld
  • 81
  • 2
  • 11
2
votes
1 answer

Count image similarity on GPU [OpenGL/OcclusionQuery]

OpenGL. Let's say I've drawn one image and then the second one using XOR. Now I've got black buffer with non-black pixels somewhere, I've read that I can use shaders to count black [ rgb(0,0,0) ] pixels ON GPU? I've also read that it has to do…
Slava V
  • 16,686
  • 14
  • 60
  • 63
2
votes
1 answer

pyOpenGL color picking on windows

I have wxPython + pyOpenGL application that needs to be cross platform. Now for selection I implemented a color picking scheme, basically as follows: if len(self.pick_color_array) == 0: …
Bogdan
  • 8,017
  • 6
  • 48
  • 64
2
votes
1 answer

pyOpenGL VBOs with index

I want to draw a Rectangle in pyOpenGL using VBOs with indices. I am using the glDrawRangeElements() function for that but I always get the same mistake in the line glDrawRangeElements: WindowsError: exception: access violation reading 0x00000000 I…
jean-claude91
  • 167
  • 1
  • 2
  • 10
2
votes
2 answers

pyopengl glut input

After the window containing GLUT graphics appears, I would like to enter input in the terminal: user@computer: python woop.py # Now displaying a beautiful landscape (cmd): season winter # Now changing season to winter (cmd): event meteor # Now…
xxjjnn
  • 14,591
  • 19
  • 61
  • 94