Commit 7172b7d9 authored by w4t's avatar w4t

ofxImGui_wt 1.74

parents
Pipeline #53 canceled with stages
*.xcodeproj
example*/bin/data
example*/bin/libs/
example*/bin/*
!example*/bin/data/.gitkeep
!example*/bin/data/*.png
#########################
# openFrameworks patterns
#########################
# build files
openFrameworks.a
openFrameworksDebug.a
openFrameworksUniversal.a
libs/openFrameworksCompiled/lib/*/*
!libs/openFrameworksCompiled/lib/*/.gitkeep
# apothecary
scripts/apothecary/build
# rule to avoid non-official addons going into git
# see addons/.gitignore
addons/*
# rule to avoid non-official apps going into git
# see apps/.gitignore
apps/*
# also, see examples/.gitignore
#########################
# general
#########################
[Bb]uild/
[Oo]bj/
*.o
[Dd]ebug*/
[Rr]elease*/
*.mode*
*.app/
*.pyc
.svn/
*.log
*.cpp.eep
*.cpp.elf
*.cpp.hex
#########################
# IDE
#########################
# XCode
*.pbxuser
*.perspective
*.perspectivev3
*.mode1v3
*.mode2v3
# XCode 4
xcuserdata
*.xcworkspace
# Code::Blocks
*.depend
*.layout
# Visual Studio
*.sdf
*.opensdf
*.suo
*.pdb
*.ilk
*.aps
ipch/
*.db
*.opendb
# Eclipse
.metadata
local.properties
.externalToolBuilders
#########################
# operating system
#########################
# Linux
*~
# KDE
.directory
.AppleDouble
# OSX
.DS_Store
*.swp
*~.nib
# Thumbnails
._*
# Windows
# Windows image file caches
Thumbs.db
# Folder config file
Desktop.ini
# Android
.csettings
/libs/openFrameworksCompiled/project/android/paths.make
#########################
# miscellaneous
#########################
.mailmap
# ofxImGui
ofxAddon that allows you to use [ImGui](https://github.com/ocornut/imgui) in [openFrameworks](https://github.com/openframeworks/openFrameworks).
### Compatibility
Master branch may not be tested on all platforms. See [Releases](https://github.com/jvcleave/ofxImGui/releases/) for more extensively tested versions.
Release versions tested with OF 0.9.x on
- Raspberry Pi 1 and 2
- Mac OS 10.11, Xcode 7
- iOS 9.2 and 8.1.2, Xcode 7
- Linux Desktop
- Windows 10, Visual Studio 2015
#### Upgrade Notes
Versions 1.50 and higher use the keyword `ofxImGui` as a namespace for all classes in the addon, while previous versions just had a class called `ofxImGui`. If you're upgrading from a previous version, make sure to replace all instances of class `ofxImGui` with `ofxImGui::Gui`.
### Examples
![Screenshot](images/Screenshot.png)
#### example-demo
Works on Desktop, uses imgui demo windows.
#### example-helpers
Works on Desktop, uses ofxImGui helper functions for interfacing with `ofParameter`.
#### example-ios
iOS specific with keyboard input helper.
#### example-addons
https://github.com/Flix01/imgui 6c0218c79e081e1ef51c60eff239ef432055e4f4 fork to openframework
TO-DO LIST
----------
imguidock segfault
imageditor segfault
imguicodeeditor not implemented
imguistring not implemented
imguipanelmanager not implemented
textarea copy paste not work
Image with zoom (CTRL+MW) not work
soloud keyboard not work
# All variables and this file are optional, if they are not present the PG and the
# makefiles will try to parse the correct values from the file system.
#
# Variables that specify exclusions can use % as a wildcard to specify that anything in
# that position will match. A partial path can also be specified to, for example, exclude
# a whole folder from the parsed paths from the file system
#
# Variables can be specified using = or +=
# = will clear the contents of that variable both specified from the file or the ones parsed
# from the file system
# += will add the values to the previous ones in the file or the ones parsed from the file
# system
#
# The PG can be used to detect errors in this file, just create a new project with this addon
# and the PG will write to the console the kind of error and in which line it is
meta:
ADDON_NAME = ofxImGui
ADDON_DESCRIPTION = use ImGui inside openFrameworks
ADDON_AUTHOR = Jason Van Cleave, Constantine Tarasenkov, Zoltan Farkas-Griecs
ADDON_TAGS = "gui"
ADDON_URL = https://github.com/jvcleave/ofxImGui
common:
# dependencies with other addons, a list of them separated by spaces
# or use += in several lines
# ADDON_DEPENDENCIES =
# include search paths, this will be usually parsed from the file system
# but if the addon or addon libraries need special search paths they can be
# specified here separated by spaces or one per line using +=
# ADDON_INCLUDES =
#ADDON_INCLUDES = libs/gl3w/GL
#ADDON_INCLUDES = libs/glfw/include/GLFW
ADDON_INCLUDES = libs/lz4
ADDON_INCLUDES += libs/webby
ADDON_INCLUDES += libs/imgui/src
ADDON_INCLUDES += src
#ADDON_INCLUDES += libs/usynergy
# any special flag that should be passed to the compiler when using this
# addon
# ADDON_CFLAGS = -DYES_IMGUISOLOUD_ALL #-DYES_IMGUISOLOUD_MODPLUG #-DYES_IMGUISOLOUD_SPEECH # Testing only (with use_sdl2)! To remove
# addons example 3
# ADDON_CFLAGS = -DIMGUI_INCLUDE_IMGUI_USER_H -DIMGUI_INCLUDE_IMGUI_USER_INL -DNO_IMGUISTYLESERIALIZER -DNO_IMGUIDATECHOOSER -DNO_IMGUILISTVIEW -DNO_IMGUIGRAPHEDITOR -DNO_IMGUITOOLBAR -DNO_IMGUIPANELMANAGER
#ADDON_CFLAGS = -Ilibs/gl3w `pkg-config --cflags glfw3`
#ADDON_CFLAGS = `pkg-config --cflags liblz4`
# ADDON_CFLAGS = -lGL -lglfw3 -lrt -lm -ldl -lX11 -lpthread -lxcb -lXau -lXdmcp
# any special flag that should be passed to the linker when using this
# addon, also used for system libraries with -lname
ADDON_LDFLAGS = -lsqlite3 -lpoppler-glib
#-L/usr/local/lib -lGL -lglfw3 -lrt -lm -ldl -lX11 -lpthread -lxcb -lXau -lXdmcp
#-lgl3w
#-lGL `pkg-config --static --libs glfw3`
# linux only, any library that should be included in the project using
# pkg-config
# ADDON_PKG_CONFIG_LIBRARIES =
# osx/iOS only, any framework that should be included in the project
# ADDON_FRAMEWORKS =
# source files, these will be usually parsed from the file system looking
# in the src folders in libs and the root of the addon. if your addon needs
# to include files in different places or a different set of files per platform
# they can be specified here
#ADDON_SOURCES = libs/gl3w/GL/gl3w.c
# some addons need resources to be copied to the bin/data folder of the project
# specify here any files that need to be copied, you can use wildcards like * and ?
# ADDON_DATA =
# when parsing the file system looking for libraries exclude this for all or
# a specific platform
# ADDON_LIBS_EXCLUDE =
linux64:
linux:
linuxarmv6l:
#TODO needs EngineGLFW.cpp exclude
linuxarmv7l:
#TODO needs EngineGLFW.cpp exclude
msys2:
android/armeabi:
android/armeabi-v7a:
ios:
# osx/iOS only, any framework that should be included in the project
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif
# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=../../..
endif
# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
ofxImGui
ofxXmlSettings
\ No newline at end of file
################################################################################
# CONFIGURE PROJECT MAKEFILE (optional)
# This file is where we make project specific configurations.
################################################################################
################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
################################################################################
# OF_ROOT = ../../..
################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
# (default) PROJECT_ROOT = . (this directory)
#
################################################################################
# PROJECT_ROOT = .
################################################################################
# PROJECT SPECIFIC CHECKS
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# this makefile. For instance, if you want to make changes based on whether
# GTK is installed, one might test that here and create a variable to check.
################################################################################
# None
################################################################################
# PROJECT EXTERNAL SOURCE PATHS
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
# Like source folders in the PROJECT_ROOT, these paths are subject to
# exlclusion via the PROJECT_EXLCUSIONS list.
#
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXTERNAL_SOURCE_PATHS =
################################################################################
# PROJECT EXCLUSIONS
# These makefiles assume that all folders in your current project directory
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
# to look for source code. The any folders or files that match any of the
# items in the PROJECT_EXCLUSIONS list below will be ignored.
#
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# (default) PROJECT_EXCLUSIONS = (blank)
#
# Will automatically exclude the following:
#
# $(PROJECT_ROOT)/bin%
# $(PROJECT_ROOT)/obj%
# $(PROJECT_ROOT)/%.xcodeproj
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXCLUSIONS =
################################################################################
# PROJECT LINKER FLAGS
# These flags will be sent to the linker when compiling the executable.
#
# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# Currently, shared libraries that are needed are copied to the
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
# add a runtime path to search for those shared libraries, since they aren't
# incorporated directly into the final executable application binary.
# TODO: should this be a default setting?
# PROJECT_LDFLAGS=-Wl,-rpath=./libs
################################################################################
# PROJECT DEFINES
# Create a space-delimited list of DEFINES. The list will be converted into
# CFLAGS with the "-D" flag later in the makefile.
#
# (default) PROJECT_DEFINES = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_DEFINES =
################################################################################
# PROJECT CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# defined in your platform specific core configuration files. These flags are
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
#
# (default) PROJECT_CFLAGS = (blank)
#
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# further flags here may not be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CFLAGS =
################################################################################
# PROJECT OPTIMIZATION CFLAGS
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These flags are added BEFORE the PROJECT_CFLAGS.
#
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
#
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
#
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
################################################################################
# PROJECT COMPILERS
# Custom compilers can be set for CC and CXX
# (default) PROJECT_CXX = (blank)
# (default) PROJECT_CC = (blank)
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CXX =
# PROJECT_CC =
// Icon Resource Definition
#define MAIN_ICON 102
#if defined(_DEBUG)
MAIN_ICON ICON "icon_debug.ico"
#else
MAIN_ICON ICON "icon.ico"
#endif
#include "ofMain.h"
#include "ofApp.h"
//#if (OF_VERSION_MINOR != 9) && defined(TARGET_OPENGLES)
//#include "ofGLProgrammableRenderer.h"
//#endif
//#define FORCE_PROGRAMMMABLE 1
//#define FORCE_APPGLFW 1
#define FORCE_APPGLUT 1
#ifdef FORCE_PROGRAMMMABLE
#include "ofGLProgrammableRenderer.h"
#endif
#ifdef FORCE_APPGLFW
#include "ofAppGLFWWindow.h"
#endif
#ifdef FORCE_APPGLUT
#include "ofAppGlutWindow.h"
#endif
int main()
{
ofSetLogLevel(OF_LOG_VERBOSE);
#if defined(TARGET_OPENGLES)
#if (OF_VERSION_MINOR == 9)
ofGLESWindowSettings settings;
settings.currentW = 1280;
settings.currentH = 720;
settings.setGLESVersion(2);
ofCreateWindow(settings);
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
ofSetupOpenGL(1280, 720, OF_WINDOW);
#endif
#elif FORCE_PROGRAMMMABLE
ofGLWindowSettings glWindowSettings;
glWindowSettings.setSize(1280, 720);
glWindowSettings.setGLVersion(3, 2);
ofCreateWindow(glWindowSettings);
#elif FORCE_APPGLFW
#define USE_GLFW_CLIPBOARD
ofGLFWWindowSettings settings;
// #ifdef NANOVG_GL2_IMPLEMENTATION
// settings.setGLVersion(2, 1); // Fixed pipeline
// #endif
// #ifdef NANOVG_GL3_IMPLEMENTATION
settings.setGLVersion(3, 2); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
// #endif
settings.stencilBits = 0;
settings.setSize(1280, 720);
settings.currentW = 1280;
settings.currentH = 720;
ofCreateWindow(settings);
#elif FORCE_APPGLUT
ofAppGlutWindow window;
ofSetupOpenGL(&window,1280,720,OF_WINDOW);
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetupOpenGL(1280, 720, OF_WINDOW);
#endif
ofRunApp( new ofApp());
}
#ifndef MY_DEFINES_H
#define MY_DEFINES_H
//#define YES_IMGUIADDONS_ALL
#define YES_IMGUIMINIGAMES
//#define NO_IMGUIMINIGAMES_MINE
//#define NO_IMGUIMINIGAMES_SUDOKU
//#define NO_IMGUIMINIGAMES_FIFTEEN
#define YES_IMGUISQLITE3
//#define NO_IMGUISQLITE3
//#define YES_IMGUIADDONS_ALL
//#define NO_IMGUIPDFVIEWER
#define YES_IMGUISOLOUD_ALL
#define YES_IMGUISOLOUD_MODPLUG
#define NO_IMGUICODEEDITOR // not work removed
#define NO_IMGUIIMAGEEDITOR
//#define NO_IMGUIIMAGEEDITOR // not work
//#define NO_IMGUIDOCK // not work
#define YES_IMGUIDOCK // not work
//#define NO_IMGUIDATECHOOSER
//#define NO_IMGUITOOLBAR
//#define NO_IMGUISTYLESERIALIZER
//#define YES_IMGUISTRINGIFIER
#define YES_IMGUISDF
//#define NO_IMGUISDF
#endif // MY_DEFINES_H
This source diff could not be displayed because it is too large. You can view the blob instead.
#pragma once
#include "ofMain.h"
#include "ofxImGui.h"
#include "ThemeTest.h"
#include "mydefines.h"
#include "imgui_user.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y);
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void mouseScrolled(float x, float y);
void ShowExampleAppMainMenuBar();
ofxImGui::Gui gui;
ImVec4 backgroundColor;
ImVec2 gMainMenuBarSize;
ofTexture textureSource;
GLuint myImageTextureId2;
#ifndef NO_IMGUIVARIOUSCONTROLS
static bool MyTreeViewNodeDrawIconCallback(ImGui::TreeViewNode* n, ImGui::TreeView& /*tv*/, void* /*userPtr*/);
static void MyTreeViewNodeCreationDelationCallback(ImGui::TreeViewNode* n, ImGui::TreeView&,bool delation,void* );
#endif //NO_IMGUIVARIOUSCONTROLS
#ifndef NO_IMGUILISTVIEW
inline void MyTestListView();
#endif //NO_IMGUILISTVIEW
#ifdef YES_IMGUISQLITE3
static void PerformCppSQLiteTest(ImGuiTextBuffer &rv, int nRowsToCreate=50000);
#endif //YES_IMGUISQLITE3
};
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif
# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=../../..
endif
# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
ofxImGui
ofxXmlSettings
\ No newline at end of file
################################################################################
# CONFIGURE PROJECT MAKEFILE (optional)
# This file is where we make project specific configurations.
################################################################################
################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
################################################################################
# OF_ROOT = ../../..
################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
# (default) PROJECT_ROOT = . (this directory)
#
################################################################################
# PROJECT_ROOT = .
################################################################################
# PROJECT SPECIFIC CHECKS
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# this makefile. For instance, if you want to make changes based on whether
# GTK is installed, one might test that here and create a variable to check.
################################################################################
# None
################################################################################
# PROJECT EXTERNAL SOURCE PATHS
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
# Like source folders in the PROJECT_ROOT, these paths are subject to
# exlclusion via the PROJECT_EXLCUSIONS list.
#
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXTERNAL_SOURCE_PATHS =
################################################################################
# PROJECT EXCLUSIONS
# These makefiles assume that all folders in your current project directory
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
# to look for source code. The any folders or files that match any of the
# items in the PROJECT_EXCLUSIONS list below will be ignored.
#
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# (default) PROJECT_EXCLUSIONS = (blank)
#
# Will automatically exclude the following:
#
# $(PROJECT_ROOT)/bin%
# $(PROJECT_ROOT)/obj%
# $(PROJECT_ROOT)/%.xcodeproj
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXCLUSIONS =
################################################################################
# PROJECT LINKER FLAGS
# These flags will be sent to the linker when compiling the executable.
#
# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# Currently, shared libraries that are needed are copied to the
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
# add a runtime path to search for those shared libraries, since they aren't
# incorporated directly into the final executable application binary.
# TODO: should this be a default setting?
# PROJECT_LDFLAGS=-Wl,-rpath=./libs
################################################################################
# PROJECT DEFINES
# Create a space-delimited list of DEFINES. The list will be converted into
# CFLAGS with the "-D" flag later in the makefile.
#
# (default) PROJECT_DEFINES = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_DEFINES =
################################################################################
# PROJECT CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# defined in your platform specific core configuration files. These flags are
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
#
# (default) PROJECT_CFLAGS = (blank)
#
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# further flags here may not be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
PROJECT_CFLAGS = -lGL -lglfw3 -lrt -lm -ldl -lX11 -lpthread -lxcb -lXau -lXdmcp
################################################################################
# PROJECT OPTIMIZATION CFLAGS
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These flags are added BEFORE the PROJECT_CFLAGS.
#
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
#
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
#
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
################################################################################
# PROJECT COMPILERS
# Custom compilers can be set for CC and CXX
# (default) PROJECT_CXX = (blank)
# (default) PROJECT_CC = (blank)
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CXX =
# PROJECT_CC =
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-demo", "example-demo.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="src\ofApp.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\ofApp.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\BaseEngine.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\BaseTheme.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineGLFW.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineOpenGLES.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineVk.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\Gui.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\ImGuiHelpers.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\ofxImGuiLoggerChannel.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_demo.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_draw.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>
</Filter>
<Filter Include="addons">
<UniqueIdentifier>{71834F65-F3A9-211E-73B8-DC85}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui">
<UniqueIdentifier>{0CD6A942-69FF-3BAA-3AF1-ADD1}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\src">
<UniqueIdentifier>{18028A43-13D3-1DD5-471A-BE87}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs">
<UniqueIdentifier>{BE2F957E-7DA7-055C-DC70-3070}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs\imgui">
<UniqueIdentifier>{296AD70B-2F2E-1462-9E7C-6030}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs\imgui\src">
<UniqueIdentifier>{5962BF19-1468-EB82-01C0-2E72}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\ofApp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="src\ofApp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\BaseEngine.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\BaseTheme.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineGLFW.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineOpenGLES.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineVk.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\Gui.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\imconfig.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ImGuiHelpers.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ofxImGui.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ofxImGuiLoggerChannel.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ThemeTest.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_internal.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_rect_pack.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_textedit.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_truetype.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\src\ImGuiExtension.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="icon.rc" />
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
// Icon Resource Definition
#define MAIN_ICON 102
#if defined(_DEBUG)
MAIN_ICON ICON "icon_debug.ico"
#else
MAIN_ICON ICON "icon.ico"
#endif
This diff is collapsed.
// ImGui GLFW binding with OpenGL (legacy, fixed pipeline)
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the opengl3_example/ folder**
// See imgui_impl_glfw.cpp for details.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
struct GLFWwindow;
IMGUI_API bool ImGui_ImplGlfwGL2_Init(GLFWwindow* window, bool install_callbacks);
IMGUI_API void ImGui_ImplGlfwGL2_Shutdown();
IMGUI_API void ImGui_ImplGlfwGL2_NewFrame();
IMGUI_API void ImGui_ImplGlfwGL2_RenderDrawData(ImDrawData* draw_data);
// Use if you want to reset your rendering device without losing ImGui state.
IMGUI_API void ImGui_ImplGlfwGL2_InvalidateDeviceObjects();
IMGUI_API bool ImGui_ImplGlfwGL2_CreateDeviceObjects();
// GLFW callbacks (registered by default to GLFW if you enable 'install_callbacks' during initialization)
// Provided here if you want to chain callbacks yourself. You may also handle inputs yourself and use those as a reference.
IMGUI_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
IMGUI_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
IMGUI_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
IMGUI_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
#include "ofMain.h"
#include "ofApp.h"
#if (OF_VERSION_MINOR != 9) && defined(TARGET_OPENGLES)
#include "ofGLProgrammableRenderer.h"
#endif
//#define FORCE_PROGRAMMMABLE 1
//#define FORCE_APPGLFW 1
//#define FORCE_APPGLUT 1
#define FORCE_NOAPP 1
#ifdef FORCE_PROGRAMMMABLE
#include "ofGLProgrammableRenderer.h"
#endif
#ifdef FORCE_APPGLFW
#include "ofAppGLFWWindow.h"
#endif
#ifdef FORCE_APPGLUT
#include "ofAppGlutWindow.h"
#endif
#ifdef FORCE_NOAPP
#include "ofAppNoWindow.h"
#endif
int main()
{
ofSetLogLevel(OF_LOG_VERBOSE);
#if defined(TARGET_OPENGLES)
#if (OF_VERSION_MINOR == 9)
ofGLESWindowSettings settings;
settings.setSize(1280, 720);
settings.setGLESVersion(2);
ofCreateWindow(settings);
ofRunApp( new ofApp());
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp( new ofApp());
#endif
#elif FORCE_PROGRAMMMABLE
ofGLWindowSettings glWindowSettings;
glWindowSettings.setSize(1280, 720);
glWindowSettings.setGLVersion(3, 2);
//glWindowSettings.setGLVersion(2, 1);
ofGLSLVersionFromGL(1,50);
//glWindowSettings.setGLVersion(2, 1);
ofCreateWindow(glWindowSettings);
ofRunApp( new ofApp());
#elif FORCE_APPGLFW
#define USE_GLFW_CLIPBOARD
ofGLFWWindowSettings settings;
// #ifdef NANOVG_GL2_IMPLEMENTATION
// settings.setGLVersion(2, 1); // Fixed pipeline
// #endif
// #ifdef NANOVG_GL3_IMPLEMENTATION
settings.setGLVersion(3, 2); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
//settings.setGLVersion(2, 1); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
// #endif
//settings.stencilBits = 0;
settings.setSize(1280, 720);
//settings.setPosition(ofVec2f(300,0));
//settings.resizable = true;
//shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
//mainWindow->setVerticalSync(false);
ofGLSLVersionFromGL(1,50);
ofCreateWindow(settings);
ofRunApp( new ofApp());
#elif FORCE_APPGLUT
ofAppGlutWindow window;
ofSetupOpenGL(&window,1280,720,OF_WINDOW);
ofRunApp( new ofApp());
#elif FORCE_NOAPP
auto window = make_shared<ofAppNoWindow>();
auto app = make_shared<ofApp>();
ofRunApp(window, app);
ofRunMainLoop();
//ofGLFWWindowSettings settings;
//settings.visible = false;
//ofCreateWindow(settings);
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
//ofAppNoWindow window;
//ofSetupOpenGL(&window, 1024, 768, OF_WINDOW);
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp( new ofApp());
#endif
}
#ifndef MY_DEFINES_H
#define MY_DEFINES_H
//#define NO_IMGUIADDONS
//#define YES_IMGUIADDONS_ALL
#define YES_IMGUIMINIGAMES
//#define NO_IMGUIMINIGAMES_MINE
//#define NO_IMGUIMINIGAMES_SUDOKU
//#define NO_IMGUIMINIGAMES_FIFTEEN
#define YES_IMGUISQLITE3
//#define NO_IMGUISQLITE3
//#define YES_IMGUIADDONS_ALL
//#define NO_IMGUIPDFVIEWER
#define YES_IMGUISOLOUD_ALL
#define YES_IMGUISOLOUD_MODPLUG
#define NO_IMGUICODEEDITOR // not work removed
#define NO_IMGUIIMAGEEDITOR // not work
//#define NO_IMGUIDOCK // not work
//#define NO_IMGUIDATECHOOSER
//#define NO_IMGUITOOLBAR
//#define NO_IMGUISTYLESERIALIZER
//#define YES_IMGUISTRINGIFIER
#endif // MY_DEFINES_H
\ No newline at end of file
#include "ofApp.h"
#include "imgui_impl_glfw_gl2.h"
//#include "imgui_impl_glfw_gl3.h"
//#include <stdio.h>
#include <GLFW/glfw3.h>
static void glfw_error_callback(int error, const char* description)
{
fprintf(stderr, "Error %d: %s\n", error, description);
//ofLogVerbose() << "Error %d: %s\n", error, description;
}
// Is called whenever a key is pressed/released via GLFW
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode)
{
std::cout << key << std::endl;
if(key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
glfwSetWindowShouldClose(window, GL_TRUE);
}
//--------------------------------------------------------------
void ofApp::setup()
{
ofSetLogLevel(OF_LOG_VERBOSE);
// Setup window
glfwSetErrorCallback(glfw_error_callback);
glfwInit();
//glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
//glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
//glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#if __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL2 example", NULL, NULL);
if (!window)
{
fprintf(stderr, "Failed to open GLFW window.\n");
glfwTerminate();
ofExit();
}
glfwMakeContextCurrent(window);
//glfwSwapInterval(1); // Enable vsync
//gl3wInit();
// Setup Dear ImGui binding
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
ImGui_ImplGlfwGL2_Init(window, true);
////ImGui_ImplGlfwGL3_Init(window, true);
//required call
//gui.setup();
// Setup style
ImGui::StyleColorsDark();
//ImGui::StyleColorsClassic();
ImGui::GetIO().MouseDrawCursor = false;
//backgroundColor is stored as an ImVec4 type but can handle ofColor
backgroundColor = ofColor(114, 144, 154);
show_test_window = true;
show_another_window = false;
floatValue = 0.0f;
//load your own ofImage
imageButtonSource.load("of.png");
//imageButtonID = loadImage(imageButtonSource);
//imageButtonID.load("of.png");
//or have the loading done for you if you don't need the ofImage reference
//imageButtonID = gui.loadImage("of.png");
//imageButtonID.load("of.png");
//can also use ofPixels in same manner
//ofLoadImage(pixelsButtonSource, "of_upside_down.png");
////pixelsButtonID = gui.loadPixels(pixelsButtonSource);
//and alt method
//pixelsButtonID = gui.loadPixels("of_upside_down.png");
//pixelsButtonID.load("of_upside_down.png");
//pass in your own texture reference if you want to keep it
////textureSourceID = gui.loadTexture(textureSource, "of_upside_down.png");
//or just pass a path
//textureSourceID = gui.loadTexture("of_upside_down.png");
//textureSourceID.load("of_upside_down.png");
ofLogVerbose() << "textureSourceID: " << textureSourceID;
cout << "Vendor :" << glGetString(GL_VENDOR) << endl;
cout << "GPU : "<< glGetString(GL_RENDERER) << endl;
cout << "OpenGL ver. " << glGetString(GL_VERSION) << endl;
cout << "GLSL ver. " << glGetString(GL_SHADING_LANGUAGE_VERSION) << endl;
}
//--------------------------------------------------------------
void ofApp::update() {
// Set the required callback functions
glfwSetKeyCallback(window, key_callback);
if(glfwWindowShouldClose(window)){
ofExit();
}
}
bool doThemeColorsWindow = false;
//--------------------------------------------------------------
void ofApp::draw() {
//backgroundColor is stored as an ImVec4 type but is converted to ofColor automatically
//ofSetBackgroundColor(backgroundColor);
//required to call this at beginning
//gui.begin();
//if (!glfwWindowShouldClose(window)) {
glfwPollEvents();
ImGui_ImplGlfwGL2_NewFrame();
//ImGui_ImplGlfwGL3_NewFrame();
//In between gui.begin() and gui.end() you can use ImGui as you would anywhere else
// 1. Show a simple window
{
ImGui::Text("Hello, world!");
ImGui::SliderFloat("Float", &floatValue, 0.0f, 1.0f);
//this will change the app background color
ImGui::ColorEdit3("Background Color", (float*)&backgroundColor);
if(ImGui::Button("Demo Window"))
{
show_test_window = !show_test_window;
}
if (ImGui::Button("Another Window"))
{
//bitwise OR
show_another_window ^= 1;
}
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
// 2. Show another window, this time using an explicit ImGui::Begin and ImGui::End
if (show_another_window) {
//note: ofVec2f and ImVec2f are interchangeable
ImGui::SetNextWindowSize(ofVec2f(200,100), ImGuiCond_FirstUseEver);
ImGui::Begin("Another Window", &show_another_window);
ImGui::Text("Hello");
ImGui::End();
}
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowDemoWindow()
if (show_test_window) {
ImGui::SetNextWindowPos(ofVec2f(650, 20), ImGuiCond_FirstUseEver);
ImGui::ShowDemoWindow(&show_test_window);
}
ImGui::ShowTabsDemo("Tabs Demo");
//bool pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)imageButtonID, ImVec2(200, 200));
// pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)pixelsButtonID, ImVec2(200, 200));
// pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)textureSourceID, ImVec2(200, 200));
if(doThemeColorsWindow) {
//gui.openThemeColorWindow();
}
//required to call this at end
//gui.end();
// Rendering
int display_w, display_h;
glfwGetFramebufferSize(window, &display_w, &display_h);
glViewport(0, 0, display_w, display_h);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
//glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
ImGui::Render();
ImGui_ImplGlfwGL2_RenderDrawData(ImGui::GetDrawData());
//ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
glfwSwapBuffers(window);
if(textureSource.isAllocated()) {
//textureSource.draw(ofRandom(200), ofRandom(200));
}
// }
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key) {
ofLogVerbose(__FUNCTION__) << key;
switch (key)
{
case 'w': {
doThemeColorsWindow = !doThemeColorsWindow;
break;
}
case 'e': {
ImGui::StyleColorsDark();
break;
}
case 'r': {
ImGui::StyleColorsClassic();
break;
}
case 't': {
gui.setTheme(new ThemeTest());
break;
}
case 'z': {
gui.setDefaultTheme();
break;
}
}
}
void ofApp::exit( ofEventArgs & args )
{
// Cleanup
ImGui_ImplGlfwGL2_Shutdown();
//ImGui_ImplGlfwGL3_Shutdown();
ImGui::DestroyContext();
glfwDestroyWindow(window);
glfwTerminate();
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
ofLogVerbose(__FUNCTION__) << key;
}
//--------------------------------------------------------------
void ofApp::mouseScrolled(float x, float y) {
ofLogVerbose(__FUNCTION__) << "x: " << x << " y: " << y;
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y) {
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h) {
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg) {
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo) {
}
\ No newline at end of file
#pragma once
#include "ofMain.h"
#include "ofxImGui.h"
#include "ThemeTest.h"
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y);
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void mouseScrolled(float x, float y);
void exit( ofEventArgs & args );
ofxImGui::Gui gui;
ImVec4 backgroundColor;
bool show_test_window;
bool show_another_window;
float floatValue;
ofImage imageButtonSource;
GLuint imageButtonID;
ofPixels pixelsButtonSource;
GLuint pixelsButtonID;
ofTexture textureSource;
GLuint textureSourceID;
GLFWwindow* window;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
};
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif
# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=../../..
endif
# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
ofxImGui
ofxXmlSettings
\ No newline at end of file
################################################################################
# CONFIGURE PROJECT MAKEFILE (optional)
# This file is where we make project specific configurations.
################################################################################
################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
################################################################################
# OF_ROOT = ../../..
################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
# (default) PROJECT_ROOT = . (this directory)
#
################################################################################
# PROJECT_ROOT = .
################################################################################
# PROJECT SPECIFIC CHECKS
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# this makefile. For instance, if you want to make changes based on whether
# GTK is installed, one might test that here and create a variable to check.
################################################################################
# None
################################################################################
# PROJECT EXTERNAL SOURCE PATHS
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
# Like source folders in the PROJECT_ROOT, these paths are subject to
# exlclusion via the PROJECT_EXLCUSIONS list.
#
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXTERNAL_SOURCE_PATHS =
################################################################################
# PROJECT EXCLUSIONS
# These makefiles assume that all folders in your current project directory
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
# to look for source code. The any folders or files that match any of the
# items in the PROJECT_EXCLUSIONS list below will be ignored.
#
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# (default) PROJECT_EXCLUSIONS = (blank)
#
# Will automatically exclude the following:
#
# $(PROJECT_ROOT)/bin%
# $(PROJECT_ROOT)/obj%
# $(PROJECT_ROOT)/%.xcodeproj
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXCLUSIONS =
################################################################################
# PROJECT LINKER FLAGS
# These flags will be sent to the linker when compiling the executable.
#
# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# Currently, shared libraries that are needed are copied to the
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
# add a runtime path to search for those shared libraries, since they aren't
# incorporated directly into the final executable application binary.
# TODO: should this be a default setting?
# PROJECT_LDFLAGS=-Wl,-rpath=./libs
################################################################################
# PROJECT DEFINES
# Create a space-delimited list of DEFINES. The list will be converted into
# CFLAGS with the "-D" flag later in the makefile.
#
# (default) PROJECT_DEFINES = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_DEFINES =
################################################################################
# PROJECT CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# defined in your platform specific core configuration files. These flags are
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
#
# (default) PROJECT_CFLAGS = (blank)
#
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# further flags here may not be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
PROJECT_CFLAGS = -lGL -lglfw3 -lrt -lm -ldl -lX11 -lpthread -lxcb -lXau -lXdmcp
################################################################################
# PROJECT OPTIMIZATION CFLAGS
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These flags are added BEFORE the PROJECT_CFLAGS.
#
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
#
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
#
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
################################################################################
# PROJECT COMPILERS
# Custom compilers can be set for CC and CXX
# (default) PROJECT_CXX = (blank)
# (default) PROJECT_CC = (blank)
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CXX =
# PROJECT_CC =
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-demo", "example-demo.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="src\ofApp.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\ofApp.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\BaseEngine.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\BaseTheme.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineGLFW.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineOpenGLES.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineVk.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\Gui.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\ImGuiHelpers.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\ofxImGuiLoggerChannel.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_demo.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_draw.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>
</Filter>
<Filter Include="addons">
<UniqueIdentifier>{71834F65-F3A9-211E-73B8-DC85}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui">
<UniqueIdentifier>{0CD6A942-69FF-3BAA-3AF1-ADD1}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\src">
<UniqueIdentifier>{18028A43-13D3-1DD5-471A-BE87}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs">
<UniqueIdentifier>{BE2F957E-7DA7-055C-DC70-3070}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs\imgui">
<UniqueIdentifier>{296AD70B-2F2E-1462-9E7C-6030}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs\imgui\src">
<UniqueIdentifier>{5962BF19-1468-EB82-01C0-2E72}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\ofApp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="src\ofApp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\BaseEngine.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\BaseTheme.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineGLFW.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineOpenGLES.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineVk.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\Gui.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\imconfig.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ImGuiHelpers.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ofxImGui.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ofxImGuiLoggerChannel.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ThemeTest.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_internal.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_rect_pack.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_textedit.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_truetype.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\src\ImGuiExtension.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="icon.rc" />
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
// Icon Resource Definition
#define MAIN_ICON 102
#if defined(_DEBUG)
MAIN_ICON ICON "icon_debug.ico"
#else
MAIN_ICON ICON "icon.ico"
#endif
This diff is collapsed.
// ImGui GLFW binding with OpenGL (legacy, fixed pipeline)
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the opengl3_example/ folder**
// See imgui_impl_glfw.cpp for details.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
struct GLFWwindow;
IMGUI_API bool ImGui_ImplGlfwGL2_Init(GLFWwindow* window, bool install_callbacks);
IMGUI_API void ImGui_ImplGlfwGL2_Shutdown();
IMGUI_API void ImGui_ImplGlfwGL2_NewFrame();
IMGUI_API void ImGui_ImplGlfwGL2_RenderDrawData(ImDrawData* draw_data);
// Use if you want to reset your rendering device without losing ImGui state.
IMGUI_API void ImGui_ImplGlfwGL2_InvalidateDeviceObjects();
IMGUI_API bool ImGui_ImplGlfwGL2_CreateDeviceObjects();
// GLFW callbacks (registered by default to GLFW if you enable 'install_callbacks' during initialization)
// Provided here if you want to chain callbacks yourself. You may also handle inputs yourself and use those as a reference.
IMGUI_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
IMGUI_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
IMGUI_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
IMGUI_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
#include "ofMain.h"
#include "ofApp.h"
#if (OF_VERSION_MINOR != 9) && defined(TARGET_OPENGLES)
#include "ofGLProgrammableRenderer.h"
#endif
//#define FORCE_PROGRAMMMABLE 1
//#define FORCE_APPGLFW 1
//#define FORCE_APPGLUT 1
#define FORCE_NOAPP 1
#ifdef FORCE_PROGRAMMMABLE
#include "ofGLProgrammableRenderer.h"
#endif
#ifdef FORCE_APPGLFW
#include "ofAppGLFWWindow.h"
#endif
#ifdef FORCE_APPGLUT
#include "ofAppGlutWindow.h"
#endif
#ifdef FORCE_NOAPP
#include "ofAppNoWindow.h"
#endif
int main()
{
ofSetLogLevel(OF_LOG_VERBOSE);
#if defined(TARGET_OPENGLES)
#if (OF_VERSION_MINOR == 9)
ofGLESWindowSettings settings;
settings.setSize(1280, 720);
settings.setGLESVersion(2);
ofCreateWindow(settings);
ofRunApp( new ofApp());
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp( new ofApp());
#endif
#elif FORCE_PROGRAMMMABLE
ofGLWindowSettings glWindowSettings;
glWindowSettings.setSize(1280, 720);
glWindowSettings.setGLVersion(3, 2);
//glWindowSettings.setGLVersion(2, 1);
ofGLSLVersionFromGL(1,50);
//glWindowSettings.setGLVersion(2, 1);
ofCreateWindow(glWindowSettings);
ofRunApp( new ofApp());
#elif FORCE_APPGLFW
#define USE_GLFW_CLIPBOARD
ofGLFWWindowSettings settings;
// #ifdef NANOVG_GL2_IMPLEMENTATION
// settings.setGLVersion(2, 1); // Fixed pipeline
// #endif
// #ifdef NANOVG_GL3_IMPLEMENTATION
settings.setGLVersion(3, 2); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
//settings.setGLVersion(2, 1); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
// #endif
//settings.stencilBits = 0;
settings.setSize(1280, 720);
//settings.setPosition(ofVec2f(300,0));
//settings.resizable = true;
//shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
//mainWindow->setVerticalSync(false);
ofGLSLVersionFromGL(1,50);
ofCreateWindow(settings);
ofRunApp( new ofApp());
#elif FORCE_APPGLUT
ofAppGlutWindow window;
ofSetupOpenGL(&window,1280,720,OF_WINDOW);
ofRunApp( new ofApp());
#elif FORCE_NOAPP
auto window = make_shared<ofAppNoWindow>();
auto app = make_shared<ofApp>();
ofRunApp(window, app);
ofRunMainLoop();
//ofGLFWWindowSettings settings;
//settings.visible = false;
//ofCreateWindow(settings);
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
//ofAppNoWindow window;
//ofSetupOpenGL(&window, 1024, 768, OF_WINDOW);
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp( new ofApp());
#endif
}
#ifndef MY_DEFINES_H
#define MY_DEFINES_H
//#define NO_IMGUIADDONS
//#define YES_IMGUIADDONS_ALL
#define YES_IMGUIMINIGAMES
//#define NO_IMGUIMINIGAMES_MINE
//#define NO_IMGUIMINIGAMES_SUDOKU
//#define NO_IMGUIMINIGAMES_FIFTEEN
#define YES_IMGUISQLITE3
//#define NO_IMGUISQLITE3
//#define YES_IMGUIADDONS_ALL
//#define NO_IMGUIPDFVIEWER
#define YES_IMGUISOLOUD_ALL
#define YES_IMGUISOLOUD_MODPLUG
#define NO_IMGUICODEEDITOR // not work removed
#define NO_IMGUIIMAGEEDITOR // not work
//#define NO_IMGUIDOCK // not work
//#define NO_IMGUIDATECHOOSER
//#define NO_IMGUITOOLBAR
//#define NO_IMGUISTYLESERIALIZER
//#define YES_IMGUISTRINGIFIER
#endif // MY_DEFINES_H
\ No newline at end of file
#include "ofApp.h"
#include "imgui_impl_glfw_gl2.h"
//#include "imgui_impl_glfw_gl3.h"
//#include <stdio.h>
#include <GLFW/glfw3.h>
static void glfw_error_callback(int error, const char* description)
{
fprintf(stderr, "Error %d: %s\n", error, description);
//ofLogVerbose() << "Error %d: %s\n", error, description;
}
// Is called whenever a key is pressed/released via GLFW
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode)
{
std::cout << key << std::endl;
if(key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
glfwSetWindowShouldClose(window, GL_TRUE);
}
//--------------------------------------------------------------
void ofApp::setup()
{
ofSetLogLevel(OF_LOG_VERBOSE);
// Setup window
glfwSetErrorCallback(glfw_error_callback);
glfwInit();
//glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
//glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
//glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#if __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL2 example", NULL, NULL);
if (!window)
{
fprintf(stderr, "Failed to open GLFW window.\n");
glfwTerminate();
ofExit();
}
glfwMakeContextCurrent(window);
//glfwSwapInterval(1); // Enable vsync
//gl3wInit();
// Setup Dear ImGui binding
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
ImGui_ImplGlfwGL2_Init(window, true);
////ImGui_ImplGlfwGL3_Init(window, true);
//required call
//gui.setup();
// Setup style
ImGui::StyleColorsDark();
//ImGui::StyleColorsClassic();
ImGui::GetIO().MouseDrawCursor = false;
//backgroundColor is stored as an ImVec4 type but can handle ofColor
backgroundColor = ofColor(114, 144, 154);
show_test_window = true;
show_another_window = false;
floatValue = 0.0f;
//load your own ofImage
imageButtonSource.load("of.png");
//imageButtonID = loadImage(imageButtonSource);
//imageButtonID.load("of.png");
//or have the loading done for you if you don't need the ofImage reference
//imageButtonID = gui.loadImage("of.png");
//imageButtonID.load("of.png");
//can also use ofPixels in same manner
//ofLoadImage(pixelsButtonSource, "of_upside_down.png");
////pixelsButtonID = gui.loadPixels(pixelsButtonSource);
//and alt method
//pixelsButtonID = gui.loadPixels("of_upside_down.png");
//pixelsButtonID.load("of_upside_down.png");
//pass in your own texture reference if you want to keep it
////textureSourceID = gui.loadTexture(textureSource, "of_upside_down.png");
//or just pass a path
//textureSourceID = gui.loadTexture("of_upside_down.png");
//textureSourceID.load("of_upside_down.png");
ofLogVerbose() << "textureSourceID: " << textureSourceID;
cout << "Vendor :" << glGetString(GL_VENDOR) << endl;
cout << "GPU : "<< glGetString(GL_RENDERER) << endl;
cout << "OpenGL ver. " << glGetString(GL_VERSION) << endl;
cout << "GLSL ver. " << glGetString(GL_SHADING_LANGUAGE_VERSION) << endl;
}
//--------------------------------------------------------------
void ofApp::update() {
// Set the required callback functions
glfwSetKeyCallback(window, key_callback);
if(glfwWindowShouldClose(window)){
ofExit();
}
}
bool doThemeColorsWindow = false;
//--------------------------------------------------------------
void ofApp::draw() {
//backgroundColor is stored as an ImVec4 type but is converted to ofColor automatically
//ofSetBackgroundColor(backgroundColor);
//required to call this at beginning
//gui.begin();
//if (!glfwWindowShouldClose(window)) {
glfwPollEvents();
ImGui_ImplGlfwGL2_NewFrame();
//ImGui_ImplGlfwGL3_NewFrame();
//In between gui.begin() and gui.end() you can use ImGui as you would anywhere else
// 1. Show a simple window
{
ImGui::Text("Hello, world!");
ImGui::SliderFloat("Float", &floatValue, 0.0f, 1.0f);
//this will change the app background color
ImGui::ColorEdit3("Background Color", (float*)&backgroundColor);
if(ImGui::Button("Demo Window"))
{
show_test_window = !show_test_window;
}
if (ImGui::Button("Another Window"))
{
//bitwise OR
show_another_window ^= 1;
}
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
// 2. Show another window, this time using an explicit ImGui::Begin and ImGui::End
if (show_another_window) {
//note: ofVec2f and ImVec2f are interchangeable
ImGui::SetNextWindowSize(ofVec2f(200,100), ImGuiCond_FirstUseEver);
ImGui::Begin("Another Window", &show_another_window);
ImGui::Text("Hello");
ImGui::End();
}
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowDemoWindow()
if (show_test_window) {
ImGui::SetNextWindowPos(ofVec2f(650, 20), ImGuiCond_FirstUseEver);
ImGui::ShowDemoWindow(&show_test_window);
}
ImGui::ShowTabsDemo("Tabs Demo");
//bool pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)imageButtonID, ImVec2(200, 200));
// pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)pixelsButtonID, ImVec2(200, 200));
// pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)textureSourceID, ImVec2(200, 200));
if(doThemeColorsWindow) {
//gui.openThemeColorWindow();
}
//required to call this at end
//gui.end();
// Rendering
int display_w, display_h;
glfwGetFramebufferSize(window, &display_w, &display_h);
glViewport(0, 0, display_w, display_h);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
//glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
ImGui::Render();
ImGui_ImplGlfwGL2_RenderDrawData(ImGui::GetDrawData());
//ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
glfwSwapBuffers(window);
if(textureSource.isAllocated()) {
//textureSource.draw(ofRandom(200), ofRandom(200));
}
// }
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key) {
ofLogVerbose(__FUNCTION__) << key;
switch (key)
{
case 'w': {
doThemeColorsWindow = !doThemeColorsWindow;
break;
}
case 'e': {
ImGui::StyleColorsDark();
break;
}
case 'r': {
ImGui::StyleColorsClassic();
break;
}
case 't': {
gui.setTheme(new ThemeTest());
break;
}
case 'z': {
gui.setDefaultTheme();
break;
}
}
}
void ofApp::exit( ofEventArgs & args )
{
// Cleanup
ImGui_ImplGlfwGL2_Shutdown();
//ImGui_ImplGlfwGL3_Shutdown();
ImGui::DestroyContext();
glfwDestroyWindow(window);
glfwTerminate();
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
ofLogVerbose(__FUNCTION__) << key;
}
//--------------------------------------------------------------
void ofApp::mouseScrolled(float x, float y) {
ofLogVerbose(__FUNCTION__) << "x: " << x << " y: " << y;
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y) {
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h) {
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg) {
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo) {
}
\ No newline at end of file
#pragma once
#include "ofMain.h"
#include "ofxImGui.h"
#include "ThemeTest.h"
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y);
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void mouseScrolled(float x, float y);
void exit( ofEventArgs & args );
ofxImGui::Gui gui;
ImVec4 backgroundColor;
bool show_test_window;
bool show_another_window;
float floatValue;
ofImage imageButtonSource;
GLuint imageButtonID;
ofPixels pixelsButtonSource;
GLuint pixelsButtonID;
ofTexture textureSource;
GLuint textureSourceID;
GLFWwindow* window;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
};
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif
# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=../../..
endif
# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
ofxImGui
ofxXmlSettings
\ No newline at end of file
################################################################################
# CONFIGURE PROJECT MAKEFILE (optional)
# This file is where we make project specific configurations.
################################################################################
################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
################################################################################
# OF_ROOT = ../../..
################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
# (default) PROJECT_ROOT = . (this directory)
#
################################################################################
# PROJECT_ROOT = .
################################################################################
# PROJECT SPECIFIC CHECKS
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# this makefile. For instance, if you want to make changes based on whether
# GTK is installed, one might test that here and create a variable to check.
################################################################################
# None
################################################################################
# PROJECT EXTERNAL SOURCE PATHS
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
# Like source folders in the PROJECT_ROOT, these paths are subject to
# exlclusion via the PROJECT_EXLCUSIONS list.
#
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXTERNAL_SOURCE_PATHS =
################################################################################
# PROJECT EXCLUSIONS
# These makefiles assume that all folders in your current project directory
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
# to look for source code. The any folders or files that match any of the
# items in the PROJECT_EXCLUSIONS list below will be ignored.
#
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# (default) PROJECT_EXCLUSIONS = (blank)
#
# Will automatically exclude the following:
#
# $(PROJECT_ROOT)/bin%
# $(PROJECT_ROOT)/obj%
# $(PROJECT_ROOT)/%.xcodeproj
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXCLUSIONS =
################################################################################
# PROJECT LINKER FLAGS
# These flags will be sent to the linker when compiling the executable.
#
# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# Currently, shared libraries that are needed are copied to the
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
# add a runtime path to search for those shared libraries, since they aren't
# incorporated directly into the final executable application binary.
# TODO: should this be a default setting?
# PROJECT_LDFLAGS=-Wl,-rpath=./libs
################################################################################
# PROJECT DEFINES
# Create a space-delimited list of DEFINES. The list will be converted into
# CFLAGS with the "-D" flag later in the makefile.
#
# (default) PROJECT_DEFINES = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_DEFINES =
################################################################################
# PROJECT CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# defined in your platform specific core configuration files. These flags are
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
#
# (default) PROJECT_CFLAGS = (blank)
#
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# further flags here may not be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CFLAGS =
################################################################################
# PROJECT OPTIMIZATION CFLAGS
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These flags are added BEFORE the PROJECT_CFLAGS.
#
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
#
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
#
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
################################################################################
# PROJECT COMPILERS
# Custom compilers can be set for CC and CXX
# (default) PROJECT_CXX = (blank)
# (default) PROJECT_CC = (blank)
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CXX =
# PROJECT_CC =
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-demo", "example-demo.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="src\ofApp.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\ofApp.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\BaseEngine.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\BaseTheme.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineGLFW.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineOpenGLES.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\EngineVk.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\Gui.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\ImGuiHelpers.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\src\ofxImGuiLoggerChannel.cpp">
<Filter>addons\ofxImGui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_demo.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_draw.cpp">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{d8376475-7454-4a24-b08a-aac121d3ad6f}</UniqueIdentifier>
</Filter>
<Filter Include="addons">
<UniqueIdentifier>{71834F65-F3A9-211E-73B8-DC85}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui">
<UniqueIdentifier>{0CD6A942-69FF-3BAA-3AF1-ADD1}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\src">
<UniqueIdentifier>{18028A43-13D3-1DD5-471A-BE87}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs">
<UniqueIdentifier>{BE2F957E-7DA7-055C-DC70-3070}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs\imgui">
<UniqueIdentifier>{296AD70B-2F2E-1462-9E7C-6030}</UniqueIdentifier>
</Filter>
<Filter Include="addons\ofxImGui\libs\imgui\src">
<UniqueIdentifier>{5962BF19-1468-EB82-01C0-2E72}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\ofApp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="src\ofApp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\BaseEngine.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\BaseTheme.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineGLFW.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineOpenGLES.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\EngineVk.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\Gui.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\imconfig.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ImGuiHelpers.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ofxImGui.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ofxImGuiLoggerChannel.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\src\ThemeTest.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\imgui_internal.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_rect_pack.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_textedit.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\addons\ofxImGui\libs\imgui\src\stb_truetype.h">
<Filter>addons\ofxImGui\libs\imgui\src</Filter>
</ClInclude>
<ClInclude Include="..\src\ImGuiExtension.h">
<Filter>addons\ofxImGui\src</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="icon.rc" />
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
// Icon Resource Definition
#define MAIN_ICON 102
#if defined(_DEBUG)
MAIN_ICON ICON "icon_debug.ico"
#else
MAIN_ICON ICON "icon.ico"
#endif
This diff is collapsed.
// ImGui GLFW binding with OpenGL (legacy, fixed pipeline)
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the opengl3_example/ folder**
// See imgui_impl_glfw.cpp for details.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
struct GLFWwindow;
IMGUI_API bool ImGui_ImplGlfwGL2_Init(GLFWwindow* window, bool install_callbacks);
IMGUI_API void ImGui_ImplGlfwGL2_Shutdown();
IMGUI_API void ImGui_ImplGlfwGL2_NewFrame();
IMGUI_API void ImGui_ImplGlfwGL2_RenderDrawData(ImDrawData* draw_data);
// Use if you want to reset your rendering device without losing ImGui state.
IMGUI_API void ImGui_ImplGlfwGL2_InvalidateDeviceObjects();
IMGUI_API bool ImGui_ImplGlfwGL2_CreateDeviceObjects();
// GLFW callbacks (registered by default to GLFW if you enable 'install_callbacks' during initialization)
// Provided here if you want to chain callbacks yourself. You may also handle inputs yourself and use those as a reference.
IMGUI_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
IMGUI_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
IMGUI_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
IMGUI_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
#include "ofMain.h"
#include "ofApp.h"
//#if (OF_VERSION_MINOR != 9) && defined(TARGET_OPENGLES)
//#include "ofGLProgrammableRenderer.h"
//#endif
//#define FORCE_PROGRAMMMABLE 1
//#define FORCE_APPGLFW 1
//#define FORCE_OPENGLES 1
//#define FORCE_APPGLUT 1
#define FORCE_NOAPP 1
#ifdef FORCE_PROGRAMMMABLE
#include "ofGLProgrammableRenderer.h"
#endif
#ifdef FORCE_APPGLFW
#include "ofAppGLFWWindow.h"
#endif
#ifdef FORCE_APPGLUT
#include "ofAppGlutWindow.h"
#endif
#ifdef FORCE_NOAPP
#include "ofAppNoWindow.h"
#endif
int main()
{
ofSetLogLevel(OF_LOG_VERBOSE);
#if defined FORCE_OPENGLES
#if (OF_VERSION_MINOR == 9)
ofGLESWindowSettings settings;
settings.setSize(1280, 720);
settings.setGLESVersion(2);
ofCreateWindow(settings);
ofRunApp( new ofApp());
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp( new ofApp());
#endif
#elif FORCE_PROGRAMMMABLE
ofGLWindowSettings glWindowSettings;
glWindowSettings.setSize(1280, 720);
glWindowSettings.setGLVersion(3, 2);
//glWindowSettings.setGLVersion(2, 1);
ofGLSLVersionFromGL(1,50);
//glWindowSettings.setGLVersion(2, 1);
ofCreateWindow(glWindowSettings);
ofRunApp( new ofApp());
#elif FORCE_APPGLFW
#define USE_GLFW_CLIPBOARD
ofGLFWWindowSettings settings;
// #ifdef NANOVG_GL2_IMPLEMENTATION
// settings.setGLVersion(2, 1); // Fixed pipeline
// #endif
// #ifdef NANOVG_GL3_IMPLEMENTATION
settings.setGLVersion(3, 2); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
//settings.setGLVersion(2, 1); // Programmable pipeline >> you need to define GL_VERSION_3 in you pre-processor macros!
// #endif
//settings.stencilBits = 0;
settings.setSize(1280, 720);
//settings.setPosition(ofVec2f(300,0));
//settings.resizable = true;
//shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
//mainWindow->setVerticalSync(false);
ofGLSLVersionFromGL(1,50);
ofCreateWindow(settings);
ofRunApp( new ofApp());
#elif FORCE_APPGLUT
ofAppGlutWindow window;
ofSetupOpenGL(&window,1280,720,OF_WINDOW);
ofRunApp( new ofApp());
#elif FORCE_NOAPP
auto window = make_shared<ofAppNoWindow>();
auto app = make_shared<ofApp>();
ofRunApp(window, app);
ofRunMainLoop();
//ofGLFWWindowSettings settings;
//settings.visible = false;
//ofCreateWindow(settings);
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
//ofAppNoWindow window;
//ofSetupOpenGL(&window, 1024, 768, OF_WINDOW);
#else
ofSetLogLevel("ofThread", OF_LOG_ERROR);
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp( new ofApp());
#endif
}
#ifndef MY_DEFINES_H
#define MY_DEFINES_H
//#define NO_IMGUIADDONS
//#define YES_IMGUIADDONS_ALL
#define YES_IMGUIMINIGAMES
//#define NO_IMGUIMINIGAMES_MINE
//#define NO_IMGUIMINIGAMES_SUDOKU
//#define NO_IMGUIMINIGAMES_FIFTEEN
#define YES_IMGUISQLITE3
//#define NO_IMGUISQLITE3
//#define YES_IMGUIADDONS_ALL
//#define NO_IMGUIPDFVIEWER
#define YES_IMGUISOLOUD_ALL
#define YES_IMGUISOLOUD_MODPLUG
#define NO_IMGUICODEEDITOR // not work removed
#define NO_IMGUIIMAGEEDITOR // not work
//#define NO_IMGUIDOCK // not work
//#define NO_IMGUIDATECHOOSER
//#define NO_IMGUITOOLBAR
//#define NO_IMGUISTYLESERIALIZER
//#define YES_IMGUISTRINGIFIER
#endif // MY_DEFINES_H
\ No newline at end of file
#include "ofApp.h"
#include "imgui_impl_glfw_gl2.h"
//#include "imgui_impl_glfw_gl3.h"
#include <stdio.h>
#include <GLFW/glfw3.h>
static void glfw_error_callback(int error, const char* description)
{
fprintf(stderr, "Error %d: %s\n", error, description);
//ofLogVerbose() << "Error %d: %s\n", error, description;
}
//--------------------------------------------------------------
void ofApp::setup()
{
ofSetLogLevel(OF_LOG_VERBOSE);
// Setup window
glfwSetErrorCallback(glfw_error_callback);
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
//glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#if __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL2 example", NULL, NULL);
glfwMakeContextCurrent(window);
//glfwSwapInterval(1); // Enable vsync
//gl3wInit();
// Setup Dear ImGui binding
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
ImGui_ImplGlfwGL2_Init(window, true);
////ImGui_ImplGlfwGL3_Init(window, true);
//required call
//gui.setup();
// Setup style
ImGui::StyleColorsDark();
//ImGui::StyleColorsClassic();
ImGui::GetIO().MouseDrawCursor = false;
//backgroundColor is stored as an ImVec4 type but can handle ofColor
backgroundColor = ofColor(114, 144, 154);
show_test_window = true;
show_another_window = false;
floatValue = 0.0f;
//load your own ofImage
//imageButtonSource.load("of.png");
//imageButtonID = gui.loadImage(imageButtonSource);
//or have the loading done for you if you don't need the ofImage reference
//imageButtonID = gui.loadImage("of.png");
//can also use ofPixels in same manner
//ofLoadImage(pixelsButtonSource, "of_upside_down.png");
////pixelsButtonID = gui.loadPixels(pixelsButtonSource);
//and alt method
//pixelsButtonID = gui.loadPixels("of_upside_down.png");
//pass in your own texture reference if you want to keep it
////textureSourceID = gui.loadTexture(textureSource, "of_upside_down.png");
//or just pass a path
//textureSourceID = gui.loadTexture("of_upside_down.png");
ofLogVerbose() << "textureSourceID: " << textureSourceID;
cout << "Vendor :" << glGetString(GL_VENDOR) << endl;
cout << "GPU : "<< glGetString(GL_RENDERER) << endl;
cout << "OpenGL ver. " << glGetString(GL_VERSION) << endl;
cout << "GLSL ver. " << glGetString(GL_SHADING_LANGUAGE_VERSION) << endl;
}
//--------------------------------------------------------------
void ofApp::update() {
}
bool doThemeColorsWindow = false;
//--------------------------------------------------------------
void ofApp::draw() {
//backgroundColor is stored as an ImVec4 type but is converted to ofColor automatically
//ofSetBackgroundColor(backgroundColor);
//required to call this at beginning
//gui.begin();
//if (!glfwWindowShouldClose(window)) {
glfwPollEvents();
ImGui_ImplGlfwGL2_NewFrame();
//ImGui_ImplGlfwGL3_NewFrame();
//In between gui.begin() and gui.end() you can use ImGui as you would anywhere else
// 1. Show a simple window
{
ImGui::Text("Hello, world!");
ImGui::SliderFloat("Float", &floatValue, 0.0f, 1.0f);
//this will change the app background color
ImGui::ColorEdit3("Background Color", (float*)&backgroundColor);
if(ImGui::Button("Demo Window"))
{
show_test_window = !show_test_window;
}
if (ImGui::Button("Another Window"))
{
//bitwise OR
show_another_window ^= 1;
}
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
// 2. Show another window, this time using an explicit ImGui::Begin and ImGui::End
if (show_another_window) {
//note: ofVec2f and ImVec2f are interchangeable
ImGui::SetNextWindowSize(ofVec2f(200,100), ImGuiCond_FirstUseEver);
ImGui::Begin("Another Window", &show_another_window);
ImGui::Text("Hello");
ImGui::End();
}
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowDemoWindow()
if (show_test_window) {
ImGui::SetNextWindowPos(ofVec2f(650, 20), ImGuiCond_FirstUseEver);
ImGui::ShowDemoWindow(&show_test_window);
}
ImGui::ShowTabsDemo("Tabs Demo");
bool pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)imageButtonID, ImVec2(200, 200));
pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)pixelsButtonID, ImVec2(200, 200));
pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)textureSourceID, ImVec2(200, 200));
if(doThemeColorsWindow) {
//gui.openThemeColorWindow();
}
//required to call this at end
//gui.end();
// Rendering
int display_w, display_h;
glfwGetFramebufferSize(window, &display_w, &display_h);
glViewport(0, 0, display_w, display_h);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
//glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
ImGui::Render();
ImGui_ImplGlfwGL2_RenderDrawData(ImGui::GetDrawData());
//ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
glfwSwapBuffers(window);
if(textureSource.isAllocated()) {
//textureSource.draw(ofRandom(200), ofRandom(200));
}
// }
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key) {
ofLogVerbose(__FUNCTION__) << key;
switch (key)
{
case 'w': {
doThemeColorsWindow = !doThemeColorsWindow;
break;
}
case 'e': {
ImGui::StyleColorsDark();
break;
}
case 'r': {
ImGui::StyleColorsClassic();
break;
}
case 't': {
gui.setTheme(new ThemeTest());
break;
}
case 'z': {
gui.setDefaultTheme();
break;
}
}
}
void ofApp::exit( ofEventArgs & args )
{
// Cleanup
ImGui_ImplGlfwGL2_Shutdown();
//ImGui_ImplGlfwGL3_Shutdown();
ImGui::DestroyContext();
glfwDestroyWindow(window);
glfwTerminate();
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
ofLogVerbose(__FUNCTION__) << key;
}
//--------------------------------------------------------------
void ofApp::mouseScrolled(float x, float y) {
ofLogVerbose(__FUNCTION__) << "x: " << x << " y: " << y;
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y) {
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button) {
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h) {
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg) {
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo) {
}
\ No newline at end of file
#pragma once
#include "ofMain.h"
#include "ofxImGui.h"
#include "ThemeTest.h"
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y);
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void mouseScrolled(float x, float y);
void exit( ofEventArgs & args );
ofxImGui::Gui gui;
ImVec4 backgroundColor;
bool show_test_window;
bool show_another_window;
float floatValue;
ofImage imageButtonSource;
GLuint imageButtonID;
ofPixels pixelsButtonSource;
GLuint pixelsButtonID;
ofTexture textureSource;
GLuint textureSourceID;
GLFWwindow* window;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
};
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif
# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=$(realpath ../../..)
endif
# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
ofxImGui
ofxXmlSettings
\ No newline at end of file
This diff is collapsed.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-demo", "example-demo.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64
{7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64
{5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(ProjectDir)/bin</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
// Icon Resource Definition
#define MAIN_ICON 102
#if defined(_DEBUG)
MAIN_ICON ICON "icon_debug.ico"
#else
MAIN_ICON ICON "icon.ico"
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment