OpenGL & VB.NET

OpenGL & VB.NET

Post by Mike Evan » Mon, 18 Mar 2002 12:28:14



Hi,

I know there are various methods of getting access to the OpenGL libs. in
VB, but I haven't yet found anything that works in VB.NET...  the old GL
type library for VB doesn't import correctly, as procedures must be in a
class.

Any ideas, or know of a wonderful new wrapper I haven't found yet?

Mike

 
 
 

OpenGL & VB.NET

Post by Ralph Vinc » Mon, 18 Mar 2002 23:24:21


Hi Mike,

I asked a similar question sometime ago in microsoft.public.dotnet.general I
think, or perhaps in this NG. I think I was looking for an OpenGL wrapper
for c#.

You may want to go into www.google.com, select groups search, and search on
the keywords 'c# opengl ralph' and it will likely show up.

Sorry, but I dont remeber the specifics as I have opted for the java
implementations -Ralph


> Hi,

> I know there are various methods of getting access to the OpenGL libs. in
> VB, but I haven't yet found anything that works in VB.NET...  the old GL
> type library for VB doesn't import correctly, as procedures must be in a
> class.

> Any ideas, or know of a wonderful new wrapper I haven't found yet?

> Mike


 
 
 

OpenGL & VB.NET

Post by David » Tue, 19 Mar 2002 19:05:59




Quote:> Any ideas, or know of a wonderful new wrapper I haven't found yet?

Hi, i have the same problem.. but i dont have VB.net to make some test...
have you tried with this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...
l/cpconimportingtypelibraryasassembly.asp

may be it contains some usefull information...

davide

 
 
 

OpenGL & VB.NET

Post by Mike Evan » Tue, 19 Mar 2002 21:10:45


Yes, unfortunately Microsoft, in their infinite wisdom, decided not to allow
module functions from COM objects... only class functions.

Mike




> > Any ideas, or know of a wonderful new wrapper I haven't found yet?

> Hi, i have the same problem.. but i dont have VB.net to make some test...
> have you tried with this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...
Quote:> l/cpconimportingtypelibraryasassembly.asp

> may be it contains some usefull information...

> davide

 
 
 

OpenGL & VB.NET

Post by David » Tue, 19 Mar 2002 22:17:24




Quote:> Yes, unfortunately Microsoft, in their infinite wisdom, decided not to
allow
> module functions from COM objects... only class functions.

:(
i think i 'll use vb6 for a long time ...
one solution is to add all the "declare function".. is still possible?
or use vc .net code for the opengl "code"....

very bad news...:(

Davide

 
 
 

OpenGL & VB.NET

Post by David » Wed, 20 Mar 2002 00:28:41




Quote:> Yes, unfortunately Microsoft, in their infinite wisdom, decided not to
allow
> module functions from COM objects... only class functions.

Mike may be i have nice news for you (and me if you confirm my
information...)

try this one http://csgl.sourceforge.net/.. it should work with any .net
language...may be...
please tell me if it works (i dont have -yet- the vb .net .. i cant do any
test...)

thanks

Davide

 
 
 

1. wglUseFontOutlines & VB.NET

Okie.. I found a wrapper for OpenGL that does work in VB.NET...
unfortunately, wglUseFontOutlines doesn't seem to want to work, no matter
how I pass parameters, define it..

I've put native c code in a DLL, and called the function, and it still will
not put anything on the screen. Is there some reason why VB.NET wouldn't let
usefontoutlines execute correctly?

My C DLL code and Function Definitions in VB are below:

What am I doing wrong?  The HDC is the vb. form.handle.toint32 function
call, to get the HWND of the form.

(I'm using a static List ID for debugging purposes:)

//GLuint base;

GLYPHMETRICSFLOAT gmf[256];

extern "C" {

GLDLL2_API void initFont(int size,HDC hDC)

{

HFONT font;

//base=glGenLists(256);

font=CreateFont(-size,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_TT_PR
ECIS,CLIP_DEFAULT_PRECIS,ANTIALIASED_QUALITY,FF_DONTCARE|DEFAULT_PITCH,"Aria
l");

SelectObject(hDC,font);

wglUseFontOutlines(hDC,0,255,1,0.0f,0.2f,WGL_FONT_POLYGONS,gmf);

GLDLL2_API void glPrint(const char * foo)

{

glPushAttrib(GL_LIST_BIT);

glListBase(1);

glCallLists(strlen(foo),GL_UNSIGNED_BYTE,foo);

glPopAttrib();

The Calling function Definitions in VB.NET for these functions are:

Declare Sub initFont Lib "gldll2.dll" (ByVal size As Integer, ByVal hDC As
IntPtr)

Declare Sub glPrint Lib "gldll2.dll" (ByVal foo() As Char)

2. Shadow Designer?

3. VB.NET & DirectX

4. MAYA / MTOR / Renderdive

5. DX VB.NET Vs DX VC++.NET

6. help qtvr

7. .Net & OpenGL

8. Problems with ImageLab (InDirectory)

9. VB.NET, cards.dll, PictureBox

10. APIs and VB.net

11. Question on CreateDIBSection under VB .Net

12. bitblt in vb.net

13. VB.net update for SafeArray2D + CopyMemory trick