gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > DS Font in OpenGL

#77429 - Chris Holmes - Fri Mar 31, 2006 4:27 pm

Does anyone have a texture font built for the DS already? I realize that there are text modes, but I'd like to be able to have a texture font to paste text onto 3d shapes as well. If no one does have them, I can build it myself, but I figured that someone might already have one.

Alternatively, does the DS have a texture font already built in somewhere?

Thanks,
Chris

#77431 - Payk - Fri Mar 31, 2006 5:10 pm

Hi chris. Did u saw my Tetris and Touch (at neoflash compo). If u watch Splashscreen or if u pause the game or get Gameover and also the score... All in 3D Font. Its not exactly what u want but its a Font build with cubes. If u want i will send u a small lib for that...Very easy to use. Just send me a PM. (and if ur not chris holmes but want that source u could send me a pm too)

#77432 - Payk - Fri Mar 31, 2006 5:14 pm

Ahh here is the code...
Code:

void CubePrint(char Text[12],float x,int y,float z){
   int Counter;
   char Char;

   glLoadIdentity();
   glTranslatef(0.0f+x,0.0f+y,0.0f+z);
   glRotatef(xrot,1.0f,0.0f,0.0f);
   glRotatef(yrot,0.0f,1.0f,0.0f);
   glRotatef(zrot,0.0f,0.0f,1.0f);
   
   for(Counter=0;Counter<=255;Counter++){
      Char=Text[Counter]-32;
      for(int xx=Char*4;xx<=Char*4+3;xx++)for(int yy=0;yy<=6;yy++){
      glTranslatef((xx-Char*4+Counter*5)*size*2,((yy*-1)*(size*2)),0);
      if(Font0[xx+yy*380]==2)AddQuat();
      glTranslatef(-(xx-Char*4+Counter*5)*size*2,-((yy*-1)*(size*2)),0);
      }
      if(Text[Counter+1]=='\0')Counter=255;
   }
}

void AddQuat(void){

   glBegin(GL_QUADS);
      // Front Face
      glColor3f(1.0f*Red,1.0f*Green,1.0f*Blue);glVertex3f(-size, -size,  size);
      glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f( size, -size,  size);
      glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f( size,  size,  size);
      glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size,  size,  size);
         
      // Back Face
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f(-size, -size, -size);
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f(-size,  size, -size);
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f( size,  size, -size);
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f( size, -size, -size);
      
      // Top Face
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size,  size, -size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size,  size,  size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f( size,  size,  size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f( size,  size, -size);
      // Bottom Face
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size, -size, -size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f( size, -size, -size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f( size, -size,  size);
         glColor3f(1.0f*Red,1.0f*Green,1.0f*Blue);glVertex3f(-size, -size,  size);
      // Right face
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f( size, -size, -size);
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f( size,  size, -size);
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f( size,  size,  size);
         glColor3f(0.25f*Red,0.25f*Green,0.25f*Blue);glVertex3f( size, -size,  size);
      // Left Face
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size, -size, -size);
         glColor3f(1.0f*Red,1.0f*Green,1.0f*Blue);glVertex3f(-size, -size,  size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size,  size,  size);
         glColor3f(0.5f*Red,0.5f*Green,0.5f*Blue);glVertex3f(-size,  size, -size);
   glEnd();   
}

void SetRot(float x,float y,float z){
   xrot=x;
   yrot=y;
   zrot=z;
}

void SetColor(float r,float g,float b){
   Red=r;
   Green=g;
   Blue=b;
}


And here the Image of the font which is used by the function
Code:
const unsigned char Font0[] __attribute__ ((aligned (4))) = {
1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1,
1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1,
1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1,
1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2,
1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,
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each letter, that's not really the solution that I'm looking for. It definitely works, but just having a set of font textures is going to run much more quickly.

There are font "hacks" for OpenGL for all the major OS's. There's the WGL library that loads a font into a display list. Linux has something, etc. etc. I would hope that the DS has some form of internal functions for loading a font texture similar to the WGL functions, but that may not be the case in reality.

Chris

#77531 - headspin - Sat Apr 01, 2006 3:53 pm

Not sure if this is what your after since I havn't done 3d on DS, but this is what I would use for creating texture fonts.

http://www.lmnopc.com/bitmapfontbuilder/
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#77699 - Payk - Sun Apr 02, 2006 2:55 pm

Yeah i know its not very intelligent to make a font with that. DS just can display 2000 Polygons at same time and each block has 12 of it. And one letter can have 4x7 blocks. So a letter which uses all blocks would have 336 Polygons...Prettey much u couldnt display a word with 15 letters...
But rotating that Font looks awsome

#77701 - Mighty Max - Sun Apr 02, 2006 3:10 pm

You could reduce the polycount to 5/6th of that by once calculating which face of the cubes is least facing you and therefor can be dropped. As you can at no point see parts of every face at the same time.

As all cubes are looking in the same direction, only one check would be needed to apply this filter. A single cube would only take away now 10 of the 12 polys. (further culling still is possible)
_________________
GBAMP Multiboot

#77761 - HyperHacker - Sun Apr 02, 2006 10:30 pm

You can still use the other background layers when you do 3D, can't you? (I haven't used it, but I heard the 3D layer just replaces layer 1.) You could display text with a whopping zero polygons by just putting it on layer 2 or some such.

#77843 - Payk - Mon Apr 03, 2006 2:21 pm

@Mighty
Actually always 3 Sides of that cube are visible.
So if u not gonna use translate-commands u can easy make a function which only adds those vertexes,which belongs to a visible face...
but its still an effect,which i would not use much...