Re: [PyOpenGL-Users] Anyone feel like looking up glGet constant return sizes?
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2014-04-10 19:30:12
|
On 14-04-10 12:41 PM, Walter White wrote: > 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 Thanks, that's exactly what I needed. They appear to be using a manually maintained mapping in regaltrace.cpp, but that's okay, someone else's manual can be our automatic. The approach of having all getsizes in the same mapping works nicely too, as we can use the same code/lookup for all of the output parameters. Much obliged, Mike > 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 >> > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |