{"id":438,"date":"2007-08-14T14:38:00","date_gmt":"2007-08-14T14:38:00","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=438"},"modified":"2017-01-29T11:22:36","modified_gmt":"2017-01-29T02:22:36","slug":"opengl-shader-5-1","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=438","title":{"rendered":"OpenGL Shader &#8211; 6"},"content":{"rendered":"<p><strong>OpenGL Setup for GLSL- Shader \uc0dd\uc131\ud558\uae30<br \/>\n<\/strong>\uc6d0\ubb38 : <a href=\"http:\/\/www.lighthouse3d.com\/opengl\/glsl\/index.php?oglshader\">http:\/\/www.lighthouse3d.com\/opengl\/glsl\/index.php?oglshader<\/a><\/p>\n<p>\ub2e4\uc74c \uadf8\ub9bc\uc740 \uc250\uc774\ub354\ub97c \uc0dd\uc131\ud558\ub294\ub370 \ud544\uc694\ud55c \ub2e8\uacc4\ub97c \ubcf4\uc774\uace0 \uc788\ub2e4.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1047513445.jpg\" class=\"aligncenter\" width=\"264\" height=\"201\" alt=\"\" \/>\uccab\ubc88\uc9f8 \ub2e8\uacc4(glCreateShader)\ub294 \uc250\uc774\ub354 \ucee8\ud14c\uc774\ub108\ub85c\uc368 \uc218\ud589\ud558\ub294 \uc624\ube0c\uc81d\ud2b8\ub97c \uc0dd\uc131\ud558\ub294 \uac83\uc774\ub2e4. \uc774 \ud568\uc218\ub294 \ucee8\ud14c\uc774\ub108\uc758 \ud5e8\ub4e4\uc744 \ubc18\ud658\ud55c\ub2e4.<\/p>\n<p>\uc774 \ud568\uc218\uc5d0 \ub300\ud55c OpenGL 2.0 \ubb38\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4:<\/p>\n<p><strong>GLuint glCreateShader(GLenum shaderType);<br \/>\n<\/strong>Parameter:<br \/>\n&nbsp; <strong>shaderType &#8211; GL_VERTEX_SHADER&nbsp; \ub610\ub294&nbsp; GL_FRAGMENT_SHADER<\/strong><\/p>\n<p>ARB \ud655\uc7a5\ubb38\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<p><strong>GLhandleARB glCreateShaderObjectARB(GLenum shaderType);<br \/>\n<\/strong>Parameter:<br \/>\n<strong>&nbsp; shaderType &#8211; GL_VERTEX_ARB \ub610\ub294 GL_FRAGMENT_SHADER_ARB<br \/>\n<\/strong><br \/>\n\ud504\ub85c\uadf8\ub7a8\uc5d0 \ucd94\uac00\ud558\uace0\uc790 \ud558\ub294 \ub9cc\ud07c\uc758 \uc250\uc774\ub354\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\uc9c0\ub9cc, remember that there can only be a main function for the set of vertex shaders and one main function for the set of fragment shaders in each single program.<\/p>\n<p>\ub2e4\uc74c \ub2e8\uacc4(glShaderSource)\ub294 \ud2b9\uc815\ud55c \uc18c\uc2a4 \ucf54\ub4dc\ub97c \ucd94\uac00\ud558\ub294 \uac83\uc774\ub2e4. \uc18c\uc2a4 \ucf54\ub4dc\ub294 \ubb38\uc790 \ubc30\uc5f4\uc774\ub2e4.<\/p>\n<p>\uc774 \ud568\uc218\uc5d0 \ub300\ud55c OpenGL 2.0\uc5d0 \ub300\ud55c \ud615\ud0dc\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<p><strong>void glShaderSource(GLuint shader, int numOfString. const char** strings, int *lenOfStrings);<\/strong><br \/>\nParameters: <br \/>\n<strong>&nbsp; shader &#8211; \uc250\uc774\ub354\uc758 \ud578\ub4e4<br \/>\n&nbsp; numOfStrings &#8211; \ubb38\uc790 \ubc30\uc5f4\uc758 \uad6c\uc131 \uc694\uc18c \uc218<br \/>\n&nbsp; strings &#8211; \ubb38\uc790 \ubc30\uc5f4<br \/>\n&nbsp; lenOfStrings &#8211; \uac01 \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \uac00\uc9c0\ub294 \ubc30\uc5f4 \ub610\ub294 NUL\uac12(\ubb38\uc790\uc5f4\ub4e4\uc774 NULL\ub85c \ub05d\ub0a8)<br \/>\n<\/strong><br \/>\n\ub2e4\uc74c\uc740 \uc774 \ud568\uc218\uc5d0 \ub300\ud55c ARB \ud655\uc7a5\uc774\ub2e4.<\/p>\n<p><strong>void glShaderSourceARB(GLhandleARB shader, int numOfStrings, const char **strings, int *lenOfStrings);<\/strong><br \/>\nParameters:<br \/>\n<strong>&nbsp; OpenGL 2.0 \ud615\ud0dc\uc758 \uc778\uc790 \uc124\uba85\uacfc \ub3d9\uc77c\ud568<br \/>\n<\/strong><br \/>\n\ucd5c\uc885\uc801\uc73c\ub85c, \uc250\uc774\ub354\ub294 \ubc18\ub4dc\uc2dc \ucef4\ud30c\uc77c \ub418\uc5b4\uc838\uc57c \ud55c\ub2e4. \uc138\ubc88\uc9f8 \ub2e8\uacc4(glCompileShader)\uac00 \uc250\uc774\ub354 \ucf54\ub4dc\ub97c \ucef4\ud30c\uc77c\ud574\uc8fc\uba70 OpenGL 2.0\uc5d0\uc11c\uc758 \ud615\ud0dc\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<p><strong>void glCompileShader(GLuint shader);<br \/>\n<\/strong>Parameters:<br \/>\n<strong>&nbsp; shader &#8211; \uc250\uc774\ub354\uc758 \ud578\ub4e4<br \/>\n<\/strong><br \/>\n\ub2e4\uc74c\uc73c\ub85c ARB \ud655\uc7a5\uc5d0 \ub300\ud55c \ud615\ud0dc\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<p><strong>void glCompileShaderARB(GLhandleARB shader);<br \/>\n<\/strong>Parameters:<br \/>\n<strong>&nbsp; shader &#8211; \uc250\uc774\ub354\uc758 \ud578\ub4e4<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenGL Setup for GLSL- Shader \uc0dd\uc131\ud558\uae30 \uc6d0\ubb38 : http:\/\/www.lighthouse3d.com\/opengl\/glsl\/index.php?oglshader \ub2e4\uc74c \uadf8\ub9bc\uc740 \uc250\uc774\ub354\ub97c \uc0dd\uc131\ud558\ub294\ub370 \ud544\uc694\ud55c \ub2e8\uacc4\ub97c \ubcf4\uc774\uace0 \uc788\ub2e4. \uccab\ubc88\uc9f8 \ub2e8\uacc4(glCreateShader)\ub294 \uc250\uc774\ub354 \ucee8\ud14c\uc774\ub108\ub85c\uc368 \uc218\ud589\ud558\ub294 \uc624\ube0c\uc81d\ud2b8\ub97c \uc0dd\uc131\ud558\ub294 \uac83\uc774\ub2e4. \uc774 \ud568\uc218\ub294 \ucee8\ud14c\uc774\ub108\uc758 \ud5e8\ub4e4\uc744 \ubc18\ud658\ud55c\ub2e4. \uc774 \ud568\uc218\uc5d0 \ub300\ud55c OpenGL 2.0 \ubb38\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4: GLuint glCreateShader(GLenum shaderType); Parameter: &nbsp; shaderType &#8211; GL_VERTEX_SHADER&nbsp; \ub610\ub294&nbsp; GL_FRAGMENT_SHADER ARB \ud655\uc7a5\ubb38\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4. GLhandleARB glCreateShaderObjectARB(GLenum shaderType); &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=438\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;OpenGL Shader &#8211; 6&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3,25],"class_list":["post-438","post","type-post","status-publish","format-standard","hentry","category-opengl","tag-opengl","tag-shader"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=438"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":3603,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/438\/revisions\/3603"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}