From: Ben H. <be...@ex...> - 2001-09-10 23:40:18
|
Cool stuff. On pages 23-30 of the "OpenGL Reference Manual" there is a list of what constants can be used by which OpenGL functions. It should save a lot of time if you ever want to create the enumerations. BTW here is a zip of the most common OpenGL manuals: "OpenGL Reference Manual" "OpenGL Programming Guide" "OpenGL for Windows NT" http://www.exocortex.org/opengl-books.zip Cheers, -ben houston 4th Year Cognitive Science/Neuroscience Carleton University, Ottawa, Canada ( be...@ex... / 613-266-0637 ) > -----Original Message----- > From: csg...@li... [mailto:csgl-users- > ad...@li...] On Behalf Of Lloyd Dupont > Sent: Monday, September 10, 2001 7:25 PM > Cc: csg...@li... > Subject: Re: [Csgl-users] Suggestion: Enums for OpenGL... > > Hy !! > > Ben Houston wrote: > > > Hi all, > > I notice in the OpenGL library there are functions such as: > > GL.glGetIntegerv( int pname, int *params ); > > GL.glGetFloatv( int pname, float *params ); > > GL.glGetDoublev( int pname, double *params ); > > > > Why not write some small wrappers > > it is already done ! but i cannot make a release each time i make a > change, this would become quickly boring ! > But CVS is for this. > > actually i even write a nice (polymorphic) version: > [DllImport("opengl32")] > glGetIntegerv( int pname, int[] params ); > [DllImport("opengl32")] > glGetIntegerv( int pname, int* params ); > > > as you see both point on the same version ! (and this is a valid and > tested line). though i cannot do this for any function as, for example, > obviously glTexImage2D wouldn't be feed by a byte[]. > so i have to check each function. > > actually there is nice wrapper for glNormal, glVertex, glColors, > glLightModel, glGetInteger/Double/Float > > BTW if any one is willing to check each function and report me ??? > (or send patch and the like ?) > (i wil update myself, just after (CVS)) > > there is also a wrapper for glTexImage2D, as i said, but i am not very > happy with it. > > there is also one other nice change in OpenGL (again, not yet released > but already on CVS) > > the inheritance graph is now: > System.Windows.Forms.Control > OpenGL.GL > OpenGL.OpenGLControl > so if you write your code in a subclass of OpenGLControl you even don't > have to write "GL." !! (and it is perfectly backward compatible !) > > that's all for OpenGL, now i am concentrating on SDL and Web Demo (for 1 > to 2 weeks) > > for your other question i already had a dicussion with jan Nockeman on > this topics and put it in the FAQ (copied below), anyway one argument is > that this involve perfect knowledge of all constant and lot of free time > devoted to this .... (and a lot of work) (though it has advantage), so... > how to say.. i could think to it, one day... > ----------- the faq --------------- > Difficult question with a lot of arguments and counter arguments > which are the following > > (-) One day i plan to automatically translate headers (.h) files to C# > (.cs) files using some sort of tool i would either find or write. With > this in mind it appear that #define should naturally be translated into > const > (-) It is so easier to translate C code to C# code, just by prefixing gl > const and function by "GL." > (-) It is a lot of work to manually translate all this constants and > function. Actually i use a mix of sed & awk > (+) with enum you could easily find needed argument for a given function > (+) with enum you couldn't use value where you shouldn't > > With this in mind i want to let you know that if i receive a lot of mail > asking for an "enum version" i could plan to write one, a day. For this > i already think to write a new class, let me say "GL2", with the same > functions, but taking some enum instead of uint as arguments. > > > _______________________________________________ > Csgl-users mailing list > Csg...@li... > https://lists.sourceforge.net/lists/listinfo/csgl-users |