Re: [PyOpenGL-Users] access violation when calling glGenFramebuffers
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2013-04-05 13:44:38
|
On 13-04-04 06:21 PM, Chris Barker - NOAA Federal wrote: > On Thu, Apr 4, 2013 at 10:31 AM, Mike C. Fletcher > <mcf...@vr...> wrote: ... >> As for the original error, it *could* be that there's a problem with 64-bit >> windows there, but I'm a bit skeptical, as 64-bit Linux doesn't show any >> problems, and the test_core.py script actually generates a framebuffer >> during testing if glGenFrameBuffers is available. That's my very first >> smoke-test for the build working on any platform. > well, IIUC, LInux (gcc) 64 bit gives you 64 bits for and "int" and > Windows (MSVC) gives you 23 bits for an "int", or something like that > -- there is defiantly a difference in there somewhere (maybe it's > long?) Anyway, I think it sure could be a non-issue on LInux, and kill > you on windows. I'm pretty sure we would have hit a 23-bit integer bug before this :) . All of PyOpenGL is using GLint = ctypes.c_int (which was taken from the Linux GL headers), and if my reading of the spec is correct, c_int is pretty close to what is meant (it should be c_long, as the minimum width is 32 bits, but I don't think there are any platforms we actually support which use 16-bit ints). That said, now that I read up on Windows, it seems that Win64 *does* use different conventions for long (doesn't expand it to 64-bit, apparently) vs. long long, and it is possible that we have something in there casting to an integer or long (instead of size_t/ptr types). There are a number of places where we have to do data-casts for pointers to/from integer-like types, and if something in those chains is of the wrong size, we might see an error. I spent an hour or so getting a development environment set up again on Windows (my other laptop died), so I may be able to track down the failure if I can get some more time today. I've got 64-bit Windows, but with AMD video card. Enjoy, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |