Bug 1043

Summary: Add Tessellation Control and Evaluation Shader Support
Product: [JogAmp] Jogl Reporter: ray <h.k.ghost>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: enhancement CC: johan
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
URL: http://forum.jogamp.org/Need-Help-Solving-OpenGL-GLSL-4-4-Issues-td4032557i20.html
Type: --- SCM Refs:
dfae07ed4b0f164768c35b6e7ad008d81a3e68bb
Workaround: ---
Attachments: Test Case Code and Output Screenshot

Description ray 2014-08-08 09:14:05 CEST
Created attachment 619 [details]
Test Case Code and Output Screenshot

The ShaderCode class works fine as long as the shader types we try to use are vertex, fragment, or geometry. If shaders for other pipeline stages like tessellation control and tessellation evaluation shaders are used, the ShaderCode class throws an exception about an unknown shader type.

Based on a discussion[1], it was requested that I file an enhancement and help was requested by means of a test case application.

I've attached a test case application that currently crashes due to a lack of support, but that should start to work correctly as soon as support is added. I've also included a screenshot of what this application's output should look like.

The application's shader code was tested with another version of the program that I wrote that does *not* use the ShaderCode class and uses GL4 object directly.

The shaders are GLSL 4.4 core.


[1] http://forum.jogamp.org/Need-Help-Solving-OpenGL-GLSL-4-4-Issues-td4032557i20.html
Comment 1 ray 2014-08-08 09:21:35 CEST
To run the application without crashing, just comment out the creation and attachment of the tessellation shaders. If you run it with only the vertex and fragment shaders in place, you will only see 3 white vertices moving around.
Comment 2 Sven Gothel 2014-09-02 05:49:38 CEST
@Raymond: To be able to re-use your source code, I need it with
our default JogAmp (c)!

Like here:

http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/TestMultipleNewtCanvasAWT.java;h=0e11ff1e8d4855d28c49b10cd9a7d05309e9e1c1;hb=9850c3a91a23983f1261cb38e4734524c67200f2

I assume this is the case hence I cont. on the code.

However, please reply and grant me the right to remove 
your complete header and to replace it w/ our (c) tag!

Thank you.
Comment 3 ray 2014-09-02 06:08:39 CEST
Granted.
Comment 4 Sven Gothel 2014-09-02 07:18:56 CEST
dfae07ed4b0f164768c35b6e7ad008d81a3e68bb
- Add GL4.GL_TESS_CONTROL_SHADER and GL4.GL_TESS_EVALUATION_SHADER 
  support for GLSL util class ShaderCode

- Add unit test TestTessellationShader01GL4NEWT, 
  testing TessellationShader01aGL4 and TessellationShader01bGL4