Backends: Include imgui.h in implementation headers. (#3105)

Currently, the implementation headers don't include the imgui.h header.
Which means that the compilation will fail if the implementation header
was included before the imgui.h header in the compilation unit. For
instance, a compilation unit with the following will work:

  #include "imgui.h"
  #include "imgui_impl_glfw.h"
  #include "imgui_impl_opengl3.h"

But a compilation unit with the following will fail because IMGUI_IMPL_API
and possibly other symbols will not be defined:

  #include "imgui_impl_glfw.h"
  #include "imgui_impl_opengl3.h"
  #include "imgui.h"

This patch includes imgui.h in the implementation headers to make
inclusions order-invariant, which is a recommended practice.
This commit is contained in:
OmarEmaraDev
2020-04-06 20:23:57 +02:00
committed by omar
parent 752436219d
commit 00927105ba
15 changed files with 29 additions and 0 deletions

View File

@ -23,6 +23,8 @@
#pragma once
#include "imgui.h"
// Backend API
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL);
IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();