Results 1 to 3 of 3

Thread: glBlendFunc Beginner Question

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2010
    Posts
    2

    glBlendFunc Beginner Question

    Hi!

    I'm trying to do a simple thing, but can't get it working with glBlendFunc.
    I have many "Particles", which are basically white blurred circles (transparency in the center is 0% and increasing to the borders of the circle).

    Now I wanna do that:
    Everytime if two or more circles a drawn on the same pixel(s) then this pixels should get a (random) color and the alpha should be multiplied. I can blend everything right, without color if I'm using
    glBlendFunc(GL_SRC_ALPHA,GL_ONE)
    How can I add the color thing to this now?

    I tried also glBlendFuncSeparate without luck.

    thanks for your help.

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,674

    Re: glBlendFunc Beginner Question

    Everytime if two or more circles a drawn on the same pixel(s) then this pixels should get a (random) color and the alpha should be multiplied.
    What do you mean by a "random" color? Do you truly want to execute a pseudo-random number generator, or do you simply mean an "arbitrary" color? In short, how do you expect to get this color?

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2010
    Posts
    2

    Re: glBlendFunc Beginner Question

    first it would be enough if it is only one color.
    later I will generate a pseudo-random number and put that into opengl.
    but for my problem, it is not so important which color it is.

    thanks

Similar Threads

  1. Beginner question
    By grsabourin in forum OpenCL
    Replies: 1
    Last Post: 01-04-2016, 03:18 AM
  2. I have a question about FBO and glBlendFunc?
    By spring in forum OpenGL: Advanced Coding
    Replies: 12
    Last Post: 06-02-2007, 01:10 AM
  3. Beginner's question - using DLL
    By rys in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-25-2005, 05:35 PM
  4. Replies: 1
    Last Post: 03-18-2004, 05:10 PM
  5. Beginner with a question.
    By Bill Dean in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 10-03-2003, 09:41 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