View Full Version : C++ wrappers for GL functions?
11-23-2001, 08:57 AM
In C++, typing "3f" or "3fv" after "glVector" is just silly. What are my options for C++ wrappers to OpenGL? I'm working under Win32, Visual C++ if that matters.
11-23-2001, 09:16 AM
You could write your own http://www.opengl.org/discussion_boards/ubb/smile.gif
11-23-2001, 09:19 AM
You don't know how many times I've done that for other APIs...
...or how much I loved programming under BeOS, where the API to the OS is C++.
11-23-2001, 09:34 AM
Well OpenGL is a C API not C++ so get over it.
If you hate typing that much then write your own rappers.
For me I prefer the way it is, because I know I'm using the correct function for what I want.
11-23-2001, 10:41 AM
> Well OpenGL is a C API not C++ so get over it.
Actually, OpenGL is a binary API. You can write wrappers/headers for it in any language. As the spec points out.
11-23-2001, 10:47 AM
Alright! Let's do the COBOL API! How about a PL/1 or AS/400 API? (Hehehehe.... now THAT would be fun :-) )
I don't really know beans about this, but I think that part of the beauty of OGL is that it fits so nicely into your own methods of your own classes. I mean, nobody looks at my MyBGLView::drawX() but me... Inside there, I don't really mind mucking around with the 3f's or 3fv's because they're contained.
11-23-2001, 06:16 PM
"Actually, OpenGL is a binary API. You can write wrappers/headers for it in any language. As the spec points out."
It's still a C API that is distributed in a binary form (normally), the exposed interface is C exposed via the headers.
What about OpenGL for other languages then, like BASIC, FORTRAN? Binding for several languages exists, including C. C just happen to be one of the more used languages.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.