{"id":434,"date":"2007-08-09T17:56:00","date_gmt":"2007-08-09T17:56:00","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=434"},"modified":"2017-01-29T11:24:04","modified_gmt":"2017-01-29T02:24:04","slug":"opengl-shader-5","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=434","title":{"rendered":"OpenGL Shader &#8211; 5"},"content":{"rendered":"<p><strong>OpenGL Setup for GLSL &#8211; Overview<br \/>\n<\/strong>\uc6d0\ubb38: <a href=\"http:\/\/www.lighthouse3d.com\/opengl\/glsl\/index.php?ogloverview\">http:\/\/www.lighthouse3d.com\/opengl\/glsl\/index.php?ogloverview<\/a><\/p>\n<p>GLSL\uc744 \uc704\ud55c OpenGL \uc124\uc815\uc774\ub77c\ub294 \uc774 \uc139\uc158\uc740\u00a0 \ub450\uac1c\uc758 \ubc84\ud14d\uc2a4 \uc250\uc774\ub354\uc640 \ud504\ub808\uadf8\uba3c\ud2b8 \uc250\uc774\ub354\uc5d0 \ub300\ud574 \ub4e4\uc5b4\ubd24\ub2e4\uace0 \uac00\uc815\uc744 \ud558\uace0 \uc9c4\ud589\ub418\uba70 OpenGL \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc774 \uc250\uc774\ub354\ub4e4\uc744 \uc0ac\uc6a9\uae30 \uc704\ud55c \ub0b4\uc6a9\uc774\ub2e4. \ub9cc\uc57d \uc544\uc9c1\uae4c\uc9c0 \uc9c1\uc811 \uc250\uc774\ub354\ub97c \uc791\uc131\ud574\ubcf4\uc9c0 \uc54a\uc558\ub2e4\uba74, \uc778\ud130\ub137\uc73c\ub85c\ubd80\ud130 \uc250\uc774\ub354\ub97c \uad6c\ud560 \ub9ce\uc740 \uc0ac\uc774\ud2b8\uac00 \uc788\uc73c\ub2c8 \ucc38\uace0\ud558\uae38 \ubc14\ub780\ub2e4. \ucc38\uace0 \uc0ac\uc774\ud2b8\ub294 <a href=\"http:\/\/www.3dshaders.com\/home\/\">http:\/\/www.3dshaders.com\/home\/<\/a>\uac00 \uc788\uc73c\uba70 \uc250\uc774\ub354 \uac1c\ubc1c\uc744 \uc704\ud55c \ud234\ub85c\ub294 \u00a0Shader Designer\uc640 RenderMonkey (\uc6d0\ubb38\uc5d0\uc11c\ub294 \ub9c1\ud06c\uac00 \uae68\uc838\uc788\uc73c\uba70 \uad6c\uae00\uc5d0\uc11c \uac80\uc0c9\ud574\uc11c \ud604\uc7ac \uc0ac\uc6a9\uac00\ub2a5\ud55c \uc0ac\uc774\ud2b8\uc758 URL\uc744 \uac80\uc0c9\ud574\ubcf4\uae38 \ubc14\ub780\ub2e4)\uac00 \uc788\uace0, \uc774 \ud234\uc5d0\ub294 \ub9e4\uc6b0 \ub9ce\uc740 \uc250\uc774\ub354 \uc608\uc81c\uac00 \uc788\ub2e4.<\/p>\n<p>OpenGL\uc744 \ubcf4\uba74, \uc250\uc774\ub354 \ud504\ub85c\uadf8\ub7a8\uc744 \uc124\uc815\ud558\ub294 \uac83\uc740 C \ud504\ub85c\uadf8\ub7a8\uc744 \uc791\uc131\ud558\ub294 \ud750\ub984\uacfc \uc720\uc0ac\ud558\ub2e4. \uac01 \uc250\uc774\ub354\ub294 C \ubaa8\ub4c8\uacfc \uc720\uc0ac\ud558\uba70 \uc774 \ubaa8\ub4c8\uc740 C\uc5b8\uc5b4\uc5d0\uc11c \ucc98\ub7fc \uac1c\ubcc4\uc801\uc73c\ub85c \ucef4\ud30c\uc77c\ub418\uc5b4\uc838\uc57c\ud558\uace0, \ub610 \uc815\ud655\ud788 C\uc5d0\uc11c\ucc98\ub7fc \ud504\ub85c\uadf8\ub7a8\uc5d0 \ub9c1\ud06c\ub418\uc5ec\uc57c \ud55c\ub2e4.<\/p>\n<p>ARB \ud655\uc7a5\ub4e4\uacfc OpenGL\uc774 \uc774 \uc139\uc158\uc5d0\uc11c \uc0ac\uc6a9\ub41c\ub2e4. \ub9cc\uc57d\uc5d0 OpenGL\uc758 \ubc84\uc804\uc774 1.1 \uc774\uc0c1\uc744 \uc0ac\uc6a9\ud574 \ubcf4\uc9c0 \uc54a\uc558\uac70\ub098 \ud655\uc7a5\uc774 \ucc98\uc74c\uc774\ub77c\uba74, <a href=\"http:\/\/www.gisdeveloper.co.kr\/owner\/entry\/glew.sourceforge.net\">GLEW<\/a>\ub97c \ubcf4\uae38\ubc14\ub780\ub2e4. GLEW\ub294 \ud655\uc7a5\uae30\ub2a5\uacfc OpenGL \ucd5c\uc2e0 \ud568\uc218 \uc0ac\uc6a9\ub97c \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc900\ub2e4.<\/p>\n<p>\ub9cc\uc57d\uc5d0 \uc544\uc9c1 OpenGL 2.0\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294\ub2e4\uba74, \ud655\uc7a5\uc744 \uc774\uc6a9\ud574\uc57c \ud558\ub294\ub370, \ud544\uc694\ud55c \ud655\uc7a5\uc740 \uc544\ub798\uc640 \uac19\ub2e4.<\/p>\n<ul>\n<li>GL_ARB_fragment_shader<\/li>\n<li>GL_ARG vertex_shader<\/li>\n<\/ul>\n<p>\uc544\ub798\ub294 GLEW\ub97c \uc0ac\uc6a9\ud558\ub294 GLUT \ud504\ub85c\uadf8\ub7a8\uc758 \uac04\ub2e8\ud55c \uc608\uc81c\uc778\ub370, \uc704\uc758 \ub450\uac1c\uc758 \ud655\uc7a5\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294\uc9c0 \uac80\ud1a0\ud558\ub294 \ucf54\ub4dc\uc774\ub2e4.<\/p>\n<pre><code class=\"html\">#include <GL\/glew.h>\r\n#include <GL\/glut.h>;\r\n\t\r\nvoid main(int argc, char **argv) {\r\n    glutInit(&argc, argv);\r\n\t\t\r\n    ...\r\n\t\r\n    glewInit();\r\n    if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)\r\n        printf(\"Ready for GLSL\\n\");\r\n    else {\r\n        printf(\"Not totally ready :( \\n\");\r\n        exit(1);\r\n    }\r\n\t\r\n    setShaders();\r\n\t\r\n    glutMainLoop();\r\n}<\/code><\/pre>\n<p>OpenGL 2.0\uc774 \uac00\ub2a5\ud55c\uc9c0 \uac80\uc0ac\ud558\uae30 \uc704\ud574\uc11c \uc544\ub798\uc640 \uac19\uc740 \ucf54\ub4dc\ub97c \uc0ac\uc6a9\ud55c\ub2e4.<\/p>\n<pre><code class=\"html\">#include <GL\/glew.h>\r\n#include <GL\/glut.h>\r\n\r\nvoid main(int argc, char **argv) {\r\n\r\n    glutInit(&argc, argv);\r\n\t\t\r\n    ...\r\n\t\r\n    glewInit();\r\n    if (glewIsSupported(\"GL_VERSION_2_0\"))\r\n        printf(\"Ready for OpenGL 2.0\\n\");\r\n    else {\r\n        printf(\"OpenGL 2.0 not supported\\n\");\r\n        exit(1);\r\n    }\r\n\r\n    setShaders();\r\n\t\r\n    glutMainLoop();\r\n}<\/code><\/pre>\n<p>\uc544\ub798\uc758 \uadf8\ub9bc\uc740 OpenGL 2.0\uc758 \ud568\uc218\ub85c\uc368 \ub098\ud0c0\ub0b8 \uc250\uc774\ub354\ub97c \uc0dd\uc131\ud558\ub294 \ub2e8\uacc4\ub97c \ub098\ud0c0\ub0b4\uace0 \uc778\ub370, \uc5b8\uae09\ud55c \ud568\uc218\uc758 \uc138\ubd80\ub0b4\uc6a9\uc740 \ub098\uc911\uc5d0 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\ub3c4\ub85d \ud558\uaca0\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1124057296.jpg\" alt=\"\" width=\"435\" height=\"318\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenGL Setup for GLSL &#8211; Overview \uc6d0\ubb38: http:\/\/www.lighthouse3d.com\/opengl\/glsl\/index.php?ogloverview GLSL\uc744 \uc704\ud55c OpenGL \uc124\uc815\uc774\ub77c\ub294 \uc774 \uc139\uc158\uc740\u00a0 \ub450\uac1c\uc758 \ubc84\ud14d\uc2a4 \uc250\uc774\ub354\uc640 \ud504\ub808\uadf8\uba3c\ud2b8 \uc250\uc774\ub354\uc5d0 \ub300\ud574 \ub4e4\uc5b4\ubd24\ub2e4\uace0 \uac00\uc815\uc744 \ud558\uace0 \uc9c4\ud589\ub418\uba70 OpenGL \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc774 \uc250\uc774\ub354\ub4e4\uc744 \uc0ac\uc6a9\uae30 \uc704\ud55c \ub0b4\uc6a9\uc774\ub2e4. \ub9cc\uc57d \uc544\uc9c1\uae4c\uc9c0 \uc9c1\uc811 \uc250\uc774\ub354\ub97c \uc791\uc131\ud574\ubcf4\uc9c0 \uc54a\uc558\ub2e4\uba74, \uc778\ud130\ub137\uc73c\ub85c\ubd80\ud130 \uc250\uc774\ub354\ub97c \uad6c\ud560 \ub9ce\uc740 \uc0ac\uc774\ud2b8\uac00 \uc788\uc73c\ub2c8 \ucc38\uace0\ud558\uae38 \ubc14\ub780\ub2e4. \ucc38\uace0 \uc0ac\uc774\ud2b8\ub294 http:\/\/www.3dshaders.com\/home\/\uac00 \uc788\uc73c\uba70 \uc250\uc774\ub354 \uac1c\ubc1c\uc744 \uc704\ud55c \ud234\ub85c\ub294 \u00a0Shader Designer\uc640 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=434\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;OpenGL Shader &#8211; 5&#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-434","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\/434","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=434"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/434\/revisions"}],"predecessor-version":[{"id":3606,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/434\/revisions\/3606"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}