SDK support for Visual Basic 6?

I noticed there are still quite a few people using OpenGL in combination with VB6. I still use it myself for quick tests/prototyping, tools and simple data viewers.

While the VB6 crowd is arguably rather small and not really high priority, it should be relatively easy to automatically generate an ODL (Object Definition Language) file from which a TLB (Type Library) can be build. TLBs are essentially the VB equivalent of C++ header files (though they are binary and can include a lot more info).

My questions are:

  1. worth supporting VB6 at all?

  2. could the SDK supply an ODL and/or TLB file?

  3. if not, will there be access to the necessary strings so individuals can generate their own ODL file, build their own TLB?

Considering that we don’t even have a software SDK to support C/C++, I wouldn’t get my hopes up on an official SDK to keep VB6 up-to-date.

Ok. I agree that a ODL/TLB would only be a major convenience, and probably shouldn’t belong to an SDK anyway if there aren’t other language-specific things included.

To get to my third point: I created my own ODL file by writing a small script that parsed the gl.h header file and did a Google search to get strings from the extension specs, but still required lots and lots of manual work (which is very error prone). If there were a central source with all these strings (constants, functions, parameters, short description of function) then generating code should be much easier and safer.
It could be used for a variety of things.

I remember from an older thread here that some string data would be available in XML form so code could be automatically generated from it, for example for extension libraries such as GLEW. What happened to that idea?

You could try using the .spec files on http://www.opengl.org/registry/ . These are used to generate the .h files, and they’re in a slightly more usable format.

Regards
elFarto

Well, like you said those are only slightly more usable than the derived headers. As far as parsing concerned it doesn’t make much difference.

The nice thing about TLB files is that they can include info from the manual. You can easily view this in the IDE. For example, the function glColor3f will be accompanied by the string “Sets the current color”.

Maybe it would be nice the manual and spec files would be merged, so you have everything together in one place.

Well, just thinking out loud. :slight_smile:

I just found out that ODLs may be used to create Java bindings for OpenGL, so I’ll look around and see if another project may already have such file - or tools to create one - available.

How could you use GL 2.1 functionality on VB6?
I think you need a dll wrapper written in C that can get the function pointers. You should be able to use glew32.dll

Originally posted by V-man:
How could you use GL 2.1 functionality on VB6?
I think you need a dll wrapper written in C that can get the function pointers. You should be able to use glew32.dll

Yes, all function pointers must be routed through a DLL. Because type libraries are passive, they need a fixed entry point to point to. Because OpenGL32.dll was never updated, there never was a TLB created for GL versions newer than 1.1. Someone could have created an additional helper DLL but that never happened.

There was some talk about adopting an extension loader (GLEW) for the SDK. A accompanying TypeLib would then fit nicely, hence my questions.


I will see if I can update my GL Type Library to version 2.1 by using GLEW. I think a few DLL compilers can auto-generate ODLs. If it works out I’ll make it available along with source an announce it here.

As far as the next versions of OpenGL (LP), will there be a DLL or function pointers like extensions?
I’m willing to build a TypeLib for that too, but I like to know what to expect.