Display 3D Font in MFC program

Display 3D Font in MFC program

Post by Qinhong Pa » Wed, 17 May 2000 04:00:00



I want to display 3D Font in my OpenGL program which is developed by MFC of
MS Visual C++ V6.0. (I use double buffer in the program.)

Could you please give some idea how to make it or some sample code available
on the web?

Thanks for your help.

Peter

 
 
 

Display 3D Font in MFC program

Post by Jon Whit » Thu, 18 May 2000 04:00:00



> I want to display 3D Font in my OpenGL program which is developed by MFC
of
> MS Visual C++ V6.0. (I use double buffer in the program.)

> Could you please give some idea how to make it or some sample code
available
> on the web?

> Thanks for your help.

> Peter

Check out wglUseFontOutlines()

Jon

 
 
 

Display 3D Font in MFC program

Post by Qinhong Pa » Thu, 18 May 2000 04:00:00


I check the help on the wglUseFontOutlines function of MFC. It says,
"With the current release of OpenGL for Windows NT and Windows 95, you
cannot make GDI calls to a device context when a pixel format is
double-buffered. You can work around this limitation by using
wglUseFontOutlines and wglUseFontBitmaps, when using double-buffered device
contexts. "

I am using the double buffer actually. It seems not clear how to make it
like the help says. Could you please give me some detail? Thanks.

Peter



> > I want to display 3D Font in my OpenGL program which is developed by MFC
> of
> > MS Visual C++ V6.0. (I use double buffer in the program.)

> > Could you please give some idea how to make it or some sample code
> available
> > on the web?

> > Thanks for your help.

> > Peter

> Check out wglUseFontOutlines()

> Jon

 
 
 

Display 3D Font in MFC program

Post by Stephane Routelou » Thu, 18 May 2000 04:00:00


You can also use the FreeType library ( www.freetype.org )

Stephane

--
=================================================
Stephane ROUTELOUS
C A D / C A M  -  C o n c e p t   G m b H
Albert-Einstein-Stra?e 14 . D-12489 Berlin

http://www.cad-cam-concept.de
phone  : +49 (0)30 63.92.65.38  
fax       : +49 (0)30 63.92.63.19
ICQ n : 18825398
=================================================



> > I want to display 3D Font in my OpenGL program which is developed by MFC
> of
> > MS Visual C++ V6.0. (I use double buffer in the program.)

> > Could you please give some idea how to make it or some sample code
> available
> > on the web?

> > Thanks for your help.

> > Peter

> Check out wglUseFontOutlines()

> Jon

 
 
 

Display 3D Font in MFC program

Post by ian hawle » Thu, 18 May 2000 04:00:00


Hi,

as said, you wglUseFontOutlines() call.
This is *not* a GDI call, but a windows function which
creates a display list for each character in the character set.

It should work fine for you, but you will need to read up
on the function call in order to write any text to the display.

Basically, there is not textout(), printf() or other function,
you have to build your own...

Hope that helps,

Ian

 
 
 

Display 3D Font in MFC program

Post by Joel Parri » Thu, 18 May 2000 04:00:00


You might check out NeHe's tutorials on text output.  They are organized in
smaller, bite size pieces and are easy to learn from.  They are developed in
the win32 API, but they will work in an MFC environment
http://nehe.gamedev.net/opengl.asp


Quote:> I want to display 3D Font in my OpenGL program which is developed by MFC
of
> MS Visual C++ V6.0. (I use double buffer in the program.)

> Could you please give some idea how to make it or some sample code
available
> on the web?

> Thanks for your help.

> Peter

 
 
 

Display 3D Font in MFC program

Post by Presenc » Fri, 19 May 2000 04:00:00


I have tried to use Nehe's code in my double buffered OpenGL window.
Couldn't get it to work. I just get wglErrors when I try to call the display
list. Any ideas on this one? The code works fine on my machine when compiled
seperately.


> You might check out NeHe's tutorials on text output.  They are organized
in
> smaller, bite size pieces and are easy to learn from.  They are developed
in
> the win32 API, but they will work in an MFC environment
> http://nehe.gamedev.net/opengl.asp



> > I want to display 3D Font in my OpenGL program which is developed by MFC
> of
> > MS Visual C++ V6.0. (I use double buffer in the program.)

> > Could you please give some idea how to make it or some sample code
> available
> > on the web?

> > Thanks for your help.

> > Peter

 
 
 

Display 3D Font in MFC program

Post by ian hawle » Fri, 19 May 2000 04:00:00


Hi,

Quote:> I just get wglErrors when I try to call the display
> list. Any ideas on this one? The code works fine on my machine when
compiled
> seperately.

If the sample code is working fine, then you must be missing something
in your own implementation..  I know of the function calls to create the
display lists,
but I must confess that I have not looked at these functions.

Perhaps you can post some relevent portions of your code, i.e.
what and were you create the font outlines in your code
and then how you go about using them.

thanks,

Ian

 
 
 

Display 3D Font in MFC program

Post by Joel Parri » Fri, 19 May 2000 04:00:00


You need to define the problem a little better, I can't even hazard a guess.
It was mostly a cut-and-paste-and-add-some-class-info operation for me.


> I have tried to use Nehe's code in my double buffered OpenGL window.
> Couldn't get it to work. I just get wglErrors when I try to call the
display
> list. Any ideas on this one? The code works fine on my machine when
compiled
> seperately.



> > You might check out NeHe's tutorials on text output.  They are organized
> in
> > smaller, bite size pieces and are easy to learn from.  They are
developed
> in
> > the win32 API, but they will work in an MFC environment
> > http://nehe.gamedev.net/opengl.asp



> > > I want to display 3D Font in my OpenGL program which is developed by
MFC
> > of
> > > MS Visual C++ V6.0. (I use double buffer in the program.)

> > > Could you please give some idea how to make it or some sample code
> > available
> > > on the web?

> > > Thanks for your help.

> > > Peter

 
 
 

Display 3D Font in MFC program

Post by Jon Whit » Tue, 23 May 2000 04:00:00


Try using WGL_FONT_POLYGONS instead of WGL_FONT_LINES


Quote:> Thanks for all your help.

> I am trying to use Nehe's code. Everyting is fine just the display shows
> wireframe character and not a filled one.
> What is the problem?

> Your advice is appreciated.

> Peter

 
 
 

1. 3D fonts, 3D fonts from 2D fonts, common fonts data

Hi everybody,

i'd like to use some fonts in 3D for a logo, for that i
have several questions:

1.
Can i download 3D fonts somewhere?  (And info or example
code how to render the data in OpenGL)?

2.
Can i generate 3D fonts from 2D fonts?
Like give them a depth and smooth the edges (45 degree)?
This should be a common algorithm, has anybody done that?

Regards,
Torsten.

2. software choice--advice?

3. Problem with 3D fonts (i've seen the MFC text tutorial)

4. How do you draw an Ellipse through 4 points??

5. NeHe 3D Fonts in MFC

6. Can you program advanced graphic programs(Java or C++)(NIEW)

7. PD program for displaying 3D graphs?

8. A simple question about planes, please help.

9. I need program to create DXF for 3d-fonts in POVSB

10. 3D Font Programs

11. Graphics display program for displaying graph

12. Best program for 3D Fonts?