Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


glPixelMap & glPixelTransfer

This topic is 5131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hihi i was playing around with those 2 functions but cant seem to get them to work...
GLuint maskvalues[256];
GLubyte pixels[10][10][4];

for(int i=0; i<128; i++)
  maskvalues[i] = 255;
for(int i=128; i<256; i++)
  maskvalues[i] = 0;

for(int i=0; i<10; i++)
  for(int j=0; j<10; j++)
    pixels[i][j][0] = 255;
    pixels[i][j][1] = 255;
    pixels[i][j][2] = 255;
    pixels[i][j][3] = 255;

glPixelTransferi(GL_MAP_COLOR, true);
glPixelMapuiv(GL_PIXEL_MAP_B_TO_B, 256, maskvalues);

glDrawPixels(10, 10, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
thx! Edwinz

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!