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 4 of 4

Thread: GLSL RenderTexture

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Location
    Denmark
    Posts
    21

    GLSL RenderTexture

    Hi I am trying to use Mark Harris RenderTexture class to perform some multi pass volume rendering.

    I have to perform at least 3 passes and I will have to store each pass in a render-texture.

    How do I send a RenderTexture down to a GLSL fragment shader, so that I can perform an operation as:
    Code :
    gl_FragColor = gl_Color - texture2D(rayintersection,gl_TexCoord[0].st);
    I have without success tried to use the following:
    Code :
    glUseProgramObjectARB(*direction);	
    // results for previous pass, stored in a RenderTexture
    g_prtRayIntersection->EnableTextureTarget(); 
    g_prtRayIntersection->Bind();
    glUniform1iARB(sampler, 0);

  2. #2
    Intern Newbie
    Join Date
    Dec 2004
    Location
    Mars
    Posts
    40

    Re: GLSL RenderTexture

    might it be that you didn't share display list shader programs and texture unit?

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2005
    Location
    Denmark
    Posts
    21

    Re: GLSL RenderTexture

    No, the RenderTexture class shares by default,
    lists, textures, and program objects.

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2005
    Location
    Denmark
    Posts
    21

    Re: GLSL RenderTexture

    I have found the error ;-)

Posting Permissions

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