Re: [PyOpenGL-Users] access violation when calling glGenFramebuffers
Brought to you by:
mcfletch
From: Chris B. - N. F. <chr...@no...> - 2013-04-04 15:56:25
|
On Wed, Apr 3, 2013 at 10:24 AM, Cyrille Rossant <cyr...@gm...> wrote: > How much RAM do you have? If you have an Intel HD card I suppose that you > don't have so much memory that you absolutely need Python 64 bits (with 32 > bits you're probably limited to ~4GB objects). actually 2GB on Windows, and I think that's for the whole process -- but that's still a lot for most applications. >> I replaced >> >> self.framebuffer_id = glGenFramebuffers(1); >> >> with >> >> fbo = ctypes.c_uint(1) >> OpenGL.raw.GL.EXT.framebuffer_object.glGenFramebuffersEXT(1, >> ctypes.byref(fbo)) >> self.framebuffer_id = int(fbo.value) >> >> I'm not sure if the code is ctype-wise correct but I think that doesn't >> make a real difference for the error: >> >> Traceback (most recent call last): >> ... >> File "C:\Users\Patrick\Dev\PCT\open_gl_widgets.py", line 203, in >> __init__ >> OpenGL.raw.GL.EXT.framebuffer_object.glGenFramebuffersEXT(1, >> ctypes.byref(fbo)) >> File "C:\Python27\lib\site-packages\OpenGL\platform\baseplatform.py", >> line 379, in __call__ >> return self( *args, **named ) >> WindowsError: exception: access violation writing 0xFFFFFFFFE812A790 well, that is a bigger-than-32bit address -- I suppose it's possible that this is a 32/64 bit issue. Can you test it with 32 bit python? Even if you don't want to ultimatley go that route, it may give you a hint. Also, from teh ctypes docs: c_uint is a unsigned int you may have some issues there, an "int" is a really poorly defined type, and depending on the compiler, it may be 32 bits on 32bit systems, and 32 or 64 bit on 64 bit systems (and the MS compilers and gnu do it differently), so there could be some mis-match there. It's beyond me that C has survived this long with such soft defining of type sizes! Here's hoping that people start using the C99 defined size integer types sooner than later... (though from the looks of it, ctypes doesn't support those either...) Not sure this is any help, though. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |