@Test public final void testGeometryShaderCompileEmpty1() { final JCGLShadersType s = this.getShaders("main"); final List<String> lines = new ArrayList<>(3); lines.add(" "); lines.add("\t"); lines.add("\n"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileGeometry("empty1", lines); }
@Test public final void testGeometryShaderCompileEmpty1() { final JCGLShadersType s = this.getShaders("main"); final List<String> lines = new ArrayList<>(3); lines.add(" "); lines.add("\t"); lines.add("\n"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileGeometry("empty1", lines); }
@Test public final void testGeometryShaderCompileEmpty0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileGeometry("empty0", new ArrayList<>(0)); }
@Test public final void testGeometryShaderCompileEmpty0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileGeometry("empty0", new ArrayList<>(0)); }
@Test public final void testGeometryShaderCompileInvalid0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileGeometry("invalid0", this.getShaderLines("invalid0.geom")); }
@Test public final void testGeometryShaderCompileInvalid0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileGeometry("invalid0", this.getShaderLines("invalid0.geom")); }
@Test public final void testGeometryShaderDeleteDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); s.shaderDeleteGeometry(g); this.expected.expect(JCGLExceptionDeleted.class); s.shaderDeleteGeometry(g); }
@Test public final void testGeometryShaderDeleteIdentity() { final JCGLShadersType s = this.getShaders("main"); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); s.shaderDeleteGeometry(g); Assert.assertTrue(g.isDeleted()); }
@Test public final void testGeometryShaderDeleteDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); s.shaderDeleteGeometry(g); this.expected.expect(JCGLExceptionDeleted.class); s.shaderDeleteGeometry(g); }
@Test public final void testGeometryShaderDeleteIdentity() { final JCGLShadersType s = this.getShaders("main"); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); s.shaderDeleteGeometry(g); Assert.assertTrue(g.isDeleted()); }
@Test public final void testProgramLinkDeletedFragment() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedFragment() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedVertex() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteVertex(v); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedVertex() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteVertex(v); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedGeometry() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteGeometry(g); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedGeometry() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteGeometry(g); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testGeometryShaderCompileValidIdentities() { final JCGLShadersType s = this.getShaders("main"); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); Assert.assertEquals("valid0", g.name()); Assert.assertFalse(g.isDeleted()); Assert.assertTrue(g.glName() > 0); }
@Test public final void testGeometryShaderCompileValidIdentities() { final JCGLShadersType s = this.getShaders("main"); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); Assert.assertEquals("valid0", g.getName()); Assert.assertFalse(g.isDeleted()); Assert.assertTrue(g.getGLName() > 0); }
@Test public final void testGeometryShaderDeleteSharedContext() { final JCGLSharedContextPair<JCGLShadersType> cp = this.getShadersSharedWith("main", "alt"); final JCGLContextType c0 = cp.getMasterContext(); final JCGLShadersType s0 = cp.getMasterValue(); final JCGLContextType c1 = cp.getSlaveContext(); final JCGLShadersType s1 = cp.getSlaveValue(); Assert.assertTrue(c0.contextIsCurrent()); Assert.assertFalse(c1.contextIsCurrent()); final JCGLGeometryShaderType g = s0.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); c0.contextReleaseCurrent(); c1.contextMakeCurrent(); s1.shaderDeleteGeometry(g); Assert.assertTrue(g.isDeleted()); }
@Test public final void testGeometryShaderDeleteSharedContext() { final JCGLSharedContextPair<JCGLShadersType> cp = this.getShadersSharedWith("main", "alt"); final JCGLContextType c0 = cp.getMasterContext(); final JCGLShadersType s0 = cp.getMasterValue(); final JCGLContextType c1 = cp.getSlaveContext(); final JCGLShadersType s1 = cp.getSlaveValue(); Assert.assertTrue(c0.contextIsCurrent()); Assert.assertFalse(c1.contextIsCurrent()); final JCGLGeometryShaderType g = s0.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); c0.contextReleaseCurrent(); c1.contextMakeCurrent(); s1.shaderDeleteGeometry(g); Assert.assertTrue(g.isDeleted()); }