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
0
votes
1 answer

Which technology should I use to develop this fisheye perspective game?

I'm going to develop a 3D game, that a player walks in a maze with a 3D first-person perspective, collects things and escapes a monster. The game itself is very simple, but as it is not for entertainment, but for a biological experiment, so it has…
Timothy
  • 4,467
  • 5
  • 28
  • 51
0
votes
1 answer

No valid context when using glutMouseFunc in python

I'm trying to write program in Python using PyOpenGL which I need to use glutMouseFunc for some mouse functionality but when I run the program I get the following error: Traceback (most recent call last): File "teapot.py", line 80, in
2hamed
  • 8,719
  • 13
  • 69
  • 112
0
votes
1 answer

PyOpenGL Drawing a Cube with VBOs

I have a question (well a few actually) 1) How do you render a cube in Python with Vertex Buffer Objects? 2) How could I relocate that cube several times 3) How would I go about not rendering certain faces on it? (I have an Octree to store the…
Brian Smith
  • 55
  • 4
  • 13
0
votes
3 answers

Simple OpenGL / GLSL program does not work

Question: What is wrong with this simple OpenGL/GLSL program? It is supposed to produce a quad with a red-green color gradient. But I just get a black window, and no error messages. import numpy from OpenGL.GL import * from PySide.QtCore import…
Johan Råde
  • 20,480
  • 21
  • 73
  • 110
0
votes
1 answer

how to defining the contour of a shape PyOpenGL

I have a one problem,I have many Sphere's in my scene with PyOpenGL, but I can't get differentiate one from another sphere. How it's possible create a contour over the shape ?.
Cristian
  • 1,480
  • 5
  • 32
  • 65
0
votes
3 answers

How to Rotate a object3D in PyOpenGL?

I am trying to rotate one object in the X-axis, but I don't get. I have a class Object 3D it's: class Object3D(): implements( IRenderizable ) def __init__(self, parameters={} ): self.parameters = parameters self.ID=…
Cristian
  • 1,480
  • 5
  • 32
  • 65
0
votes
0 answers

Shader raises RuntimeError: Validation failure (0):

Depending on the value of MAX_LIGHTS the following shader code raises the following exception. Any idea why this is? What am I missing? /usr/lib/python2.7/site-packages/OpenGL/GL/shaders.pyc in compileProgram(*shaders, **named) 194 program…
Sardathrion - against SE abuse
  • 17,269
  • 27
  • 101
  • 156
0
votes
2 answers

No module named opengl.opengl

I am trying to run a python script on my mac .I am getting the error :- ImportError: No module named opengl.opengl I googled a bit and found that I was missing pyopengl .I installed pip.I go to the directory pip-1.0 and then say sudo pip install…
Manish
  • 1,729
  • 5
  • 32
  • 47
0
votes
1 answer

pyopengl shader warning/info confusion over chose alternate

I have a small pyopengl piece of code that uses shaders. I get the following "info" log messages but have no idea what they mean and the documentation is poor -- or I could not find it. Anyone could clarify what those mean? INFO [ …
Sardathrion - against SE abuse
  • 17,269
  • 27
  • 101
  • 156
0
votes
1 answer

PyOpenGL Cube Mapping Textures

i've tried texture_2D to push textures on my cube. thats no problem. but when i use TEXTURE_CUBE_MAP the textures aren't visible. Just a black cube. Can anybody help me? #### INIT FUNCTION textureIDs = glGenTextures(1) …
kate25
  • 21
  • 5
0
votes
1 answer

How to use FreeGLUT glutMouseWheelFunc in PyOpenGL program?

I have installed PyOpenGL from here for 64-bit Python 3.x and Windows 7. I am able to write and execute a PyOpenGL program that uses glutMouseFunc to listen to mouse button clicks: from OpenGL.GLUT import * from OpenGL.GL import * # Imagine the…
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
-1
votes
0 answers

Pyopengl on pydroid3

Trying to get pyopengl working with Pydroid 3 on my android and can't quite get it to work. It throws me an error when I try to import it: Traceback (most recent call last): File "/data/user/0/ru.iiec.pydroid3/files/temp_iiec_codefile.py", line 3,…
-1
votes
0 answers

An error happened while installing `PyOpenGL-accelerate` in editable mode

I'm following mcfletch's instructions to install and use PyOpenGL. However, I get an "An error happened while installing PyOpenGL-accelerate in editable mode." after running the last command, $ pip install -e .. All previous commands... $ pip…
-1
votes
0 answers

Keyboard Interrupt in Opengl after taking user input

I am using Mid-point Line Drawing Algorithm to draw a shape in Opengl on Pycharm IDE. I have used the functions find_zone() and draw_line() to do that. I have used another function called transform() that will shift the shape by 200 units right and…
-1
votes
1 answer

Creating a depth cube

This post has been updated I am using the following two stackoverflow references a, b, to help me build a cubemap with depth values of a scene. However I have been having multiple problems and I have no idea how to resolve these. Here are bits of my…
marcos
  • 134
  • 15