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 something with OcclusionQuery.
http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_...
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?
...
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 pyOpenGl and wxPython to do the graphics stuff. Unfortunately, I'm a C# programmer that h...
I'm using a 3rd party DLL to load in some raw image data, and I want to use this raw image data as a texture in openGL. However, the c function returns a void*, and I need to somehow convert this so it will work as the "pixels" parameter to glTexImage2D. Right now my code looks like something this:
data = c_void_p(vdll.vlImageGetData(...
I'm currently working on a game engine written in pygame and I wanted to add OpenGL support.
I wrote a test to see how to make pygame and OpenGL work together, and when it's running in windowed mode, it runs between 150 and 200 fps. When I run it full screen (all I did was add the FULLSCREEN flag when I set up the window), it drops down...
Is there a cross platform way to get the monitor's refresh rate in python (2.6)? I'm using Pygame and PyOpenGL, if that helps.
I don't need to change the refresh rate, I just need to know what it is.
...
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?
...
My problem is I want to keep rotating the scene if the checkbox is checked, and stop this rotation immediately once it is unchecked. However, "keep rotating" means an infinite loop...
So after entering the loop, the program gets kind of freezed and no longer react to my "uncheck" signal. Is there a way to interrupt this loop? The follow...
Hi,
My program uses PyOpenGL (so it's Python) with psyco.
I have around 21,000 line segments which I need to render in each frame of my render (unless the user zooms in, in which case line segments are culled and not sent to the card at all). This is currently taking around 1.5 seconds each frame to complete. That's just not good enoug...
Hello, I've begun playing around with OpenGL in Python using PyOpenGL 3.0.1b.
I looked at some sample code and started running it and modifying it etc. All was well until I became a little less ignorant.
On http://pyopengl.sourceforge.net/documentation/manual-3.0/index.xhtml the OpenGL functions are listed as well as whether or not th...
I want to use glClear and glClearColor to fill a frame buffer with a colour including alpha transparency. However the framebuffer always renders as opaque when binded to a texture which is rendered to the screen.
I want everything which is rendered to the framebuffer to kept their transparency. I just want to change the background.
See...
I'm using glcanvas for providing 3D opengl object to wxpython.
Every time I place the mouse on drawn object there is some flickering of this object: it generates OnPaint and rotates scene on some small angle. I can't track a reason that generates OnPaint and where the rotating takes place - sure it is not in my code.
Any ideas? Is ther...
I'm trying to batch up a bunch of vertices and texture coords in an interleaved array before sending it to pyOpengl's glInterleavedArrays/glDrawArrays. The only problem is that I'm unable to find a suitably fast enough way to append data into a numpy array.
Is there a better way to do this? I would have thought it would be quicker t...
Hi everyone.
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 have heard though, that performance is an issue.
Is python / pyopengl ma...
I have this code:
def setup_framebuffer(surface):
#Create texture if not done already
if surface.texture is None:
create_texture(surface)
#Render child to parent
if surface.frame_buffer is None:
surface.frame_buffer = glGenFramebuffersEXT(1)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer)
glFramebufferTexture2DEX...
This question repeats my earlier one but my earlier one was a failure because I didn't copy some vital information correctly, so I have to redo it.
I'm getting an error with a call to an OpenGL function. Maybe pyglet isn't initialising OpenGL correctly? The error happens with a simple function that worked before:
def setup_framebuffer...
I'm writing a program using wxPython and OpenGL. The program works, but without any antialiasing, and I get these error messages: (I'm using ArchLinux)
INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named OpenGL_accelerate
However, when I look into my site-packages folder, I see the module present there. I...
My vertices are interleaved in a numpy array (dtype = float32) like this: ... tu, tv, nx, ny, nz, vx, vy, vz, ...
When rendering, I'm calling gl*Pointer() like this (I have enabled the arrays before):
stride = (2 + 3 + 3) * 4
glTexCoordPointer( 2, GL_FLOAT, stride, self.vertArray )
glNormalPointer( GL_FLOAT, stride, self.vertArray + 2 ...
I've been looking around for a way to anti-alias lines in OpenGL, but none of them seem to work... here's some example code:
import pyglet
from pyglet.gl import *
window = pyglet.window.Window(resizable=True...
I want to start learning OpenGL but I don't really want to have to learn another language to do it. I already am pretty proficient in python and enjoy the language. I just want to know how close it is to the regular api? Will I be able to pretty easily follow tutorials and books without too much trouble?
I know C++ gives better performa...