Results 1 to 2 of 2

Thread: Drawing bitmaps

  1. #1

    Drawing bitmaps

    The following code should draw a bitmap of a letter 'A' but it does not work. What is wrong with this code?

    GLubyte A[1][13] = { {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18}};

    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

    glClearColor(0, 0, 0, 0);
    glRasterPos2i(20, 60);
    glColor3f(1, 1, 1);
    glBitmap(8, 13, 0.0, 0.0, 0.0, 0.0, A[0]);

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Fargo, ND

    Re: Drawing bitmaps

    Not knowing what your projection matrix is like, I'd have to guess that you are setting the raster position outside of the window. The raster position is not based on window coordinates but on the coordinates of the scene.
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. Drawing bitmaps to the screen
    By Dugbrige in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-15-2014, 03:02 AM
  2. Bitmaps Drawing
    By imported_Naveen in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-14-2004, 08:06 AM
  3. drawing bitmaps and textured objects...
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-27-2002, 09:14 AM
  4. drawing bitmaps
    By romb in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 08-07-2002, 05:07 AM
  5. BitMaps 2D drawing n the like.
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-17-2001, 09:26 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