Created
April 1, 2018 10:18
-
-
Save arusu0629/d7008ac5c0332eba9359807709967f72 to your computer and use it in GitHub Desktop.
ポリゴンを描画する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>WebGL TEST</title> | |
<script src="script.js" type="text/javascript"></script> | |
<script src="minMatrix.js" type="text/javascript"></script> | |
<script id="vs" type="x-shader/x-vertex"> | |
attribute vec3 position; | |
uniform mat4 mvpMatrix; | |
void main(void){ | |
gl_Position = mvpMatrix * vec4(position, 1.0); | |
} | |
</script> | |
<script id="fs" type="x-shader/x-fragment"> | |
void main(void){ | |
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); | |
} | |
</script> | |
</head> | |
<body> | |
<canvas id="canvas"></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment