Drawing Text From A Font Texture

Started by
7 comments, last by Jesbass 18 years, 5 months ago
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.
Advertisement
Bump!

Doesn't anybody here know how to draw text onto the screen using a fontpage?
dhFastFont.
dhFastFont.

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

Stay Casual,KenDrunken Hyena
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...
Stay Casual,KenDrunken Hyena
Ah, thanks heaps, DH. That answers my PM question. ;)

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

This topic is closed to new replies.

Advertisement