Small fixes

This commit is contained in:
rnentjes
2016-06-15 10:24:10 +02:00
parent 2ae3a9ad8f
commit ed120d66a0
3 changed files with 11 additions and 9 deletions

View File

@@ -38,7 +38,7 @@ class ShaderProgram<T>(
webgl.linkProgram(shaderProgram)
if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) {
println(webgl.getProgramInfoLog(shaderProgram))
//println(webgl.getProgramInfoLog(shaderProgram))
throw IllegalStateException("Unable to compile shader program!")
}
@@ -52,7 +52,7 @@ class ShaderProgram<T>(
info.offset = verticesBlockSize;
verticesBlockSize += info.numElements;
println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}");
//println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}");
}
when(drawType) {
@@ -64,9 +64,9 @@ class ShaderProgram<T>(
}
}
println("verticesBlockSize $verticesBlockSize");
//println("verticesBlockSize $verticesBlockSize");
println("ShaderProgram constructor done");
//println("ShaderProgram constructor done");
}
private fun compileShader(source: String, type: Int): WebGLShader {

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mandelbrot</title>
<title>Julia</title>
<style type="text/css">
body, html {
width: 100%;
@@ -20,5 +20,11 @@
<script type="application/javascript" src="js/kotlin/kotlin.js"></script>
<script type="application/javascript" src="js/generated/mandelbrot.js"></script>
<script type="text/javascript">
document.open();
document.write("<img style='border: 0; display: none;' alt='' src='https://stats.astraeus.nl/stats?");
document.write("id=3&referrer="+document.referrer+"&url="+window.location.href+"'&agent="+navigator.userAgent+"' />");
document.close();
</script>
</body>
</html>

View File

@@ -33,7 +33,6 @@
this.webgl.attachShader(this.shaderProgram, this.fragment);
this.webgl.linkProgram(this.shaderProgram);
if (Kotlin.equals(this.webgl.getProgramParameter(this.shaderProgram, WebGLRenderingContext.LINK_STATUS), false)) {
Kotlin.println(this.webgl.getProgramInfoLog(this.shaderProgram));
throw new Kotlin.IllegalStateException('Unable to compile shader program!');
}
this.webgl.useProgram(this.shaderProgram);
@@ -44,7 +43,6 @@
info.location = this.webgl.getAttribLocation(this.shaderProgram, info.locationName);
info.offset = this.verticesBlockSize;
this.verticesBlockSize += info.numElements;
Kotlin.println('attrib: ' + info.locationName + ', info.location: ' + info.location + ', info.offset: ' + info.offset);
}
tmp$2 = this.drawType;
if (tmp$2 === WebGLRenderingContext.TRIANGLES)
@@ -52,8 +50,6 @@
else {
this.drawLength = this.verticesBlockSize;
}
Kotlin.println('verticesBlockSize ' + this.verticesBlockSize);
Kotlin.println('ShaderProgram constructor done');
}, /** @lends _.com.persesgames.shader.ShaderProgram.prototype */ {
compileShader: function (source, type) {
var tmp$0;