webgl example one - gists · GitHub
文章推薦指數: 80 %
APP.gl.compileShader(fragmentShader);. var vertexShader = APP.gl.createShader(APP.gl.VERTEX_SHADER);. APP.gl.shaderSource(vertexShader,. document.
Skiptocontent
Allgists
BacktoGitHub
Signin
Signup
Sign in
Sign up
{{message}}
Instantlysharecode,notes,andsnippets.
bringhurst/webglexampleone
CreatedFeb28,2011
Star
0
Fork
0
Star
Code
Revisions
4
Embed
Whatwouldyouliketodo?
Embed
Embedthisgistinyourwebsite.
Share
Copysharablelinkforthisgist.
Clonevia
HTTPS
ClonewithGitorcheckoutwithSVNusingtherepository’swebaddress.
LearnmoreaboutcloneURLs
DownloadZIP
Raw
webglexampleone
ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters.
LearnmoreaboutbidirectionalUnicodecharacters
Showhiddencharacters
Signupforfree tojointhisconversationonGitHub. Alreadyhaveanaccount? Signintocomment Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.
延伸文章資訊
- 1Vertex Shader - OpenGL Wiki
- 2WebGLShader - Web APIs - MDN - Mozilla
function createShader (gl, sourceCode, type) { // Compiles either a shader of type gl.VERTEX_SHAD...
- 3WebGLShader - Web API 接口参考
function createShader (gl, sourceCode, type) { // Compiles either a shader of type gl.VERTEX_SHAD...
- 4WebGLRenderingContext.VERTEX_SHADER - Javascript
const vertexShader = this.createShader( gl.VERTEX_SHADER, vertex )
- 5認識著色器
VERTEX_SHADER, vertexSource); const fragShader = shader(glContext, ... getContext('webgl'); if (!...