Merge branch 'master' into navigation

This commit is contained in:
omar
2018-01-29 17:42:39 +01:00
26 changed files with 89 additions and 74 deletions

2
examples/.gitignore vendored
View File

@ -1,4 +1,4 @@
## Visual Studio files
build/*
Debug/*
Release/*
ipch/*

View File

@ -12,7 +12,7 @@
#include <stdint.h> // uint64_t
#include <cstring> // memcpy
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_a5.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>

View File

@ -4,7 +4,7 @@
#include <stdint.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_a5.h"
int main(int, char**)

View File

@ -17,8 +17,8 @@
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw3.dylib */; };
1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
6D2FC55D1B2E632000C130BA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC55C1B2E632000C130BA /* AppDelegate.m */; };
@ -43,10 +43,10 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw.cpp; sourceTree = "<group>"; };
1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw.h; sourceTree = "<group>"; };
1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = "<group>"; };
1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = "<group>"; };
1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
1A1A0F4D1CB3C54D0090F036 /* libglfw3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw3.dylib; path = /usr/local/lib/libglfw3.dylib; sourceTree = "<absolute>"; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = "<absolute>"; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = "<group>"; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = "<group>"; };
6D2FC5541B2E632000C130BA /* imguiex-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -77,7 +77,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1A1A0F4E1CB3C54D0090F036 /* libglfw3.dylib in Frameworks */,
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -96,7 +96,7 @@
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
1A1A0F4D1CB3C54D0090F036 /* libglfw3.dylib */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
@ -117,8 +117,8 @@
1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
isa = PBXGroup;
children = (
1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw.cpp */,
1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw.h */,
1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
1A1A0F391CB3A1B20090F036 /* main.cpp */,
);
name = opengl2_example;
@ -307,7 +307,7 @@
1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw.cpp in Sources */,
1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -1,7 +1,7 @@
// ImGui - standalone example application for DirectX 10
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_dx10.h"
#include <d3d10_1.h>
#include <d3d10.h>

View File

@ -6,7 +6,7 @@
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_dx11.h"
// DirectX

View File

@ -1,7 +1,7 @@
// ImGui - standalone example application for DirectX 11
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_dx11.h"
#include <d3d11.h>
#define DIRECTINPUT_VERSION 0x0800

View File

@ -6,7 +6,7 @@
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_dx9.h"
// DirectX

View File

@ -1,7 +1,7 @@
// ImGui - standalone example application for DirectX 9
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_dx9.h"
#include <d3d9.h>
#define DIRECTINPUT_VERSION 0x0800

View File

@ -9,7 +9,7 @@
// Copyright (C) 2015 by Giovanni Zito
// This file is part of ImGui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_marmalade.h"
#include <s3eClipboard.h>

View File

@ -4,7 +4,7 @@
// Copyright (C) 2015 by Giovanni Zito
// This file is part of ImGui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_marmalade.h"
#include <stdio.h>

View File

@ -1,5 +1,5 @@
// ImGui - null/dummy example application (compile and link imgui with no inputs, no outputs)
#include <imgui.h>
#include "imgui.h"
#include <stdio.h>
int main(int, char**)

View File

@ -2,13 +2,17 @@
# Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
#
#
# if you using Mac OS X:
# You'll need glfw
# http://www.glfw.org
# You will need GLFW (http://www.glfw.org):
# Linux:
# apt-get install libglfw-dev
# Mac OS X:
# brew install glfw
# MSYS2:
# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
#
#CXX = g++
#CXX = clang++
EXE = opengl2_example
OBJS = main.o imgui_impl_glfw_gl2.o
@ -46,6 +50,7 @@ ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
CFLAGS = $(CXXFLAGS)
endif
.cpp.o:
$(CXX) $(CXXFLAGS) -c -o $@ $<

View File

@ -15,7 +15,7 @@
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_glfw_gl2.h"
// GLFW

View File

@ -6,7 +6,7 @@
// **Prefer using the code in the opengl3_example/ folder**
// See imgui_impl_glfw.cpp for details.
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_glfw_gl2.h"
#include <stdio.h>
#include <GLFW/glfw3.h>

View File

@ -2,15 +2,17 @@
# Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
#
#
# You will need GLFW (http://www.glfw.org)
#
# apt-get install libglfw-dev # Linux
# brew install glfw # Mac OS X
# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw # MSYS2
# You will need GLFW (http://www.glfw.org):
# Linux:
# apt-get install libglfw-dev
# Mac OS X:
# brew install glfw
# MSYS2:
# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
#
#CXX = g++
#CXX = clang++
EXE = opengl3_example
OBJS = main.o imgui_impl_glfw_gl3.o

View File

@ -8,7 +8,7 @@
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_glfw_gl3.h"
// GL3W/GLFW

View File

@ -3,7 +3,7 @@
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_glfw_gl3.h"
#include <stdio.h>
#include <GL/gl3w.h> // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.

View File

@ -18,7 +18,7 @@
#include <SDL.h>
#include <SDL_syswm.h>
#include <SDL_opengl.h>
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_sdl_gl2.h"
// Data

View File

@ -6,7 +6,7 @@
// **Prefer using the code in the sdl_opengl3_example/ folder**
// See imgui_impl_sdl.cpp for details.
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_sdl_gl2.h"
#include <stdio.h>
#include <SDL.h>

View File

@ -2,15 +2,17 @@
# Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
#
#
# You will need SDL2 (http://www.libsdl.org)
#
# apt-get install libsdl2-dev # Linux
# brew install sdl2 # Mac OS X
# pacman -S mingw-w64-i686-SDL # MSYS2
# You will need SDL2 (http://www.libsdl.org):
# Linux:
# apt-get install libsdl2-dev
# Mac OS X:
# brew install sdl2
# MSYS2:
# pacman -S mingw-w64-i686-SDL
#
#CXX = g++
#CXX = clang++
EXE = sdl_opengl3_example
OBJS = main.o imgui_impl_sdl_gl3.o

View File

@ -3,7 +3,7 @@
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_sdl_gl3.h"
#include <stdio.h>
#include <GL/gl3w.h> // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.

View File

@ -6,7 +6,8 @@
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_glfw_vulkan.h"
// GLFW
#define GLFW_INCLUDE_NONE
@ -19,8 +20,6 @@
#include <GLFW/glfw3native.h>
#endif
#include "imgui_impl_glfw_vulkan.h"
// GLFW Data
static GLFWwindow* g_Window = NULL;
static double g_Time = 0.0f;
@ -36,7 +35,7 @@ static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
static void (*g_CheckVkResult)(VkResult err) = NULL;
static VkCommandBuffer g_CommandBuffer = VK_NULL_HANDLE;
static size_t g_BufferMemoryAlignment = 256;
static VkDeviceSize g_BufferMemoryAlignment = 256;
static VkPipelineCreateFlags g_PipelineCreateFlags = 0;
static int g_FrameIndex = 0;
@ -52,8 +51,8 @@ static VkImageView g_FontView = VK_NULL_HANDLE;
static VkDeviceMemory g_VertexBufferMemory[IMGUI_VK_QUEUED_FRAMES] = {};
static VkDeviceMemory g_IndexBufferMemory[IMGUI_VK_QUEUED_FRAMES] = {};
static size_t g_VertexBufferSize[IMGUI_VK_QUEUED_FRAMES] = {};
static size_t g_IndexBufferSize[IMGUI_VK_QUEUED_FRAMES] = {};
static VkDeviceSize g_VertexBufferSize[IMGUI_VK_QUEUED_FRAMES] = {};
static VkDeviceSize g_IndexBufferSize[IMGUI_VK_QUEUED_FRAMES] = {};
static VkBuffer g_VertexBuffer[IMGUI_VK_QUEUED_FRAMES] = {};
static VkBuffer g_IndexBuffer[IMGUI_VK_QUEUED_FRAMES] = {};
@ -164,7 +163,7 @@ void ImGui_ImplGlfwVulkan_RenderDrawLists(ImDrawData* draw_data)
vkDestroyBuffer(g_Device, g_VertexBuffer[g_FrameIndex], g_Allocator);
if (g_VertexBufferMemory[g_FrameIndex])
vkFreeMemory(g_Device, g_VertexBufferMemory[g_FrameIndex], g_Allocator);
size_t vertex_buffer_size = ((vertex_size-1) / g_BufferMemoryAlignment+1) * g_BufferMemoryAlignment;
VkDeviceSize vertex_buffer_size = ((vertex_size-1) / g_BufferMemoryAlignment+1) * g_BufferMemoryAlignment;
VkBufferCreateInfo buffer_info = {};
buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
buffer_info.size = vertex_buffer_size;
@ -194,7 +193,7 @@ void ImGui_ImplGlfwVulkan_RenderDrawLists(ImDrawData* draw_data)
vkDestroyBuffer(g_Device, g_IndexBuffer[g_FrameIndex], g_Allocator);
if (g_IndexBufferMemory[g_FrameIndex])
vkFreeMemory(g_Device, g_IndexBufferMemory[g_FrameIndex], g_Allocator);
size_t index_buffer_size = ((index_size-1) / g_BufferMemoryAlignment+1) * g_BufferMemoryAlignment;
VkDeviceSize index_buffer_size = ((index_size-1) / g_BufferMemoryAlignment+1) * g_BufferMemoryAlignment;
VkBufferCreateInfo buffer_info = {};
buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
buffer_info.size = index_buffer_size;

View File

@ -1,7 +1,8 @@
// ImGui - standalone example application for Glfw + Vulkan, using programmable pipeline
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
#include <imgui.h>
#include "imgui.h"
#include "imgui_impl_glfw_vulkan.h"
#include <stdio.h> // printf, fprintf
#include <stdlib.h> // abort
@ -9,8 +10,6 @@
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include "imgui_impl_glfw_vulkan.h"
#define IMGUI_MAX_POSSIBLE_BACK_BUFFERS 16
#define IMGUI_UNLIMITED_FRAME_RATE
//#ifdef _DEBUG