Results 1 to 5 of 5

Thread: another texture thing, transparency

  1. #1

    another texture thing, transparency

    how i can make my texture transparenT?
    glBlendFunc(GL_DST_COLOR, GL_ZERO);
    DrawCube(0,0,0,2);
    the mask, it works, the white thing is transparent, the rest of the cube is black than :


    like here, u can see another smaler cube inside the cube with the texture, the big cube uses the mask texture i added at first


    but how i can make transparency with this texture?


    is there maybe a posibility to draw it into a buffer and delete the white pixel so that they dont get displayed`?

  2. #2

    Re: another texture thing, transparency

    i got it i do now a 32bit Alpha-Channel bitmap for transparency
    and use this function

    glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    glAlphaFunc(GL_GREATER,0.1f);
    and glEnable(GL_ALPHA_TEST);

    for transparency, but if anyone knows to delte custom pixel out of the buffer to get custom transparenzy by pixel plz tell me

    here is the result:

  3. #3

    Re: another texture thing, transparency

    another question would be a png or tga file better for transparency

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: another texture thing, transparency

    "if anyone knows to delte custom pixel out of the buffer to get custom transparenzy by pixel plz tell me"
    What do you mean ?

  5. #5

    Re: another texture thing, transparency

    in older double buffers it was possible to delete a pixel out. or at old dos assembler example:
    memory adress $A0000 delete pixel at offset 0xA0005
    to get a transperancy, just to delete a pixel out of the buffer so that it does not get displayed anymore

Similar Threads

  1. Texture Transparency .BMP
    By Darius in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 12-12-2012, 07:18 PM
  2. Transparency using texture
    By Sarah Clough in forum OpenGL: Windows
    Replies: 4
    Last Post: 05-15-2007, 07:24 AM
  3. Pleeeeeease help - Texture thing
    By bigtime in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 11-30-2003, 09:11 PM
  4. Transparency in a texture
    By werdy666 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-02-2002, 07:18 PM
  5. OpenGL window transparency and texture transparency
    By ramalhais in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-15-2002, 09:37 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