Results 1 to 3 of 3

Thread: How do I load a grayscale bitmap?

  1. #1
    Member Newbie
    Join Date
    Apr 2002
    Posts
    47

    How do I load a grayscale bitmap?

    Each pixel is one byte.
    What is the correct call to glTexImage2D?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    California, USA
    Posts
    167

    Re: How do I load a grayscale bitmap?

    It would most likely be:
    Code :
    glTexImage2D(GL_TEXTURE_2D,0,GL_LUMINANCE8,width,height,0,GL_LUMINANCE,GL_UNSIGNED_BYTE,data);
    Ofcourse, change parameters where necessary.

    Old GLman

  3. #3
    Member Newbie
    Join Date
    Apr 2002
    Posts
    47

    Re: How do I load a grayscale bitmap?

    that did it. THANKS!


Similar Threads

  1. How to use glTexImage2D load bitmap?
    By 尘羽泯 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-25-2011, 04:39 PM
  2. How do I load a bitmap without using AUX ?
    By guzba in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 03-20-2003, 01:24 PM
  3. How to Load A Bitmap From File
    By Stack Overflow in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-13-2002, 07:17 AM
  4. 3D heightfield from grayscale bitmap
    By medit in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-09-2002, 11:53 AM
  5. How do I load a bitmap from a resource?
    By Robbo in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-24-2001, 02:28 PM

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