• Advertisement
Sign in to follow this  

How to display "Hello World" in graphics mode?

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, With visual c++ 2008 express, how could we simply display "Hello world" in graphics mode (eg. 1024 x 768)? Do we need to install platform sdk? (I tried "introduction to 3d game progamming with 9.0x" without success and got many compiling error!!!) Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
you can use TextOut (Win32 function) or D3DX create text function:

http://www.toymaker.info/Games/html/text.html

Share this post


Link to post
Share on other sites
Thanks, Kasya.
It works!

1. BTW, when is it necessary to install platform sdk?
2. Similary, how could we display "Hello World" with opengl?

Share this post


Link to post
Share on other sites
Quote:
Original post by sam-whsSimilary, how could we display "Hello World" with opengl?


With alot of hassle. Opengl doesn't provide any text rendering directly. You have a few options, draw text via a series of lines, draw text via a series of primitives or draw text as a series of textures (onto primitives). You have a texture/image with all the letters on and you draw the respective parts of the texture in order to do text.

Its not straight forward and I believe there are a number of things that already take care of this for you. I'd suggest looking around for those rather than doing it yourself.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement