Opengl ES: drawing text

Posts: 6
Joined: 2008.12
Post: #1
I'm trying (and trying and trying) to draw some text on screen using the Texture2D class. The result I have is just a green square on screen, with no text displayed. Googling around I found other guys with the same problem, but no response on how the solved it.
Can someone help please ?

Here is my drawView:

Texture2D* _textures[1];
    _textures[0] = [[Texture2D alloc] initWithString:@"0123456789" dimensions:CGSizeMake(1,1) alignment:UITextAlignmentLeft fontName:@"Arial" fontSize:12];
    //Set up OpenGL projection matrix
    //Initialize OpenGL states
    //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
    glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
    glViewport(0, 0, backingWidth, backingHeight);
    glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
        glOrthof(-1.0f, 1.0f, -1.5f, 1.5f, -10.0f, 10.0f);
    glTranslatef(0, 0, -9);
    glColor4f(0.0f,1.0f,0.0f,1.0f);//Change the object color to green
    glBindTexture(GL_TEXTURE_2D, [_textures[0] name]);

    [_textures[0] drawAtPoint:CGPointMake(0, 0)];
    //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
    glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
    [context presentRenderbuffer:GL_RENDERBUFFER_OES];
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Cube drawing: VBOs, instanced geometry, octrees Symbol$ 5 13,380 Dec 23, 2011 01:43 PM
Last Post: Skorche
  Drawing menu versus drawing game johncmurphy 4 6,292 Jan 6, 2010 09:14 AM
Last Post: AnotherJake
  OpenGL ES : Drawing Text... savage 8 14,288 Jan 4, 2010 08:59 PM
Last Post: alerus
  openGL n00b looking for FBO drawing examples or direction auptown 5 10,386 Nov 4, 2009 02:16 AM
Last Post: Eskema
  Drawing shapes opengl es jjslay 2 5,577 Aug 14, 2009 11:07 AM
Last Post: jjslay