mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Examples: Using fully qualified "Dear ImGui" name in window titles.
This commit is contained in:
parent
528b50a89f
commit
ff83d0e369
@ -16,7 +16,7 @@ int main(int, char**)
|
|||||||
al_init_primitives_addon();
|
al_init_primitives_addon();
|
||||||
al_set_new_display_flags(ALLEGRO_RESIZABLE);
|
al_set_new_display_flags(ALLEGRO_RESIZABLE);
|
||||||
ALLEGRO_DISPLAY* display = al_create_display(1280, 720);
|
ALLEGRO_DISPLAY* display = al_create_display(1280, 720);
|
||||||
al_set_window_title(display, "ImGui Allegro 5 example");
|
al_set_window_title(display, "Dear ImGui Allegro 5 example");
|
||||||
ALLEGRO_EVENT_QUEUE* queue = al_create_event_queue();
|
ALLEGRO_EVENT_QUEUE* queue = al_create_event_queue();
|
||||||
al_register_event_source(queue, al_get_display_event_source(display));
|
al_register_event_source(queue, al_get_display_event_source(display));
|
||||||
al_register_event_source(queue, al_get_keyboard_event_source());
|
al_register_event_source(queue, al_get_keyboard_event_source());
|
||||||
|
@ -178,7 +178,7 @@
|
|||||||
NSRect viewRect = NSMakeRect(100.0, 100.0, 100.0 + 1280.0, 100 + 720.0);
|
NSRect viewRect = NSMakeRect(100.0, 100.0, 100.0 + 1280.0, 100 + 720.0);
|
||||||
|
|
||||||
_window = [[NSWindow alloc] initWithContentRect:viewRect styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable|NSWindowStyleMaskClosable backing:NSBackingStoreBuffered defer:YES];
|
_window = [[NSWindow alloc] initWithContentRect:viewRect styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable|NSWindowStyleMaskClosable backing:NSBackingStoreBuffered defer:YES];
|
||||||
[_window setTitle:@"ImGui OSX+OpenGL2 Example"];
|
[_window setTitle:@"Dear ImGui OSX+OpenGL2 Example"];
|
||||||
[_window setOpaque:YES];
|
[_window setOpaque:YES];
|
||||||
[_window makeKeyAndOrderFront:NSApp];
|
[_window makeKeyAndOrderFront:NSApp];
|
||||||
|
|
||||||
@ -191,8 +191,8 @@
|
|||||||
NSMenu* appMenu;
|
NSMenu* appMenu;
|
||||||
NSMenuItem* menuItem;
|
NSMenuItem* menuItem;
|
||||||
|
|
||||||
appMenu = [[NSMenu alloc] initWithTitle:@"ImGui OSX+OpenGL2 Example"];
|
appMenu = [[NSMenu alloc] initWithTitle:@"Dear ImGui OSX+OpenGL2 Example"];
|
||||||
menuItem = [appMenu addItemWithTitle:@"Quit ImGui OSX+OpenGL2 Example" action:@selector(terminate:) keyEquivalent:@"q"];
|
menuItem = [appMenu addItemWithTitle:@"Quit Dear ImGui OSX+OpenGL2 Example" action:@selector(terminate:) keyEquivalent:@"q"];
|
||||||
[menuItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand];
|
[menuItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand];
|
||||||
|
|
||||||
menuItem = [[NSMenuItem alloc] init];
|
menuItem = [[NSMenuItem alloc] init];
|
||||||
|
@ -88,7 +88,7 @@ int main(int argc, char** argv)
|
|||||||
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
||||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
|
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
|
||||||
glutInitWindowSize(1280, 720);
|
glutInitWindowSize(1280, 720);
|
||||||
glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
|
glutCreateWindow("Dear ImGui FreeGLUT+OpenGL2 Example");
|
||||||
|
|
||||||
// Setup GLUT display function
|
// Setup GLUT display function
|
||||||
// We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
|
// We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
|
||||||
|
@ -23,7 +23,7 @@ int main(int, char**)
|
|||||||
glfwSetErrorCallback(glfw_error_callback);
|
glfwSetErrorCallback(glfw_error_callback);
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
return 1;
|
return 1;
|
||||||
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL2 example", NULL, NULL);
|
GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL2 example", NULL, NULL);
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
|
@ -45,7 +45,7 @@ int main(int, char**)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create window with graphics context
|
// Create window with graphics context
|
||||||
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL3 example", NULL, NULL);
|
GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL3 example", NULL, NULL);
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
|
@ -318,7 +318,7 @@ int main(int, char**)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||||
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui GLFW+Vulkan example", NULL, NULL);
|
GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+Vulkan example", NULL, NULL);
|
||||||
|
|
||||||
// Setup Vulkan
|
// Setup Vulkan
|
||||||
if (!glfwVulkanSupported())
|
if (!glfwVulkanSupported())
|
||||||
|
@ -30,7 +30,7 @@ int main(int, char**)
|
|||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||||
SDL_DisplayMode current;
|
SDL_DisplayMode current;
|
||||||
SDL_GetCurrentDisplayMode(0, ¤t);
|
SDL_GetCurrentDisplayMode(0, ¤t);
|
||||||
SDL_Window* window = SDL_CreateWindow("ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
|
SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
|
||||||
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
||||||
SDL_GL_SetSwapInterval(1); // Enable vsync
|
SDL_GL_SetSwapInterval(1); // Enable vsync
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ int main(int, char**)
|
|||||||
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
|
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
|
||||||
SDL_DisplayMode current;
|
SDL_DisplayMode current;
|
||||||
SDL_GetCurrentDisplayMode(0, ¤t);
|
SDL_GetCurrentDisplayMode(0, ¤t);
|
||||||
SDL_Window* window = SDL_CreateWindow("ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
|
SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
|
||||||
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
||||||
SDL_GL_SetSwapInterval(1); // Enable vsync
|
SDL_GL_SetSwapInterval(1); // Enable vsync
|
||||||
gl3wInit();
|
gl3wInit();
|
||||||
|
@ -307,7 +307,7 @@ int main(int, char**)
|
|||||||
// Setup window
|
// Setup window
|
||||||
SDL_DisplayMode current;
|
SDL_DisplayMode current;
|
||||||
SDL_GetCurrentDisplayMode(0, ¤t);
|
SDL_GetCurrentDisplayMode(0, ¤t);
|
||||||
SDL_Window* window = SDL_CreateWindow("ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_VULKAN|SDL_WINDOW_RESIZABLE);
|
SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_VULKAN|SDL_WINDOW_RESIZABLE);
|
||||||
|
|
||||||
// Setup Vulkan
|
// Setup Vulkan
|
||||||
uint32_t extensions_count = 0;
|
uint32_t extensions_count = 0;
|
||||||
|
@ -98,7 +98,7 @@ int main(int, char**)
|
|||||||
// Create application window
|
// Create application window
|
||||||
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("ImGui DirectX10 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX10 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
||||||
|
|
||||||
// Initialize Direct3D
|
// Initialize Direct3D
|
||||||
if (CreateDeviceD3D(hwnd) < 0)
|
if (CreateDeviceD3D(hwnd) < 0)
|
||||||
|
@ -101,7 +101,7 @@ int main(int, char**)
|
|||||||
// Create application window
|
// Create application window
|
||||||
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("ImGui DirectX11 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX11 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
||||||
|
|
||||||
// Initialize Direct3D
|
// Initialize Direct3D
|
||||||
if (CreateDeviceD3D(hwnd) < 0)
|
if (CreateDeviceD3D(hwnd) < 0)
|
||||||
|
@ -272,7 +272,7 @@ int main(int, char**)
|
|||||||
// Create application window
|
// Create application window
|
||||||
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("ImGui DirectX12 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX12 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
||||||
|
|
||||||
// Initialize Direct3D
|
// Initialize Direct3D
|
||||||
if (CreateDeviceD3D(hwnd) < 0)
|
if (CreateDeviceD3D(hwnd) < 0)
|
||||||
|
@ -49,7 +49,7 @@ int main(int, char**)
|
|||||||
// Create application window
|
// Create application window
|
||||||
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("ImGui DirectX9 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX9 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
|
||||||
|
|
||||||
// Initialize Direct3D
|
// Initialize Direct3D
|
||||||
LPDIRECT3D9 pD3D;
|
LPDIRECT3D9 pD3D;
|
||||||
|
Loading…
Reference in New Issue
Block a user