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
80
votes
3 answers

Python - No handlers could be found for logger "OpenGL.error"

Okay, what is it, and why does it occur on Win2003 server, but not on WinXP. It doesn't seem to affect my application at all, but I get this error message when I close the application. And it's annoying (as errors messages should be). I am using…
Paige Watson
  • 1,218
  • 3
  • 17
  • 27
49
votes
2 answers

Why does my OpenGL Phong shader behave like a flat shader?

I've been learning OpenGL for the past couple of weeks and I've run into some trouble implementing a Phong shader. It appears to do no interpolation between vertexes despite my use of the smooth qualifier. Am I missing something here? To give credit…
Jonba
  • 1,117
  • 2
  • 11
  • 12
45
votes
4 answers

Using OpenGL with Python

So, I only know how to use Python, but I also know how to model in 3d. I've heard of OpenGL and I really want to learn how to use, because it seems very useful (I want to create simple games with it...). I found PyOpenGL, Python bindings for OpenGL,…
Antoni4040
  • 2,297
  • 11
  • 44
  • 56
35
votes
3 answers

Where can I find a good online OpenGL 3.0 tutorial that doesn't use any deprecated functionality?

I just purchased the fifth edition of the OpenGL SuperBible. I'm very pleased that they've avoided using deprecated functionality but their examples make use of GLTools. GLTools provides a slew of useful functions for rendering simple 3D objects and…
Jonba
  • 1,117
  • 2
  • 11
  • 12
33
votes
14 answers

PyOpenGL glutInit NullFunctionError

I am running Anaconda Python 2.7 on a Win7 x64 machine and used pip install PyOpenGL PyOpenGL_accelerate at the Anaconda command line to install PyOpenGL. I have some code (not my own I must confess) that makes use of glutInit import sys import…
DrBwts
  • 3,470
  • 6
  • 38
  • 62
26
votes
9 answers

PyOpenGl or pyglet?

I am looking to do some tinkering with openGL and Python and haven't been able to find good reasons for using PyOpenGl versus pyglet Which would you recommend and why?
Hortitude
  • 13,638
  • 16
  • 58
  • 72
24
votes
8 answers

"filename.whl is not a supported wheel on this platform"

I saw the same question, but it didn't work for me. pip install PyOpenGL.3.1.1-cp34-cp34m-win_amd64.whl I also have the same problem for NumPy: pip install numpy-1.11.1+mkl-cp34-cp34m-win_amd64.whl Then I…
teoman
  • 959
  • 2
  • 10
  • 21
21
votes
3 answers

How many mipmaps does a texture have in OpenGL

Nevermind that I'm the one who created the texture in the first place and I should know perfectly well how many mipmaps I loaded/generated for it. I'm doing this for a unit test. There doesn't seem to be a glGetTexParameter parameter to find this…
Ted Middleton
  • 6,859
  • 10
  • 51
  • 71
17
votes
2 answers

Trouble plotting with PyOpenGL

I would like to use Qt and PyOpenGL to do some real time plotting and learn a bit about OpenGL, but am having trouble even getting my initail test data to show up. The idea is to store the x-coordinates and y-coordinates in different buffers since…
user2027202827
  • 1,234
  • 11
  • 29
17
votes
10 answers

PyOpenGL TypeError: 'NoneType' object is not callable

I am trying to learn the basics of game programming and I have installed pygame and pyopengl for that. MyCode: import sys import OpenGL from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * def draw(): …
RanRag
  • 48,359
  • 38
  • 114
  • 167
15
votes
1 answer

How do I use gluLookAt properly?

I don't want to get into complex trigonometry to calculate rotations and things like that for my 3D world so gluLookAt seems like a nice alternative. According to the documentation all I need to do is place 3 coordinates for the cameras position,…
Matthew Mitchell
  • 5,293
  • 14
  • 70
  • 122
15
votes
5 answers

pyopengl: Could it replace c++?

I'm starting a computer graphics course, and I have to choose a language. Choices are between C++ and Python. I have no problem with C++, python is a work in progress. So i was thinking to go down the python road, using pyopengl for graphics part. I…
Tom
  • 43,810
  • 29
  • 138
  • 169
15
votes
2 answers

Just installed QtOpenGL but cannot import it (from Python)

I just installed it with apt-get on debian linux with apt-get install libqt4-opengl the rest of PyQt4 is available, but I cant get to this new module. from PyQt4 import QtOpenGL raises ImportError. any idea what to do?
Nathan
  • 6,095
  • 10
  • 45
  • 54
13
votes
5 answers

Unable to import opengl.gl in python on macos

I am using OpenGL to render a scene in python. My code works perfectly fine on windows but, for some reason, I'm having issues when importing opengl.gl on MacOS. The issue arises when calling from OpenGL.GL import ... in both python scripts and the…
Iyad Boustany
  • 153
  • 1
  • 2
  • 9
12
votes
2 answers

Attempt to call an undefined function glutInit

I need a glut window in python. I have the following exception using Python 3.5 and PyOpenGL.GLUT Traceback (most recent call last): File "D:\...\Test.py", line 47, in if __name__ == '__main__': main() File "D:\...\Test.py", line…
Szabolcs Dombi
  • 5,493
  • 3
  • 39
  • 71
1
2 3
62 63