glReadPixel is being stupid

Discussion in 'OT Technology' started by [AWD] Major Dumps, Feb 14, 2004.

  1. [AWD] Major Dumps

    [AWD] Major Dumps ahhhh this is a good dump

    Joined:
    Aug 8, 2003
    Messages:
    4,326
    Likes Received:
    0
    Location:
    All like close to Seattle and shit
    maybe i just screwed something up. but i've gotten to the
    Code:
    void GrabScene()
    {
    	unsigned char *myscreen;
    	glReadPixels(0, 0, 128, 128, GL_LUMINANCE, GL_UNSIGNED_BYTE, myscreen);
    }
    stage and it's still not working. but that's ok.

    here's what i need:
    i need to read some pixels into an extern variable. that's it. and the program is really sweet to me, it starts up and then crashes. i know the error is in this little snippet here. but i can't figure it out.

    PLEASE HELP!
     
  2. [AWD] Major Dumps

    [AWD] Major Dumps ahhhh this is a good dump

    Joined:
    Aug 8, 2003
    Messages:
    4,326
    Likes Received:
    0
    Location:
    All like close to Seattle and shit
    ok, now it's just doing f'ed up stuff
     
  3. [AWD] Major Dumps

    [AWD] Major Dumps ahhhh this is a good dump

    Joined:
    Aug 8, 2003
    Messages:
    4,326
    Likes Received:
    0
    Location:
    All like close to Seattle and shit
    HA! i fixed it MYSELF without anybody's help!
     
  4. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Post how you fixed it in case someone else has the same problem in the future :)
     
  5. [AWD] Major Dumps

    [AWD] Major Dumps ahhhh this is a good dump

    Joined:
    Aug 8, 2003
    Messages:
    4,326
    Likes Received:
    0
    Location:
    All like close to Seattle and shit
    i allocated the array incorrectly. whenever you make an array to put the color values in, make sure you don't put a typo. it's not like it was complicated or anything. but i'm using a s3 savage 2000 on my xp machine right now. as we all know, i would happen to be using a 3rd party driver. it's buggy as hell, i can't get anything to run decently with it:
    [​IMG]
    i need to get an actual graphics card.
     
  6. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    wow, that looks like shit
     

Share This Page