{"id":1133,"date":"2017-07-12T16:02:37","date_gmt":"2017-07-12T16:02:37","guid":{"rendered":"http:\/\/demensdeum.com\/blog\/?p=1133"},"modified":"2024-12-16T22:32:46","modified_gmt":"2024-12-16T19:32:46","slug":"sdl2-opengl-es","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/ru\/2017\/07\/12\/sdl2-opengl-es\/","title":{"rendered":"SDL2 &#8211; OpenGL ES"},"content":{"rendered":"<p>\u042f \u043b\u044e\u0431\u043b\u044e <strong>Panda3D<\/strong>. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u0435\u043d \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438\/\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Microsoft Windows. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 OpenGL ES \u0438 SDL2.<br \/>\n\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c OpenGL \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u041c\u044b \u0432\u044b\u0432\u0435\u0434\u0435\u043c <strong>\u043f\u0443\u0441\u0442\u043e\u0435<\/strong> \u043e\u043a\u043d\u043e.<\/p>\n<h3>King Nothing<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenGL ES3 &#8211; GLES 3. \u041d\u0430 \u0443\u0431\u0443\u043d\u0442\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e, \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <strong>sudo apt-get install libgles2-mesa-dev<\/strong>. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OpenGL, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a &#8211; SDL2, GLFW, GLFM \u0438 \u0442\u0434. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u044f \u0432\u044b\u0431\u0440\u0430\u043b SDL2 \u0442.\u043a. \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0435\u0434\u0438\u043d \u0434\u043b\u044f Windows\/*nix\/HTML5\/iOS\/Android\/\u0438 \u0442\u0434.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c SDL2 \u043d\u0430 \u0443\u0431\u0443\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <strong>sudo apt-get install libsdl2-dev<\/strong><\/p>\n<p>\u041a\u043e\u0434 \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 OpenGL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SDL2:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\">    SDL_Window *window = SDL_CreateWindow(\r\n            <span style=\"color: #0000ff;\">\"SDL2 - OGLES\"<\/span>,\r\n            SDL_WINDOWPOS_UNDEFINED,\r\n            SDL_WINDOWPOS_UNDEFINED,\r\n            <span style=\"color: #0000ff;\">640<\/span>,\r\n            <span style=\"color: #0000ff;\">480<\/span>,\r\n            SDL_WINDOW_OPENGL\r\n            );\r\n\t    \r\n\r\n    SDL_GLContext glContext = SDL_GL_CreateContext(window);\r\n<\/pre>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b OpenGL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043e\u043a\u043d\u0430 \u043d\u0430 OpenGL ES \u0441 \u0441\u0438\u043d\u0435\u0439 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439:<br \/>\n<a href=\"https:\/\/github.com\/demensdeum\/OpenGLES3-Experiments\/tree\/master\/3sdl-gles\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/demensdeum\/OpenGLES3-Experiments\/tree\/master\/3sdl-gles<\/a><br \/>\n<a href=\"https:\/\/github.com\/demensdeum\/OpenGLES3-Experiments\/blob\/master\/3sdl-gles\/sdlgles.cpp\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/demensdeum\/OpenGLES3-Experiments\/blob\/master\/3sdl-gles\/sdlgles.cpp<\/a><\/p>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <strong>cmake . &#038;&#038; make &#038;&#038; .\/SDLGles<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f \u043b\u044e\u0431\u043b\u044e Panda3D. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u0435\u043d \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438\/\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Microsoft Windows. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 OpenGL ES \u0438 SDL2. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c OpenGL \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u041c\u044b \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0435 \u043e\u043a\u043d\u043e. King Nothing \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenGL ES3 &#8211; GLES 3. \u041d\u0430 \u0443\u0431\u0443\u043d\u0442\u0435 \u044d\u0442\u043e<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/ru\/2017\/07\/12\/sdl2-opengl-es\/\">Continue reading <span class=\"screen-reader-text\">&#8220;SDL2 &#8211; OpenGL ES&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[61,52],"tags":[76,77],"class_list":["post-1133","post","type-post","status-publish","format-standard","hentry","category-techie","category-tutorials","tag-opengl","tag-sdl","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"ru","enabled_languages":["en","ru","zh","de","fr","ja","pt","hi"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":false,"content":false,"excerpt":false},"de":{"title":false,"content":false,"excerpt":false},"fr":{"title":false,"content":false,"excerpt":false},"ja":{"title":false,"content":false,"excerpt":false},"pt":{"title":false,"content":false,"excerpt":false},"hi":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/comments?post=1133"}],"version-history":[{"count":9,"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/posts\/1133\/revisions"}],"predecessor-version":[{"id":1142,"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/posts\/1133\/revisions\/1142"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/media?parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/categories?post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/ru\/wp-json\/wp\/v2\/tags?post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}