[PyOpenGL-Devel] [ pyopengl-Bugs-2946226 ] glFramebufferTexture2DEXT causes error , etc.
Brought to you by:
mcfletch
From: SourceForge.net <no...@so...> - 2011-11-13 18:12:48
|
Bugs item #2946226, was opened at 2010-02-04 14:59 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2946226&group_id=5988 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: GL Group: v3.0.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Mike C. Fletcher (mcfletch) Summary: glFramebufferTexture2DEXT causes error , etc. Initial Comment: 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, ) ) So I think I figured out whats going on: in pyOpenGL error.py from line 202, you guys have: =========================================== err = self._currentChecker() if err: # GL_NO_ERROR's guaranteed value is 0 raise GLError( err, result, cArguments = cArguments, baseOperation = baseOperation, ) =========================================== Now, GL_NO_ERROR might always be 0. but getting teh error code after e.g. attaching a texture to an FBO, using glFramebufferTexture2DEXT does not return GL_NO_ERROR, even though everything went great. It's supposed to return GL_FRAMEBUFFER_COMPLETE_EXT (36053 int value), which is what I get if i turn of ERROR_CHECK and check manually after attaching the texture. So I think the code generates an error, where there is none. Not sure why it works fine on my nvidia gpu's..maybe teh openGL spec isn't definitive on this one? Still not sure why I get a NullFunctionError for glDeleteFrameBuffersEXT when I turn on ERROR_CHECK (again works fine without). Also, bool(glGenFrameBuffersEXT) returns False, although the function is available. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-11-13 10:12 Message: oeZnzl <a href="http://ulkhbtgxubjf.com/">ulkhbtgxubjf</a>, [url=http://knfasaeavofl.com/]knfasaeavofl[/url], [link=http://pkyhziwcwrsj.com/]pkyhziwcwrsj[/link], http://fmnrxexprzbx.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-07-24 04:34 Message: 97vlLq <a href="http://gloyezbzsonq.com/">gloyezbzsonq</a>, [url=http://mhdefdhodbow.com/]mhdefdhodbow[/url], [link=http://seeflacnjjej.com/]seeflacnjjej[/link], http://anyuvzsqzlwz.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-07-23 18:25 Message: LakZxM <a href="http://rujulmwfexvd.com/">rujulmwfexvd</a>, [url=http://mjasbgdkbspx.com/]mjasbgdkbspx[/url], [link=http://epmkeqfgvmbz.com/]epmkeqfgvmbz[/link], http://cwidmgpybpwo.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-07-21 23:25 Message: zci3N9 <a href="http://ongahxuoxouj.com/">ongahxuoxouj</a>, [url=http://tgjqsxobckla.com/]tgjqsxobckla[/url], [link=http://jeycpejgectl.com/]jeycpejgectl[/link], http://qgolshomtkib.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-06-20 01:37 Message: i0JeBJ <a href="http://omuvzagdafpf.com/">omuvzagdafpf</a>, [url=http://jhknieunhttm.com/]jhknieunhttm[/url], [link=http://fxcswseceghi.com/]fxcswseceghi[/link], http://wlllhxwwowdl.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-06-06 04:10 Message: LTt2UF <a href="http://qliwugxokplr.com/">qliwugxokplr</a>, [url=http://qprrkrlnsobz.com/]qprrkrlnsobz[/url], [link=http://aglhzqhucanw.com/]aglhzqhucanw[/link], http://tdserxexphjv.com/ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-04-07 12:12 Message: GoBq28 <a href="http://xgzlmfcoichk.com/">xgzlmfcoichk</a>, [url=http://bulkmyoywvrs.com/]bulkmyoywvrs[/url], [link=http://hxztksvkrior.com/]hxztksvkrior[/link], http://cfnlymbmybna.com/ ---------------------------------------------------------------------- Comment By: Mike C. Fletcher (mcfletch) Date: 2010-02-22 11:30 Message: glError() should not return GL_FRAMEBUFFER_COMPLETE_EXT on any conformant system. http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt adds GL_FRAMEBUFFER_INCOMPLETE_EXT to the glError enum. Basically it sounds like we've got a driver error here. The nVidia cards are doing the right thing. wrt the null-function error: the error checking *also* checks for NULL functions, so if you're getting bool() == False you'd expect the error-raising behaviour. The bool() checks are quite simple, so if bool( entrypoint ) is giving False I'd suspect we're seeing a real failure to resolve the entry point. Why that would happen I can't say just now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2946226&group_id=5988 |