Jump to content
  • Advertisement
Sign in to follow this  
Jesbass

OpenGL Drawing Text From A Font Texture

This topic is 4780 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

DISCLAIMER: I'm still quite new to C++. I'm a beginner. I'd like to draw text on the screen from a font page, rather than use a true type font. Can anyone point me towards a tutorial or an already working piece of code to do this? I found a tutorial but it was only for OpenGL.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
dhFastFont.

Share this post


Link to post
Share on other sites
Hi there,

Thanks for the link. I downloaded the dhEngine, (haven't even got onto the dhFastFont yet), and there are a few errors. Firstly, the line of code in dhDrawableElement.h...

#include <dhEngine.h>


...resulted in this error...

Quote:
e:\Documents and Settings\David & Angela\Desktop\dhEngine\dhDrawableElement.h(4): fatal error C1083: Cannot open include file: 'dhEngine.h': No such file or directory


...even though that file was in the main directory of the project. This was fixed by changing the code to...

#include "dhEngine.h"


I then got the same error for the next include file, dhTypes, which was also fixed by replacing the angle brackets with quotation marks. But now I'm getting this error:

Quote:
dhEngine error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."


I have a sneaking suspicion that the project should be able to work without me having to change those angle brackets into quotation marks, but can anyone else suggest what next step I should take?

Share this post


Link to post
Share on other sites
The angle brakets are used to include files located in one of the IDE's directories (usually set in the IDE's options). Quotes are used when including files relative to an actual directory. In this case, the header, 'dhEngine' was located in the same directory as the Current Working Directory and so no path needed to be specified.

The error you received was generated within the code of the engine. I.E. it was an error message created by good ol' Drunky using the '#error' directive. What it means I can't say but it's probably documented somewhere. If not, try asking him.

Share this post


Link to post
Share on other sites
G'day!

For some reason the DX9 version had the DX8 header, that would explain why nothing was working. Try downloading it again. The header should be called dhFastFont9.h.

The dhEngine is DX8 only, you don't need it. dhFastfont9 is completely stand-alone.

Share this post


Link to post
Share on other sites
I also updated the dhFastFont page to make things a little bit clearer. At some point, when I have free time (HA!), I want to rewrite it. And then there will be the inevitable .Net port...

Share this post


Link to post
Share on other sites
Ah, thanks heaps, DH. That answers my PM question. ;)

I'll download it again and try it tomorrow. Thanks again. :)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!