| View previous topic :: View next topic |
| Author |
Message |
ruspa
Joined: 13 Sep 2007 Posts: 19 Location: Gorizia, ITALY
|
Posted: Mon Sep 17, 2007 8:47 am Post subject: font displaying suggestions? |
|
|
After trying to use freetype and similar libs to displaying fonts in opengl, all failed because of the "ERROR: Install autoconf before continuing." under cygwin (I do have autoconf automake installed plus sources via the cygwin setup that shows you the packages already installed...I doublechecked many times and the shell still keeps saying "autoconf: command not found" .. mistery!) so I gave up and made a simple call in my code to | Code: | int x,y=0;
while (x < 38) {
while (y < 64) {
blitAlphaImageToScreen(0 ,0 ,38 , 64, img_font1, x, y);
y += 64;
}
x += 32;
y = 0;
}
flipScreen(); |
(38 and 64 are the font monospaced size inside a font_grid.png I did)
where img_font1 is an Image* type with a png loaded in it the same way I load other textures in my program.
But fonts do not show up.. just my textured, filtered polygons: I inserted this piece of code in the gl draw cycle, so I suppose these functions are not compatible in some way (gl mode vs. no gl mode).
What do you suggest me to do to get through this? Making a set of mini-polygons each of them carrying one-font texture? (seems painful) or there's another call I can do different from blitAlphaImageToScreen to have this displayed in gl mode?
Thanks!
p.s. I do not have the text and fancytext examples in "samples" directory, just have a text sample which I cannot compile since it includes a "font.c" which I do not have. |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Mon Sep 17, 2007 9:07 am Post subject: |
|
|
| nvm |
|
| Back to top |
|
 |
ruspa
Joined: 13 Sep 2007 Posts: 19 Location: Gorizia, ITALY
|
Posted: Mon Sep 17, 2007 9:10 am Post subject: |
|
|
| nvm? |
|
| Back to top |
|
 |
AllSystemGo
Joined: 02 Jun 2007 Posts: 26
|
Posted: Mon Sep 17, 2007 10:20 pm Post subject: |
|
|
| I guess he figured out his problem... |
|
| Back to top |
|
 |
ruspa
Joined: 13 Sep 2007 Posts: 19 Location: Gorizia, ITALY
|
Posted: Mon Sep 17, 2007 11:06 pm Post subject: |
|
|
| is this some kind of joke? :\ |
|
| Back to top |
|
 |
quadrizo
Joined: 23 Aug 2007 Posts: 21
|
Posted: Tue Sep 18, 2007 2:18 am Post subject: |
|
|
if you take a look to the function blitAlphaImageToScreen you'll see that it do a textured rectangle with ths gu engine... if you want that works with opengl you can do the same: make a textured rectangle with an ortho projection.
you can search the nehe tutorials ported to psp with the pspgl modified version, you'll found a fontEngine with List that works great |
|
| Back to top |
|
 |
ruspa
Joined: 13 Sep 2007 Posts: 19 Location: Gorizia, ITALY
|
Posted: Tue Sep 18, 2007 3:13 am Post subject: |
|
|
| thanks, this was crisp clear :D |
|
| Back to top |
|
 |
|