title: Problems drawing text (strings)
body: <p>I'm having a problem that, when I draw a text and call the "callGl()" method from InitGl class, it doesn't draw anything in the screen, and if I don't call it and draw, for example, a text "play" in the screen, it always shows some sort of "background" in the same color that I put (color.white, for example). What am I doing wrong?</p>
  
  <h3>Code sample</h3>
  
  <h1>GL CLASS</h1>
  
  <pre><code>public class InitGl {
      public void InittGl(int Width, int Height) {
          glEnable(GL_TEXTURE_2D);
          glShadeModel(GL_SMOOTH);        
          glDisable(GL_DEPTH_TEST);
          glDisable(GL_LIGHTING);                    
  
          glClearColor(0.0f, 0.0f, 0.0f, 0.5f);                
          glClearDepth(1);                                       
  
          glEnable(GL_BLEND);
          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  
          glViewport(0,0,Width, Height);
          glMatrixMode(GL_MODELVIEW);
  
          glMatrixMode(GL_PROJECTION);
          glLoadIdentity();
          glOrtho(0, Width, Height, 0, 1, -1);
          glMatrixMode(GL_MODELVIEW);
          glLoadIdentity();
      }
  
      public void callGl() {
          glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
          glClearDepth(1.0f);
          glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
      } //This is for the render thing
  }
  </code></pre>
  
  <h3>Where I call it</h3>
  
  <h1>MENU CLASS</h1>
  
  <pre><code>public class Menu {
      Words p = new Words();
  
      public void setWords() {
          p.setWords("Comic Sans", 24, false);
      }
  
      public void Update() {
          p.renderWord("PLAY", 10, 20);
      }
  }
  </code></pre>
  
  <h1>SCREEN ADM CLASS WITH CALLGL</h1>
  
  <pre><code>public class Screen {
      private InitGl in = new InitGl();
      private Menu m;
      private int numNull = 0; //Just an example
  
      public Screen () {
          m = new Menu();
      }
  
      public void Menu() {
          if (numNull == 0) {
          in.InittGl(800, 600); //It gets the screen size
          m.setWords();
          numNull = 1;
          }
  
          m.Update();
      }
  
      public void Render() {
          in.callGL();
          m.Render(in);
      }
  }
  </code></pre>
  
  <h1>SCREEN ADM CLASS WITHOUT CALLGL</h1>
  
  <pre><code>public class Screen {
      private InitGl in = new InitGl();
      private Menu m;
      private int numNull = 0; //Just an example
  
      public Screen () {
          m = new Menu();
      }
  
      public void Menu() {
          if (numNull == 0) {
          in.InittGl(800, 600); //It gets the screen size
          m.setWords();
          numNull = 1;
          }
  
          m.Update();
      }
  
      public void Render() {
          m.Render(in);
      }
  }
  </code></pre>
  
  <h1>WORDS CLASS</h1>
  
  <pre><code>public class Words {
      public TrueTypeFont font;
      public Font awtFont;
  
      public void setWords(String type, int size, boolean antiAliazing) {
          awtFont = new Font(type, Font.BOLD, size);
          font = new TrueTypeFont(awtFont, antiAliazing);
      }
  
      public void renderWord(String phrase, int x, int y) {
          font.drawString(x, y, phrase, Color.white);
      }
  }
  </code></pre>
  
  <h2>Pictures</h2>
  
  <ul>
  <li>First one is what I get when I use CallGL</li>
  <li>Second one is what I get when I do not use CallGL</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/GOhwu.jpg" alt="With CallGL"></p>
  
  <p><img src="https://i.stack.imgur.com/x0Zns.jpg" alt="Without CallGL"></p>