Re: [PyOpenGL-Users] Anyone feel like looking up glGet constant return sizes?
Brought to you by:
mcfletch
From: Walter W. <hom...@gm...> - 2014-04-10 16:41:43
|
I guess you mean COMPSIZE()? Did some research on this and I found a Python script in Chromium git repo that parses the OpenGL specs. Starting at line 202 is a function parse_arg which parses the COMPSIZE parameter starting at line 234. It looks a bit cryptic to me, but maybe you can find out what they are doing. You can find it here: http://git.chromium.org/gitweb/?p=external/p3/regal.git;a=blob_plain;f=src/apitrace/specs/scripts/glspec.py;hb=f21b08d5bf82f6670ecea07a44a77d537cfc4f24 Kind regards, Walter Am 08.04.2014 06:15, schrieb Mike C. Fletcher: > On 14-04-03 05:53 AM, Walter White wrote: >> I hope this is what you are looking for...just asked the OpenGL IRC. >> They told me they are listed in the xml files in this folder >> >> https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/ >> >> and can be parsed. >> >> Or in glcorearb.h >> https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/GL/glcorearb.h >> >> Hope that helps, >> >> Walter > It did help, as it reminded me that the enum-groups are present in the > xml files, so I can be sure we get all of the constants groups/tracked. > However the xml files don't specify the *sizes* of the result arrays. > That is, there's a notation saying CALCSIZE() in the xml files, but > nothing I can see that tells you what the CALCSIZE() operation should do > given a particular parameter. > > I suppose we could have a fallback path where we did what PyOpenGL 1.x > did, namely allocate a huge buffer, fill it with an obscure value, and > count how many values are not set to the obscure value on completion. > That feels pretty gross, though. > > Thanks, > Mike > |