Results 1 to 7 of 7

Thread: Anybody who knows OpenGL will know this...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Anybody who knows OpenGL will know this...

    (This is not what I am trying to do, but it is a simple explanation of my problem...)

    Suppose I have drawn a round ball in MSPaint, with the ball white and the surrounding image black. How can I texture map it to a quad without the black coming up (ie, the surrounding area is see-through, as if the quad was in fact circular)? OpenGL doesn't seem to do it automatically, and the red book doesn't explain how to do it.
    Do I have to store alpha-values in the picture? Is there a special blend function?

    Thanks,

    me.
    Courgettes.

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Thianks, but I'd already downloaded his suite, and he does use this technique, whatever it's called, in tutorial 33, but doesn't explain it. However, I might look through his blending one again if it hints at what I should do.

    Thanks,

    me.
    Courgettes.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Still no luck...

    The Blending tutorial blends the whole texture, not specific colours.

    Any other suggestions?
    Courgettes.

  5. #5
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    I think article 33 uses the alpha values in the TGA file, but I have tried PSP6, 7 and PS5 but I couldn't find how to write the alpha values to the file
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    PNG files can store 32-bit colour (8 red, 8 green, 8 blue, 8 alpha) so you may want to look into that.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Mhhh......that's right.........if you can load TGA's, you can also load PNG's (that is, if you know the file format..........well, lucky me, I do have code for that )

    Going to try that some time...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width