# OpenGL Drawing Text From A Font Texture

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

## 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 on other sites
Bump!

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

dhFastFont.

##### 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 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 on other sites
G'day!

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

##### 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 on other sites
Ah, thanks heaps, DH. That answers my PM question. ;)

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 9
• 14
• 10
• 25
• 9
• ### Forum Statistics

• Total Topics
632645
• Total Posts
3007627
• ### Who's Online (See full list)

There are no registered users currently online

×