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

Implementing JPEG or JPEG2000 on GPU

I have a project where I should implement JPEG on a GPU. Can anyone tell me where to start and how should I implement the algorithm? I have installed Python, PyOpenCL and PyOpenGL. I also have Code Blocks and Microsoft Visual Studio.
Beginner1111
  • 41
  • 1
  • 9
0
votes
1 answer

pyOpenGL check for bool

This is my source code https://paste.fedoraproject.org/428184/89404314/ The error I got is this: C:\Python27>python.exe wx_gl_vbo_001.py Traceback (most recent call last): File "wx_gl_vbo_001.py", line 63, in MyApp(redirect =…
0
votes
1 answer

OpenGL: How do I apply a texture to this cube?

I'm trying to learn OpenGL, and I've been going through a lot of tutorials on loading a texture, but every single one seems to miss the most important step: how do I actually put a texture on something? I'm using Python for this, and here is my…
Matthew Fournier
  • 1,077
  • 2
  • 17
  • 32
0
votes
0 answers

Python 2.7 + Spyder + issues with OpenGL.GL, OpenGL.GLU, OpenGL.GLUT

I am using python 2.7 , and spyder as my IDE. However, I keep getting this warning message for each of the import statements. 'from OpenGL.GL import *' used; unable to detect undefined names 'from OpenGL.GL import *' used; unable to detect…
Tom DelFranco
  • 31
  • 1
  • 5
0
votes
1 answer

pygame.display.flip - gives this error: "pygame.error: video system not initialized"

Hi I need help on Wing IDE 101 because when I try to run my code, the actual program works fine. But after I exit out of it, the shell gives me this error: Traceback (most recent call last): File "/Users/kimh2/Desktop/project_1/projectcode_1.py",…
Hyungjun
  • 65
  • 7
0
votes
1 answer

Pyopengl tessellating polygons

I have polygons in the form: [(1,2), (2,4), (3,4), (5,6)] I need tessellation to draw them, but glutess is too complicated. Opengl cannot handle convex polygons. I think I need something…
user1212520
  • 501
  • 1
  • 5
  • 15
0
votes
1 answer

Trouble using OpenGL mouse callbacks in Pygame

I'm using OpenGL through Pygame to render things and I want to get OpenGL mouse information. I know that I can get mouse position & click state directly through Pygame, but I need mouse position in OpenGL's coordinates, not just pixel coordinates…
J-bob
  • 8,380
  • 11
  • 52
  • 85
0
votes
0 answers

pyopengl / pyqt (glClear) framebuffer failure on python 2.7.11-5 (and later versions)

I have a visualisation package, written using pyopengl and pyqt. When I use Anaconda to create a python environment with python 2.7.11-0 (in OSX Yosemite v10.10.5) everything works fine: conda create -n dep_test python=2.7.11=0 six numpy scipy…
Chris Sewell
  • 679
  • 1
  • 7
  • 19
0
votes
1 answer

NameError when running pyglet

I'm trying to do my uni project and I'm using pyglet for the task . This is part of the code that makes me a problem. from pyglet.gl import * from pyglet.window import key from pyglet.window import…
djidara696
  • 35
  • 8
0
votes
0 answers

Why does source blending blend with garbage in a framebuffer that has been cleared?

I call gl.glClearColor(*[ 0., 0., 0.0, a]) gl.glClear(gl.GL_COLOR_BUFFER_BIT) gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) Then I draw my scene. If a is zero, it appears that nothing is cleared and the buffer appears to be…
Neil G
  • 32,138
  • 39
  • 156
  • 257
0
votes
1 answer

pyopengl, glUseProgram, Access violation

I have made a program that draws some structures on a QtOpenGL.QGLWidget. It is working on all computers, that it has been tested on, except for a new windows machine with a NVidia Geforce 840m graphic card. It fails on the command: glUseProgram(0)…
Mads M Pedersen
  • 579
  • 6
  • 16
0
votes
1 answer

openGL: Turn the whole scene or "orbiting" the camera

OpenGL seems as a nice library with a good community. After following some tutorials and reading some explanations I had the feeling I got the basics. Still, I struggling with the camera. I get that with OpenGL the camera is static and that to…
0
votes
1 answer

Update method in Pyglet

I am new to pyglet and I have a question about the image on the screen update. Necessary each time the mouse pressed to change the count, but I have all the time is zero, where did I go wrong and how can I fix it? from pyglet.window import…
Belogurow
  • 23
  • 1
  • 8
0
votes
0 answers

pyOpenGL rendering incorrectly with NVIDIA (Fine with Integrated Graphics)

I have been having a problem in pyOpenGL when placing a real-time rendered texture onto a warped mesh. The problem is that the mesh is somewhat visible as can be seen in the below image: However, this only occurs when I am using my NVIDIA graphics…
Juls0419
  • 39
  • 4
0
votes
1 answer

PyOpenGL Polygon See Through Colors

I have a problem with PyOpenGL. this is my code: import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * from math import * a=[[cos(0.5*pi/180),sin(0.5*pi/180),0], [-sin(0.5*pi/180),cos(0.5*pi/180),0], …
p.h
  • 3
  • 2