mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Fixups for OSX
This commit is contained in:
parent
a402f5b9a9
commit
81f70e5b7c
@ -7,7 +7,11 @@
|
|||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "../imgui_impl_freeglut.h"
|
#include "../imgui_impl_freeglut.h"
|
||||||
#include "../imgui_impl_opengl2.h"
|
#include "../imgui_impl_opengl2.h"
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <GLUT/glut.h>
|
||||||
|
#else
|
||||||
#include <GL/freeglut.h>
|
#include <GL/freeglut.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning (disable: 4505) // unreferenced local function has been removed
|
#pragma warning (disable: 4505) // unreferenced local function has been removed
|
||||||
@ -87,7 +91,9 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
// Create GLUT window
|
// Create GLUT window
|
||||||
glutInit(&argc, argv);
|
glutInit(&argc, argv);
|
||||||
|
#ifndef __APPLE__
|
||||||
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
||||||
|
#endif
|
||||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
|
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
|
||||||
glutInitWindowSize(1280, 720);
|
glutInitWindowSize(1280, 720);
|
||||||
glutCreateWindow("Dear ImGui FreeGLUT+OpenGL2 Example");
|
glutCreateWindow("Dear ImGui FreeGLUT+OpenGL2 Example");
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_freeglut.h"
|
#include "imgui_impl_freeglut.h"
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <GLUT/glut.h>
|
||||||
|
#else
|
||||||
#include <GL/freeglut.h>
|
#include <GL/freeglut.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
|
#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
|
||||||
@ -68,7 +72,9 @@ void ImGui_ImplFreeGLUT_InstallFuncs()
|
|||||||
glutMotionFunc(ImGui_ImplFreeGLUT_MotionFunc);
|
glutMotionFunc(ImGui_ImplFreeGLUT_MotionFunc);
|
||||||
glutPassiveMotionFunc(ImGui_ImplFreeGLUT_MotionFunc);
|
glutPassiveMotionFunc(ImGui_ImplFreeGLUT_MotionFunc);
|
||||||
glutMouseFunc(ImGui_ImplFreeGLUT_MouseFunc);
|
glutMouseFunc(ImGui_ImplFreeGLUT_MouseFunc);
|
||||||
|
#ifndef __APPLE__
|
||||||
glutMouseWheelFunc(ImGui_ImplFreeGLUT_MouseWheelFunc);
|
glutMouseWheelFunc(ImGui_ImplFreeGLUT_MouseWheelFunc);
|
||||||
|
#endif
|
||||||
glutKeyboardFunc(ImGui_ImplFreeGLUT_KeyboardFunc);
|
glutKeyboardFunc(ImGui_ImplFreeGLUT_KeyboardFunc);
|
||||||
glutKeyboardUpFunc(ImGui_ImplFreeGLUT_KeyboardUpFunc);
|
glutKeyboardUpFunc(ImGui_ImplFreeGLUT_KeyboardUpFunc);
|
||||||
glutSpecialFunc(ImGui_ImplFreeGLUT_SpecialFunc);
|
glutSpecialFunc(ImGui_ImplFreeGLUT_SpecialFunc);
|
||||||
|
Loading…
Reference in New Issue
Block a user