Results 1 to 6 of 6

Thread: How do I write something to the screen

  1. #1
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    102

    How do I write something to the screen

    How do I output something to the screen using GLUT???
    CyBBe

  2. #2
    Guest

    Re: How do I write something to the screen

    output what??

  3. #3
    Member Contributor
    Join Date
    Feb 2000
    Location
    Italy
    Posts
    77

    Re: How do I write something to the screen

    Minimal steps:
    Create the display callback

    - glutInit
    - glutInitWindowSize
    - glutInitDisplayMode
    - glutCreateWindow
    - glutDisplayFunc to set the callback

    Now you have an active GL rendering context and can call any GL command.

    - glutMainLoop

    --
    Paolo
    --
    Paolo M.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    102

    Re: How do I write something to the screen

    Sorry, I meant text, like a fps counter or a simple text...
    CyBBe

  5. #5

    Re: How do I write something to the screen


  6. #6
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    122

    Re: How do I write something to the screen

    Setup:
    - paint pictures with single letters or one large picture with all (or a subset of) ASCII-characters
    - load that picture(s)
    - make every single character a texture
    --------------
    - build a string you want to write (e.g. sprintf(...)
    - switch to orthogonal-projection
    - for each character in the string paint a square with the appropriate texture (perhaps translucent with glBlend...).
    - be happy

Similar Threads

  1. Cuda/OpenGL FBO/PBO and write to screen
    By __bob__ in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 06-29-2016, 08:05 AM
  2. how to write text below a point on the screen
    By saman_artorious in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-28-2013, 11:13 AM
  3. Replies: 0
    Last Post: 07-29-2009, 12:54 PM
  4. OpenGL screen capture -> then write out as bitmap..
    By cutting_crew in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 07-22-2004, 10:29 AM
  5. Replies: 0
    Last Post: 09-30-2003, 08:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean