Examples' Says "OpenGL2" vs "OpenGL3" in title bar.
This commit is contained in:
parent
a09f426b89
commit
51df5874a6
@ -152,11 +152,9 @@ static void glfw_char_callback(GLFWwindow* window, unsigned int c)
|
|||||||
ImGui::GetIO().AddInputCharacter((unsigned short)c);
|
ImGui::GetIO().AddInputCharacter((unsigned short)c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenGL code based on http://open.gl tutorials
|
|
||||||
void InitGL()
|
void InitGL()
|
||||||
{
|
{
|
||||||
glfwSetErrorCallback(glfw_error_callback);
|
glfwSetErrorCallback(glfw_error_callback);
|
||||||
|
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
@ -164,7 +162,7 @@ void InitGL()
|
|||||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
|
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
|
||||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||||
|
|
||||||
window = glfwCreateWindow(1280, 720, "ImGui OpenGL example", NULL, NULL);
|
window = glfwCreateWindow(1280, 720, "ImGui OpenGL3 example", NULL, NULL);
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
glfwSetKeyCallback(window, glfw_key_callback);
|
glfwSetKeyCallback(window, glfw_key_callback);
|
||||||
glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);
|
glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);
|
||||||
|
@ -130,15 +130,13 @@ static void glfw_char_callback(GLFWwindow* window, unsigned int c)
|
|||||||
ImGui::GetIO().AddInputCharacter((unsigned short)c);
|
ImGui::GetIO().AddInputCharacter((unsigned short)c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenGL code based on http://open.gl tutorials
|
|
||||||
void InitGL()
|
void InitGL()
|
||||||
{
|
{
|
||||||
glfwSetErrorCallback(glfw_error_callback);
|
glfwSetErrorCallback(glfw_error_callback);
|
||||||
|
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
window = glfwCreateWindow(1280, 720, "ImGui OpenGL example", NULL, NULL);
|
window = glfwCreateWindow(1280, 720, "ImGui OpenGL2 example", NULL, NULL);
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
glfwSetKeyCallback(window, glfw_key_callback);
|
glfwSetKeyCallback(window, glfw_key_callback);
|
||||||
glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);
|
glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user