{"id":350018,"date":"2023-07-09T21:00:52","date_gmt":"2023-07-09T21:00:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=350018"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=350018","title":{"rendered":"<span>GLFW + GLAD = OpenGL \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u043a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u044b\u043b\u043e&#8230; \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0435\u0449\u0451 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043c\u044b \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u0438\u043b\u043e \u0431\u044b \u0412\u0430\u0441, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0438\u0445 \u043e\u043f\u0443\u0441\u043e\u0432, \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c.<\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u0441 OpenGL. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f NetBeans IDE 8.2, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b netbeans-8.2-windows.exe \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 225 472 \u043a\u0431. \u0438 jdk-8u144-windows-x64 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b jdk-8u144-windows-x64.exe \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 202 523 \u043a\u0431.<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u0448\u0443 \u0442\u043e\u0447\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0438\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u0438, \u0430 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u044f, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0433\u0443 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u043c \u043e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e7e\/f46\/bcc\/e7ef46bcc45e5797d3229fc9910bb705.png\" alt=\"NetBeans IDE 8.2\" title=\"NetBeans IDE 8.2\" width=\"1712\" height=\"963\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e7e\/f46\/bcc\/e7ef46bcc45e5797d3229fc9910bb705.png\"\/><\/p>\n<div><figcaption>NetBeans IDE 8.2<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/20a\/66d\/9df\/20a66d9dff9f4a55b595e605f23189a4.png\" alt=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432\" title=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432\" width=\"1710\" height=\"959\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/20a\/66d\/9df\/20a66d9dff9f4a55b595e605f23189a4.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 CLang. \u0412\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b MSYS \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/www.msys2.org\" rel=\"noopener noreferrer nofollow\">https:\/\/www.msys2.org<\/a>. \u0423\u043f\u043e\u0440 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b UCRT64. MinGW \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>\u041e\u0431 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a OpenGL.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u0437\u0430\u043f\u0438\u0445\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0438\u0437 GLFW + GLAD  \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c OpenGL \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u0441 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c GLAD? \u0421 glad.h \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e, \u0430 \u0432\u043e\u0442 \u0441 glad.c \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438. \u041f\u043e\u0438\u0441\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c\u0438 \u0438 \u0435\u0451 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e GLFW+GLEW, \u043d\u043e \u044f \u043e\u0442 \u043d\u0435\u0451 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0445\u043e\u0442\u0435\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e GLFW+GLAD.<\/p>\n<p>\u0422\u0440\u0435\u0442\u044c\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0447\u0442\u043e \u0432\u0435\u0437\u0434\u0435 \u0432 &#171;\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445&#187; \u0434\u0430\u0451\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u044f\u0437\u0430\u043d\u044b \u043e\u0442 \u0446\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u0443\u0434\u0430 \u043f\u0438\u0441\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0433\u0434\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<p>\u042f \u043d\u043e\u0432\u0438\u0447\u043e\u043a \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0438\u0448\u0443 \u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u043d\u0430\u043f\u0430\u0434\u0430\u0439\u0442\u0435 \ud83d\ude42<\/p>\n<p>main.cpp<\/p>\n<pre><code>\/\/#define GLAD_GL_IMPLEMENTATION #include &lt;GLAD\/glad Core v.3.3\/include\/glad\/glad.h> #include &lt;GLAD\/glad Core v.3.3\/src\/glad.c> #define GLFW_INCLUDE_NONE #include &lt;GLFW\/glfw3.h>  #include &lt;stdio.h> #include &lt;stdlib.h> #include &lt;string.h> #include &lt;iostream> using namespace std;  \/\/GLFWwindow  *window;  static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {     if (key == GLFW_KEY_ESCAPE &amp;&amp; action == GLFW_PRESS)         glfwSetWindowShouldClose(window, GLFW_TRUE);          switch (key)     {         case GLFW_KEY_ESCAPE:             glfwSetWindowShouldClose(window, GLFW_TRUE);             break;        \/* case GLFW_KEY_SPACE:             cur_icon_color = (cur_icon_color + 1) % 5;             set_icon(window, cur_icon_color);             break;         case GLFW_KEY_X:             glfwSetWindowIcon(window, 0, NULL);             break;*\/     } }      void triang() {     GLuint vbo = 0; GLuint vao = 0; float points[] = {    0.0f,  0.5f,  0.0f,    0.5f, -0.5f,  0.0f,   -0.5f, -0.5f,  0.0f }; const char* vertex_shader = \"#version 400\\n\" \"in vec3 vp;\" \"void main() {\" \"  gl_Position = vec4(vp, 1.0);\" \"}\"; const char* fragment_shader = \"#version 400\\n\" \"out vec4 frag_colour;\" \"void main() {\" \"  frag_colour = vec4(0.2, 0.0, 0.5, 1.0);\" \"}\"; GLuint vs = glCreateShader(GL_VERTEX_SHADER); GLuint fs = glCreateShader(GL_FRAGMENT_SHADER); GLuint shader_programme = glCreateProgram(); glGenBuffers(1, &amp;vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, 9 * sizeof(float), points, GL_STATIC_DRAW);  glGenVertexArrays(1, &amp;vao); glBindVertexArray(vao); glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, vbo); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);   glShaderSource(vs, 1, &amp;vertex_shader, NULL); glCompileShader(vs);  glShaderSource(fs, 1, &amp;fragment_shader, NULL); glCompileShader(fs);  glAttachShader(shader_programme, fs); glAttachShader(shader_programme, vs); glLinkProgram(shader_programme);  glUseProgram(shader_programme);   glBindVertexArray(vao);   \/\/ draw points 0-3 from the currently bound VAO with current in-use shader   glDrawArrays(GL_TRIANGLES, 0, 3);   \/\/ update other events like input handling  }   \/\/ \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430, \u043e\u043a\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0442\u0440\u0435\u0431\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 void framebuffer_size_callback(GLFWwindow* window,int width,int height){          \/\/ \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 glViewport \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043b\u0435\u0432\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043e\u043a\u043d\u0430, \u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0438 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e\u0442 \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0432\u044b\u0441\u043e\u0442\u0443 \u043e\u043a\u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430     glfwSetKeyCallback(window, key_callback);     glfwGetFramebufferSize(window, &amp;width, &amp;height);     glViewport(0,0,width,height); } \/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u0436\u0430\u0442\u0430 \u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0430 void processInput(GLFWwindow * window){          \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 (Esc) (\u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0436\u0430\u0442\u0430, glfwGetKey \u0432\u0435\u0440\u043d\u0435\u0442 GLFW_RELEASE, \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430, GLFW_PRESS)     if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) {         glfwSetWindowShouldClose(window, true);     } }  int main(int argc, char** argv) { \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f GLFW     glfwInit();               \/\/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 OpenGL (Major) \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (Minor) \u0432 3     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);     glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);               \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u044f\u0434\u0440\u0430 (Core-profile)     glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);               \/\/ \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 MacOS, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438     \/\/glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);               \/\/ \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043a\u043d\u0430     GLFWwindow * window = glfwCreateWindow(800, 600, \"GLFW + GLAD\", NULL, NULL);     if (window == NULL){         cout &lt;&lt; \"Failed to create GLFW window\" &lt;&lt; endl;         glfwTerminate();         return -1;     }          \/\/ \u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c GLFW, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u043a\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430     glfwMakeContextCurrent(window);               \/\/ GLAD \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 OpenGL, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c GLAD \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043b\u044e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 OpenGL     if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)){         cout &lt;&lt; \"Failed to initialize GLAD\" &lt;&lt; endl;         return -1;     }               \/\/ \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c GLFW \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430     glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);                         \/\/ \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0430     while (!glfwWindowShouldClose(window)) {                           \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0436\u0430\u0442\u0430 \u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0430, \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440         processInput(window);                           \/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f glClearColor - \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0446\u0432\u0435\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u044d\u043a\u0440\u0430\u043d\u0430         glClearColor(0.2f,0.3f,0.3f,1.0f);                  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f glClear - \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c         glClear(GL_COLOR_BUFFER_BIT);         \/\/triang(); - \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435!         triang();                  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f glfwSwapBuffers \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u043c\u0438 \u0431\u0443\u0444\u0435\u0440\u0430\u043c\u0438         glfwSwapBuffers(window);                  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f glfwPollEvents \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f         glfwPollEvents();     }                    \/\/ \u041e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u043d\u0435\u0435     glfwTerminate();          return 0; } <\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0434\u0435\u0439, \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438 \u0447\u0435\u0433\u043e \u043c\u043e\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/605\/812\/c23\/605812c23e045effd23a35882d818f62.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b\" width=\"1712\" height=\"963\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/605\/812\/c23\/605812c23e045effd23a35882d818f62.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0430\u0445\u0442\u0438 \u043a\u0430\u043a\u0430\u044f, \u043d\u043e \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434, \u0443\u0434\u0430\u043b\u0438\u0432 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435 \u0440\u0430\u0437\u0440\u0443\u0448\u0438\u0432 \u0446\u0435\u043b\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0442\u0430\u043a \u0436\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434. \u041a\u0430\u043a\u0438\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u0443 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438? \u041d\u0430\u0432\u0435\u0440\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0435\u0439.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u043f\u0435\u0445\u043e\u0432.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/746884\/\"> https:\/\/habr.com\/ru\/articles\/746884\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u043a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u044b\u043b\u043e&#8230; \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0435\u0449\u0451 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043c\u044b \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u0438\u043b\u043e \u0431\u044b \u0412\u0430\u0441, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0438\u0445 \u043e\u043f\u0443\u0441\u043e\u0432, \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c.<\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u0441 OpenGL. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f NetBeans IDE 8.2, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b netbeans-8.2-windows.exe \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 225 472 \u043a\u0431. \u0438 jdk-8u144-windows-x64 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b jdk-8u144-windows-x64.exe \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 202 523 \u043a\u0431.<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u0448\u0443 \u0442\u043e\u0447\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0438\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u0438, \u0430 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u044f, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0433\u0443 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u043c \u043e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>NetBeans IDE 8.2<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 CLang. \u0412\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b MSYS \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/www.msys2.org\" rel=\"noopener noreferrer nofollow\">https:\/\/www.msys2.org<\/a>. \u0423\u043f\u043e\u0440 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b UCRT64. MinGW \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c.<\/p>\n<p>\u041e\u0431 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a OpenGL.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u0437\u0430\u043f\u0438\u0445\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0438\u0437 GLFW + GLAD  \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c OpenGL \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u0441 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c GLAD? \u0421 glad.h \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e, \u0430 \u0432\u043e\u0442 \u0441 glad.c \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438. \u041f\u043e\u0438\u0441\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c\u0438 \u0438 \u0435\u0451 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e GLFW+GLEW, \u043d\u043e \u044f \u043e\u0442 \u043d\u0435\u0451 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0445\u043e\u0442\u0435\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e GLFW+GLAD.<\/p>\n<p>\u0422\u0440\u0435\u0442\u044c\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0447\u0442\u043e \u0432\u0435\u0437\u0434\u0435 \u0432 &#171;\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445&#187; \u0434\u0430\u0451\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u044f\u0437\u0430\u043d\u044b \u043e\u0442 \u0446\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u0443\u0434\u0430 \u043f\u0438\u0441\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0433\u0434\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<p>\u042f \u043d\u043e\u0432\u0438\u0447\u043e\u043a \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0438\u0448\u0443 \u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u043d\u0430\u043f\u0430\u0434\u0430\u0439\u0442\u0435 \ud83d\ude42<\/p>\n<p>main.cpp<\/p>\n<pre><code>\/\/#define GLAD_GL_IMPLEMENTATION #include &lt;GLAD\/glad Core v.3.3\/include\/glad\/glad.h> #include &lt;GLAD\/glad Core v.3.3\/src\/glad.c> #define GLFW_INCLUDE_NONE #include &lt;GLFW\/glfw3.h>  #include &lt;stdio.h> #include &lt;stdlib.h> #include &lt;string.h> #include &lt;iostream> using namespace std;  \/\/GLFWwindow  *window;  static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {     if (key == GLFW_KEY_ESCAPE &amp;&amp; action == GLFW_PRESS)         glfwSetWindowShouldClose(window, GLFW_TRUE);          switch (key)     {         case GLFW_KEY_ESCAPE:             glfwSetWindowShouldClose(window, GLFW_TRUE);             break;        \/* case GLFW_KEY_SPACE:             cur_icon_color = (cur_icon_color + 1) % 5;             set_icon(window, cur_icon_color);             break;         case GLFW_KEY_X:             glfwSetWindowIcon(window, 0, NULL);             break;*\/     } }      void triang() {     GLuint vbo = 0; GLuint vao = 0; float points[] = {    0.0f,  0.5f,  0.0f,    0.5f, -0.5f,  0.0f,   -0.5f, -0.5f,  0.0f }; const char* vertex_shader = \"#version 400\\n\" \"in vec3 vp;\" \"void main() {\" \"  gl_Position = vec4(vp, 1.0);\" \"}\"; const char* fragment_shader = \"#version 400\\n\" \"out vec4 frag_colour;\" \"void main() {\" \"  frag_colour = vec4(0.2, 0.0, 0.5, 1.0);\" \"}\"; GLuint vs = glCreateShader(GL_VERTEX_SHADER); GLuint fs = glCreateShader(GL_FRAGMENT_SHADER); GLuint shader_programme = glCreateProgram(); glGenBuffers(1, &amp;vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, 9 * sizeof(float), points, GL_STATIC_DRAW);  glGenVertexArrays(1, &amp;vao); glBindVertexArray(vao); glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, vbo); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);   glShaderSource(vs, 1, &amp;vertex_shader, NULL); glCompileShader(vs);  glShaderSource(fs, 1, &amp;fragment_shader, NULL); glCompileShader(fs);  glAttachShader(shader_programme, fs); glAttachShader(shader_programme, vs); glLinkProgram(shader_programme);  glUseProgram(shader_programme);   glBindVertexArray(vao);   \/\/ draw points 0-3 from the currently bound VAO with current in-use shader   glDrawArrays(GL_TRIANGLES, 0, 3);   \/\/ update other events like input handling  }   \/\/ \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430, \u043e\u043a\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0442\u0440\u0435\u0431\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 void framebuffer_size_callback(GLFWwindow* window,int width,int height){          \/\/ \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 glViewport \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043b\u0435\u0432\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043e\u043a\u043d\u0430, \u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0438 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e\u0442 \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0432\u044b\u0441\u043e\u0442\u0443 \u043e\u043a\u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430     glfwSetKeyCallback(window, key_callback);     glfwGetFramebufferSize(window, &amp;width, &amp;height);     glViewport(0,0,width,height); } \/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u0436\u0430\u0442\u0430 \u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0430 void processInput(GLFWwindow * window){          \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 (Esc) (\u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0436\u0430\u0442\u0430, glfwGetKey \u0432\u0435\u0440\u043d\u0435\u0442 GLFW_RELEASE, \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430, GLFW_PRESS)     if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) {         glfwSetWindowShouldClose(window, true);     } }  int main(int argc, char** argv) { \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f GLFW     glfwInit();               \/\/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 OpenGL (Major) \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (Minor) \u0432 3     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);     glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);               \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u044f\u0434\u0440\u0430 (Core-profile)     glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);               \/\/ \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 MacOS, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438     \/\/glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);               \/\/ \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043a\u043d\u0430     GLFWwindow * window = glfwCreateWindow(800, 600, \"GLFW + GLAD\", NULL, NULL);     if (window == NULL){         cout &lt;&lt; \"Failed to create GLFW window\" &lt;&lt; endl;         glfwTerminate();         return -1;     }          \/\/ \u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c GLFW, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u043a\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430     glfwMakeContextCurrent(window);               \/\/ GLAD \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 OpenGL, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c GLAD \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043b\u044e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 OpenGL     if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)){         cout &lt;&lt; \"Failed to initialize GLAD\" &lt;&lt; endl;         return -1;     }               \/\/ \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c GLFW \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430     glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);                         \/\/ \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0430     while (!glfwWindowShouldClose(window)) {                           \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0436\u0430\u0442\u0430 \u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0430, \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440         processInput(window);                           \/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f glClearColor - \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0446\u0432\u0435\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u044d\u043a\u0440\u0430\u043d\u0430         glClearColor(0.2f,0.3f,0.3f,1.0f);                  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f glClear - \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c         glClear(GL_COLOR_BUFFER_BIT);         \/\/triang(); - \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435!         triang();                  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f glfwSwapBuffers \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u043c\u0438 \u0431\u0443\u0444\u0435\u0440\u0430\u043c\u0438         glfwSwapBuffers(window);                  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f glfwPollEvents \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f         glfwPollEvents();     }                    \/\/ \u041e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u043d\u0435\u0435     glfwTerminate();          return 0; } <\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0434\u0435\u0439, \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438 \u0447\u0435\u0433\u043e \u043c\u043e\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0430\u0445\u0442\u0438 \u043a\u0430\u043a\u0430\u044f, \u043d\u043e \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434, \u0443\u0434\u0430\u043b\u0438\u0432 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435 \u0440\u0430\u0437\u0440\u0443\u0448\u0438\u0432 \u0446\u0435\u043b\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0442\u0430\u043a \u0436\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434. \u041a\u0430\u043a\u0438\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u0443 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438? \u041d\u0430\u0432\u0435\u0440\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0435\u0439.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u043f\u0435\u0445\u043e\u0432.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/746884\/\"> https:\/\/habr.com\/ru\/articles\/746884\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-350018","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=350018"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350018\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}