Results 1 to 7 of 7

Thread: Fade in-out a textured quad ?

  1. #1
    Guest

    Fade in-out a textured quad ?

    How can I change the transparency of a textured quad in OpenGL ? because I tried using glColor4f(255,255,255,0) and it was still visible, isnt the last parameter the alpha one? - Im confused ..!

    I need to fade in and out textured quads .. and perhaps move them from point A to point B smoothly - I can only do a rough movement (from point a to b no interpolation) is there any examples on doing this? also mouse picking? I got an example and it was very well loaded of crap!! why isnt there any example with 2 cubes on screen and nothing else than that, where it lets you mouse pick on them... instead of moving crap with sounds and stupidity for a mouse picking example..!!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: Fade in-out a textured quad ?

    Have you created a 32-bit texture? You actually need an image (say targa) that supports transparency. I haven't ever changed the transparency values on the fly though. Another reason would be that you haven't set up properly glBlendFunc. Look it up in the manual. I think that if your texture is all opaque then you've got a problem with glBlendFunc and you don't really need a 32-bit texture.
    As for mouse picking I think the example in the red book is a simple one. Good luck!

  3. #3
    Guest

    Re: Fade in-out a textured quad ?

    Well My blendfunc is nice, everything works as it should - I want to fade a quad out and then fade another one in, ever used FlashMX? like that, change the transparency of the "object" (a simple quad in this case).

    Were can i get that redbook example? is it the one with the snowmans? it didnt work nice here, I clicked the right top snowman and it didnt get which one I clicked on...!

  4. #4
    Guest

    Re: Fade in-out a textured quad ?

    somehow when i tried again it worked nice glcolor4f ! this is weird .. too weird.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: Fade in-out a textured quad ?

    Hmm, something must've slipped through the cracks then Good job, finding it.
    For the red book do a search for OpenGL Programming Guide. "red book" is just the nick, err..because it's red. There's an old version lurking around for free. As for the example, it's just 3 quads. Very fancy

  6. #6
    Guest

    Re: Fade in-out a textured quad ?

    http://www.opengl.org/resources/code/basics/redbook/

    hmm but i only have VC++ 6.0 standard how im going to compile this ?

  7. #7
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: Fade in-out a textured quad ?

    If you're talking about glut go here

Similar Threads

  1. how to fade a textured object in/out ?
    By digiboy in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 03-11-2008, 08:47 AM
  2. how to fade a quad? how to make a cone?
    By doodlemunch in forum OpenGL: Basic Coding
    Replies: 17
    Last Post: 06-17-2005, 08:27 AM
  3. How a textured quad lighter?
    By johannesprix in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-23-2004, 11:13 PM
  4. Warping Textured Quad
    By Sebaot in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-17-2001, 10:38 AM
  5. Subdividing a textured quad
    By overloadnn in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-15-2000, 02:25 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