wglUseFontOutlines & VB.NET

wglUseFontOutlines & VB.NET

Post by Mike Evan » Sat, 23 Mar 2002 10:30:03



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);

Quote:}

GLDLL2_API void glPrint(const char * foo)

{

glPushAttrib(GL_LIST_BIT);

glListBase(1);

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

glPopAttrib();

Quote:}

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)

 
 
 

wglUseFontOutlines & VB.NET

Post by David » Sat, 23 Mar 2002 18:59:15




Quote:> 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..

sorry i dont have the solution (im not using .net yet..)
but i would like  to know with wrapper do you use...

Thanks

Davide

 
 
 

wglUseFontOutlines & VB.NET

Post by anderso » Sat, 23 Mar 2002 07:49:01


Me too, I would like to know what wrapper you use.




> > 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..

> sorry i dont have the solution (im not using .net yet..)
> but i would like  to know with wrapper do you use...

> Thanks

> Davide

 
 
 

wglUseFontOutlines & VB.NET

Post by RO » Sat, 23 Mar 2002 19:57:04


Me too, I would like to know what wrapper you use.

Richard Opfermann



> Me too, I would like to know what wrapper you use.





> > > 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..

> > sorry i dont have the solution (im not using .net yet..)
> > but i would like  to know with wrapper do you use...

> > Thanks

> > Davide

 
 
 

1. OpenGL & VB.NET

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

2. opengl and vb ... some references?

3. VB.NET & DirectX

4. Mac vs PC

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

6. poor quality gif's

7. wglUseFontOutlines & Win2K

8. Convert from 8bit to 1bit bitmap

9. wglUseFontOutlines & SGI libs

10. wglUseFontOutlines & Mesa

11. VB.NET, cards.dll, PictureBox

12. APIs and VB.net

13. Question on CreateDIBSection under VB .Net