[PyOpenGL-Users] Problem attaching Texture to FBO on intel GMA 45000MHD (error when calling glFrame
Brought to you by:
mcfletch
From: Thomas H. <tho...@gm...> - 2010-02-04 18:06:53
|
Hi everyone, I using PyOpenGL 3.0.1b2 on Windows 7 on a Dell XT 2 tablet PC (http://www.dell.com/tablet). The tablet has a intel GMA 4500MHD graphics chip with the newest drivers from intel installed. I'm having problems creating a Framebuffer object using pyOpenGL. The following code runs fine on every machine I have access to except for this one. I know the graphics chip has FBO support, and have successfully compiled and run various C programs using FBO's. The problem occurs when I call glFramebufferTexture2DEXT, to attach my texture to the FBO. The program crashes and prints a traceback with GL error code 1286, which I believe is INVALID_FRAMEBUFFER_OPERATION_EXT. If anyone knows what I am doing wrong, has a workaround, or even just a suggestion of identifying the problem better, I would be very thankful. I'm posting a code snippet and the output it produces. I know teh code isnt complete and nothing is actually done with the fbo etc. but its enough to crash the program, and demonstrates the first problem I encounter on this machine. The code: ======================================================================= import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GL.EXT.framebuffer_object import * def draw (): glClearColor(0.0,0.0,0.0,0.0) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) #draw stuff here pygame.display.flip() pygame.init() pygame.display.set_mode((512,512),OPENGL | DOUBLEBUF) #setup a texture tex = glGenTextures(1); glBindTexture(GL_TEXTURE_2D, tex); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, None); glBindTexture(GL_TEXTURE_2D, 0); #setup teh fbo fbo = glGenFramebuffersEXT(1) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo) glBindTexture(GL_TEXTURE_2D, tex) #this call produces an error! glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,GL_TEXTURE_2D, tex, 0) while 1: event=pygame.event.poll () if event.type is QUIT: sys.exit(0) draw() Here is the output: =================================================================== Traceback (most recent call last): File "test.py", line 29, in <module> glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,GL_TEXTURE_2D, tex, 0) File "C:\Python26\lib\site-packages\pyopengl-3.0.1b2-py2.6-win32.egg\OpenGL\platform\baseplatform.py", line 335, in __call__ return self( *args, **named ) File "C:\Python26\lib\site-packages\pyopengl-3.0.1b2-py2.6-win32.egg\OpenGL\error.py", line 208, in glCheckError baseOperation = baseOperation, OpenGL.error.GLError: GLError( err = 1286, baseOperation = glFramebufferTexture2DEXT, cArguments = ( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, 1L, 0, ) ) Thanks alot!! -- Thomas Hansen |