Results 1 to 4 of 4

Thread: Usage of glDrawPixels()

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2012
    Posts
    4

    Usage of glDrawPixels()

    Can anyone give me a sample program of how i can make use of glDrawPixels().

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Usage of glDrawPixels()

    Just read the glDrawPixels function spec here

    It is very simple, the more complicated is to fill to data array which is out of opengl.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2012
    Posts
    4

    Re: Usage of glDrawPixels()

    How i can make use of OpenGL to do color mapping, given an image and a color look up table ?

  4. #4
    V-man
    Guest

    Re: Usage of glDrawPixels()

    You would make a 1D texture.
    You also apply a 2D texture to your object which supposidly has the indexing color values.
    You need to use shaders. In the fragment shader you sample the textures.

    index = float(texture2D(Texture0, gl_TexCoord0.xy));
    texel = texture1D(Texture1, index);

Similar Threads

  1. VBO Usage
    By Silence in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-08-2012, 03:51 AM
  2. sid usage
    By kevt in forum COLLADA
    Replies: 1
    Last Post: 08-09-2005, 10:46 AM
  3. CPU Usage
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-06-2004, 07:15 AM
  4. glDrawPixels help; glDrawPixels vs. Texture Mapping for bitmaps
    By vorbisus in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-11-2001, 10:07 AM
  5. cpu usage..
    By jonn in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 07-11-2000, 12:19 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