diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp index bb24c73b..95b02920 100644 --- a/examples/directx11_example/main.cpp +++ b/examples/directx11_example/main.cpp @@ -1,3 +1,5 @@ +// ImGui - standalone example application for DirectX 11 + #include #define STB_IMAGE_IMPLEMENTATION #include "../shared/stb_image.h" // for .png loading diff --git a/examples/directx9_example/directx9_example.vcxproj b/examples/directx9_example/directx9_example.vcxproj index 512d86e1..5609b756 100644 --- a/examples/directx9_example/directx9_example.vcxproj +++ b/examples/directx9_example/directx9_example.vcxproj @@ -70,8 +70,14 @@ + + + + + + diff --git a/examples/directx9_example/directx9_example.vcxproj.filters b/examples/directx9_example/directx9_example.vcxproj.filters index f18cb00d..f39e1589 100644 --- a/examples/directx9_example/directx9_example.vcxproj.filters +++ b/examples/directx9_example/directx9_example.vcxproj.filters @@ -5,10 +5,27 @@ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + {a82cba23-9de0-45c2-b1e3-2eb1666702de} + sources + + imgui + + + + + imgui + + + imgui + + + imgui + \ No newline at end of file diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp index dc86c3c0..9da31d2f 100644 --- a/examples/directx9_example/main.cpp +++ b/examples/directx9_example/main.cpp @@ -1,3 +1,5 @@ +// ImGui - standalone example application for DirectX 9 + #include #include "../../imgui.h" diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 6d5304fe..e2f2442e 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -1,19 +1,24 @@ -#define GLEW_STATIC -#include -#include -#define STB_IMAGE_IMPLEMENTATION -#include "../shared/stb_image.h" // for .png loading -#include "../../imgui.h" +// ImGui - standalone example application for OpenGL 3, using programmable pipeline + #ifdef _MSC_VER #pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen #endif +#include "../../imgui.h" +#define STB_IMAGE_IMPLEMENTATION +#include "../shared/stb_image.h" // stb_image.h for PNG loading + +// Glfw/Glew +#define GLEW_STATIC +#include +#include + static GLFWwindow* window; static GLuint fontTex; static bool mousePressed[2] = { false, false }; static ImVec2 mousePosScale(1.0f, 1.0f); -//Shader variables +// Shader variables static int shader_handle, vert_handle, frag_handle; static int texture_location, ortho_location; @@ -25,7 +30,6 @@ static int position_location, uv_location, colour_location; static size_t vbo_max_size = 1000000; static unsigned int vbo_handle, vao_handle; - // This is the main rendering function that you have to implement and provide to ImGui (via setting up 'RenderDrawListsFn' in the ImGuiIO structure) // If text or lines are blurry when integrating ImGui in your engine: // - try adjusting ImGui::GetIO().PixelCenterOffset to 0.0f or 0.5f diff --git a/examples/opengl_example/main.cpp b/examples/opengl_example/main.cpp index 61a9f369..32ca0b9f 100644 --- a/examples/opengl_example/main.cpp +++ b/examples/opengl_example/main.cpp @@ -1,20 +1,17 @@ +// ImGui - standalone example application for OpenGL 2, using fixed pipeline + #ifdef _MSC_VER #pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen -#include #endif -#define STB_IMAGE_IMPLEMENTATION -#include "../shared/stb_image.h" // for .png loading -#include "../../imgui.h" -// glew & glfw +#include "../../imgui.h" +#define STB_IMAGE_IMPLEMENTATION +#include "../shared/stb_image.h" // stb_image.h for PNG loading + +// Glfw/Glew #define GLEW_STATIC #include #include -#ifdef _MSC_VER -#define GLFW_EXPOSE_NATIVE_WIN32 -#define GLFW_EXPOSE_NATIVE_WGL -#include -#endif static GLFWwindow* window; static GLuint fontTex;