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

Thread: fragment shader hanging

  1. #1
    Intern Newbie
    Join Date
    Oct 2012
    Posts
    42

    fragment shader hanging

    Hi

    I have a simple fragment shader that outputs color values green and red.

    layout(location = 0, index = 0) out vec4 Color0;
    layout(location = 1, index = 0) out vec4 Color1;

    Color0=vec4(0.0,0.0,1.0,1.0);
    Color1=vec4(1.0,0.0,0.0,1.0);

    However, when I build my visual studio solution it seems to hang on such a simple fragment shader. I am not sure how to debug this any better since this is the simplest possible scenerio.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    645
    That does not make sense to me. Visual Studio compiles your application code not your shaders (those are compiled at runtime by the OpenGL implementation, aka the graphics driver). What you posted is also not a complete fragment shader, it does not contain a function with signature
    Code :
    void main(void){ }
    Are you checking for OpenGL errors with glGetError or KHR_debug and do you check if your shaders compile and link successfully?

Tags for this Thread

Posting Permissions

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