Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Blending operation with frame buffer

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    FRANCE
    Posts
    157

    Blending operation with frame buffer

    Hi,

    I work on commercial project using (of course unfortunately) DirectX (there is only "that" on the XBOX), but I am a huge
    fan of OpenGL (as you may have guessed) and my home engine is written with this API. I just can't find in the OpenGL API
    a function very usefull which exists in DirectX : the blending operation. I'm not talking about the blending sources (I mean glBlendfunc)
    , it seems like in openGL the blending equation is fixed (result = fragment * sfactor + framebuffer * dfactor) and not in D3D (very weird?). With
    this renderstate D3DBLENDOP we can substract or add (usefull to do substractive blending). Is there a similar function/renderstate in OpenGL?

    Cheers
    Arath

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2002
    Location
    Austria
    Posts
    280

    Re: Blending operation with frame buffer

    Yes, OpenGL is capabable of doing all that. Look at the EXT_blend_subtract, EXT_blend_minmax, EXT_blend_func_separate, and EXT_blend_color extensions, which I believe are all part of core OpenGL 1.4 now.
    XEngine - The Platform- and API-Independent 3D Engine
    with Programmable Pipeline Support: [URL=http://xengine.sourceforge.net
    My]http://xengine.sourceforge.net

  3. #3
    Member Regular Contributor
    Join Date
    Jun 2002
    Posts
    371

    Re: Blending operation with frame buffer


  4. #4
    Junior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    FRANCE
    Posts
    157

    Re: Blending operation with frame buffer

    Thanks a lot,
    eventually my faith in opengl is not gone ;-)

    Arath

  5. #5
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: Blending operation with frame buffer

    Hey, that is sweet. I didn't know that sun had such nice looking man pages.

    I've spent all this time reading crappy ASCII text.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posting Permissions

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