Results 1 to 2 of 2

Thread: glPixelTransfer won't work with texturing

  1. #1
    Junior Member Newbie
    Join Date
    May 2000
    Location
    Severna Park, MD
    Posts
    1

    glPixelTransfer won't work with texturing

    Hi

    I'm writing a WinNT program to render grayscale images using glDrawPixels and texturing.
    The user can switch between these two methods with a control.

    In order to control brightness, contrast, and gamma, I generate a 256-element GLfloat
    array of remapping values called Map, and then apply Map using the following:

    glPixelTransferi ( GL_MAP_COLOR, GL_TRUE );
    glPixelMapfv ( GL_PIXEL_MAP_R_TO_R, 256, Map );
    glPixelMapfv ( GL_PIXEL_MAP_B_TO_B, 256, Map );
    glPixelMapfv ( GL_PIXEL_MAP_G_TO_G, 256, Map );

    This works fine with glDrawPixels, but has no effect when using texturing.

    I'm using gluBuild2DMipmaps to load my images into texture memory. These images are
    typically 1024 X 1024 or 2048 X 2048 LUMINANCE values.

    During initialization, I have tried GL_DECAL, GL_BLEND, and GL_MODULATE with
    glTexEnvi ( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, XX ), to no avail.

    When I did this on SGI machines, I used glColorTableSGI, which worked great, but
    now I'm forced to use this #*!/& PC, which does not have SGI's extensions to OpenGL.

    The references all say that texturing and pixel mapping should both behave the same
    regarding pixel transfer modes. Suggestions anyone?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: glPixelTransfer won't work with texturing

    what i know is that when you use textures (ie, draw primitives with texturing enabled) opengl does not carry on pixel transfer operations.

    instead pixel transfer ops act with texturing only when you upload or download them with glTexImage.

    Dolo/\/\ightY
    Dolo/\/\ightY

Similar Threads

  1. Texturing doesn't work
    By konrad509 in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 12-12-2011, 08:22 AM
  2. glPixelTransfer/glDrawPixels Slowdown Problem
    By Kale in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-21-2004, 10:37 AM
  3. glPixelTransfer() = slow
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-20-2002, 07:51 AM
  4. Cannot force a color with glPixelTransfer?
    By Nocturnal in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-10-2001, 07:49 PM
  5. Using glPixelTransfer
    By yossi in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 10-04-2000, 06:05 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