gpu: move common compute header to its own file

This commit is contained in:
Adam
2018-11-21 14:27:30 -05:00
committed by Adam
parent 83c0a52e5b
commit c28f53cd4a
4 changed files with 104 additions and 89 deletions

View File

@@ -85,6 +85,33 @@ public class ShaderTest
gl = glContext.getGL().getGL4();
}
@Test
@Ignore
public void testUnordered() throws ShaderException
{
int glComputeProgram = gl.glCreateProgram();
int glComputeShader = gl.glCreateShader(gl.GL_COMPUTE_SHADER);
try
{
Function<String, String> func = (s) -> inputStreamToString(getClass().getResourceAsStream(s));
Template template = new Template(func);
String source = template.process(func.apply("comp_unordered.glsl"));
int line = 0;
for (String str : source.split("\\n"))
{
System.out.println(++line + " " + str);
}
GLUtil.loadComputeShader(gl, glComputeProgram, glComputeShader, source);
}
finally
{
gl.glDeleteShader(glComputeShader);
gl.glDeleteProgram(glComputeProgram);
}
}
@Test
@Ignore
public void testSmall() throws ShaderException