+ added test triangle rendering

* on close mainloop is ended
This commit is contained in:
End 2016-09-13 21:03:36 +02:00
parent 91f32eff4e
commit 39af185188
20 changed files with 994 additions and 146 deletions

5
.gitignore vendored
View file

@ -1,3 +1,8 @@
build* build*
*.user *.user
*.autosave *.autosave
*.o
*.make
Makefile
CMakeFiles
cmake_install.cmake

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "KKK/tests/Catch"]
path = KKK/tests/Catch
url = https://github.com/philsquared/Catch

694
KKK/CMakeCache.txt Normal file
View file

@ -0,0 +1,694 @@
# This is the CMakeCache file.
# For build in directory: /home/end/projects/KlassischeKeplerKriege/KKK
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release builds for minimum
// size.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during release builds with debug info.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release builds for minimum
// size.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during release builds with debug info.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld
//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=KKK
//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Value Computed by CMake
KKK_BINARY_DIR:STATIC=/home/end/projects/KlassischeKeplerKriege/KKK
//Value Computed by CMake
KKK_SOURCE_DIR:STATIC=/home/end/projects/KlassischeKeplerKriege/KKK
//Path to a file.
OPENGL_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
OPENGL_gl_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libGL.so
//Path to a library.
OPENGL_glu_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libGLU.so
//Path to a file.
OPENGL_xmesa_INCLUDE_DIR:PATH=OPENGL_xmesa_INCLUDE_DIR-NOTFOUND
//pkg-config executable
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
//Path to a file.
X11_ICE_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_ICE_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libICE.so
//Path to a file.
X11_SM_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_SM_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libSM.so
//Path to a file.
X11_X11_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_X11_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libX11.so
//Path to a file.
X11_XRes_INCLUDE_PATH:PATH=X11_XRes_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_XRes_LIB:FILEPATH=X11_XRes_LIB-NOTFOUND
//Path to a file.
X11_XShm_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_XSync_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_XTest_INCLUDE_PATH:PATH=X11_XTest_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_XTest_LIB:FILEPATH=X11_XTest_LIB-NOTFOUND
//Path to a file.
X11_Xaccessrules_INCLUDE_PATH:PATH=X11_Xaccessrules_INCLUDE_PATH-NOTFOUND
//Path to a file.
X11_Xaccessstr_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_Xau_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_Xau_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXau.so
//Path to a file.
X11_Xcomposite_INCLUDE_PATH:PATH=X11_Xcomposite_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xcomposite_LIB:FILEPATH=X11_Xcomposite_LIB-NOTFOUND
//Path to a file.
X11_Xcursor_INCLUDE_PATH:PATH=X11_Xcursor_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xcursor_LIB:FILEPATH=X11_Xcursor_LIB-NOTFOUND
//Path to a file.
X11_Xdamage_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_Xdamage_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXdamage.so
//Path to a file.
X11_Xdmcp_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_Xdmcp_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXdmcp.so
//Path to a library.
X11_Xext_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXext.so
//Path to a file.
X11_Xfixes_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_Xfixes_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXfixes.so
//Path to a file.
X11_Xft_INCLUDE_PATH:PATH=X11_Xft_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xft_LIB:FILEPATH=X11_Xft_LIB-NOTFOUND
//Path to a file.
X11_Xi_INCLUDE_PATH:PATH=X11_Xi_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xi_LIB:FILEPATH=X11_Xi_LIB-NOTFOUND
//Path to a file.
X11_Xinerama_INCLUDE_PATH:PATH=X11_Xinerama_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xinerama_LIB:FILEPATH=X11_Xinerama_LIB-NOTFOUND
//Path to a file.
X11_Xinput_INCLUDE_PATH:PATH=X11_Xinput_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xinput_LIB:FILEPATH=X11_Xinput_LIB-NOTFOUND
//Path to a file.
X11_Xkb_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_Xkbfile_INCLUDE_PATH:PATH=X11_Xkbfile_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xkbfile_LIB:FILEPATH=X11_Xkbfile_LIB-NOTFOUND
//Path to a file.
X11_Xkblib_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_Xlib_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_Xmu_INCLUDE_PATH:PATH=X11_Xmu_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xmu_LIB:FILEPATH=X11_Xmu_LIB-NOTFOUND
//Path to a file.
X11_Xpm_INCLUDE_PATH:PATH=X11_Xpm_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xpm_LIB:FILEPATH=X11_Xpm_LIB-NOTFOUND
//Path to a file.
X11_Xrandr_INCLUDE_PATH:PATH=X11_Xrandr_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xrandr_LIB:FILEPATH=X11_Xrandr_LIB-NOTFOUND
//Path to a file.
X11_Xrender_INCLUDE_PATH:PATH=X11_Xrender_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xrender_LIB:FILEPATH=X11_Xrender_LIB-NOTFOUND
//Path to a file.
X11_Xscreensaver_INCLUDE_PATH:PATH=X11_Xscreensaver_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xscreensaver_LIB:FILEPATH=X11_Xscreensaver_LIB-NOTFOUND
//Path to a file.
X11_Xshape_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_Xt_INCLUDE_PATH:PATH=/usr/include
//Path to a library.
X11_Xt_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXt.so
//Path to a file.
X11_Xutil_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_Xv_INCLUDE_PATH:PATH=X11_Xv_INCLUDE_PATH-NOTFOUND
//Path to a library.
X11_Xv_LIB:FILEPATH=X11_Xv_LIB-NOTFOUND
//Path to a library.
X11_Xxf86misc_LIB:FILEPATH=X11_Xxf86misc_LIB-NOTFOUND
//Path to a library.
X11_Xxf86vm_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXxf86vm.so
//Path to a file.
X11_dpms_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
X11_xf86misc_INCLUDE_PATH:PATH=X11_xf86misc_INCLUDE_PATH-NOTFOUND
//Path to a file.
X11_xf86vmode_INCLUDE_PATH:PATH=/usr/include
//Path to a file.
epoxy_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
epoxy_LIBRARY_NAMES:FILEPATH=/usr/lib/x86_64-linux-gnu/libepoxy.so
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/home/end/projects/KlassischeKeplerKriege/KKK
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=5
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Have function connect
CMAKE_HAVE_CONNECT:INTERNAL=1
//Have function gethostbyname
CMAKE_HAVE_GETHOSTBYNAME:INTERNAL=1
//Have function remove
CMAKE_HAVE_REMOVE:INTERNAL=1
//Have function shmat
CMAKE_HAVE_SHMAT:INTERNAL=1
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/home/end/projects/KlassischeKeplerKriege/KKK
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
//Have library ICE
CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER:INTERNAL=1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=3
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Details about finding OpenGL
FIND_PACKAGE_MESSAGE_DETAILS_OpenGL:INTERNAL=[/usr/lib/x86_64-linux-gnu/libGL.so][/usr/include][v()]
//Details about finding PkgConfig
FIND_PACKAGE_MESSAGE_DETAILS_PkgConfig:INTERNAL=[/usr/bin/pkg-config][v0.29.1()]
//Details about finding X11
FIND_PACKAGE_MESSAGE_DETAILS_X11:INTERNAL=[/usr/lib/x86_64-linux-gnu/libX11.so][/usr/include]
//ADVANCED property for variable: OPENGL_INCLUDE_DIR
OPENGL_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_gl_LIBRARY
OPENGL_gl_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_glu_LIBRARY
OPENGL_glu_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_xmesa_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR-ADVANCED:INTERNAL=1
PC_EPOXY_CFLAGS:INTERNAL=
PC_EPOXY_CFLAGS_I:INTERNAL=
PC_EPOXY_CFLAGS_OTHER:INTERNAL=
PC_EPOXY_FOUND:INTERNAL=1
PC_EPOXY_INCLUDEDIR:INTERNAL=/usr/include
PC_EPOXY_INCLUDE_DIRS:INTERNAL=
PC_EPOXY_LDFLAGS:INTERNAL=-lepoxy
PC_EPOXY_LDFLAGS_OTHER:INTERNAL=
PC_EPOXY_LIBDIR:INTERNAL=/usr/lib/x86_64-linux-gnu
PC_EPOXY_LIBRARIES:INTERNAL=epoxy
PC_EPOXY_LIBRARY_DIRS:INTERNAL=
PC_EPOXY_LIBS:INTERNAL=
PC_EPOXY_LIBS_L:INTERNAL=
PC_EPOXY_LIBS_OTHER:INTERNAL=
PC_EPOXY_LIBS_PATHS:INTERNAL=
PC_EPOXY_PREFIX:INTERNAL=/usr
PC_EPOXY_STATIC_CFLAGS:INTERNAL=
PC_EPOXY_STATIC_CFLAGS_I:INTERNAL=
PC_EPOXY_STATIC_CFLAGS_OTHER:INTERNAL=
PC_EPOXY_STATIC_INCLUDE_DIRS:INTERNAL=
PC_EPOXY_STATIC_LDFLAGS:INTERNAL=-lepoxy;-ldl
PC_EPOXY_STATIC_LDFLAGS_OTHER:INTERNAL=
PC_EPOXY_STATIC_LIBDIR:INTERNAL=
PC_EPOXY_STATIC_LIBRARIES:INTERNAL=epoxy;dl
PC_EPOXY_STATIC_LIBRARY_DIRS:INTERNAL=
PC_EPOXY_STATIC_LIBS:INTERNAL=
PC_EPOXY_STATIC_LIBS_L:INTERNAL=
PC_EPOXY_STATIC_LIBS_OTHER:INTERNAL=
PC_EPOXY_STATIC_LIBS_PATHS:INTERNAL=
PC_EPOXY_VERSION:INTERNAL=1.3.1
PC_EPOXY_epoxy_INCLUDEDIR:INTERNAL=
PC_EPOXY_epoxy_LIBDIR:INTERNAL=
PC_EPOXY_epoxy_PREFIX:INTERNAL=
PC_EPOXY_epoxy_VERSION:INTERNAL=
//ADVANCED property for variable: PKG_CONFIG_EXECUTABLE
PKG_CONFIG_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_ICE_INCLUDE_PATH
X11_ICE_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_ICE_LIB
X11_ICE_LIB-ADVANCED:INTERNAL=1
//Have library /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
X11_LIB_X11_SOLO:INTERNAL=1
//ADVANCED property for variable: X11_SM_INCLUDE_PATH
X11_SM_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_SM_LIB
X11_SM_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_X11_INCLUDE_PATH
X11_X11_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_X11_LIB
X11_X11_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_XRes_INCLUDE_PATH
X11_XRes_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_XRes_LIB
X11_XRes_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_XShm_INCLUDE_PATH
X11_XShm_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_XSync_INCLUDE_PATH
X11_XSync_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_XTest_INCLUDE_PATH
X11_XTest_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_XTest_LIB
X11_XTest_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xaccessrules_INCLUDE_PATH
X11_Xaccessrules_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xaccessstr_INCLUDE_PATH
X11_Xaccessstr_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xau_INCLUDE_PATH
X11_Xau_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xau_LIB
X11_Xau_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xcomposite_INCLUDE_PATH
X11_Xcomposite_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xcomposite_LIB
X11_Xcomposite_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xcursor_INCLUDE_PATH
X11_Xcursor_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xcursor_LIB
X11_Xcursor_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xdamage_INCLUDE_PATH
X11_Xdamage_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xdamage_LIB
X11_Xdamage_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xdmcp_INCLUDE_PATH
X11_Xdmcp_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xdmcp_LIB
X11_Xdmcp_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xext_LIB
X11_Xext_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xfixes_INCLUDE_PATH
X11_Xfixes_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xfixes_LIB
X11_Xfixes_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xft_INCLUDE_PATH
X11_Xft_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xft_LIB
X11_Xft_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xi_INCLUDE_PATH
X11_Xi_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xi_LIB
X11_Xi_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xinerama_INCLUDE_PATH
X11_Xinerama_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xinerama_LIB
X11_Xinerama_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xinput_INCLUDE_PATH
X11_Xinput_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xinput_LIB
X11_Xinput_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xkb_INCLUDE_PATH
X11_Xkb_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xkbfile_INCLUDE_PATH
X11_Xkbfile_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xkbfile_LIB
X11_Xkbfile_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xkblib_INCLUDE_PATH
X11_Xkblib_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xlib_INCLUDE_PATH
X11_Xlib_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xmu_INCLUDE_PATH
X11_Xmu_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xmu_LIB
X11_Xmu_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xpm_INCLUDE_PATH
X11_Xpm_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xpm_LIB
X11_Xpm_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xrandr_INCLUDE_PATH
X11_Xrandr_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xrandr_LIB
X11_Xrandr_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xrender_INCLUDE_PATH
X11_Xrender_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xrender_LIB
X11_Xrender_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xscreensaver_INCLUDE_PATH
X11_Xscreensaver_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xscreensaver_LIB
X11_Xscreensaver_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xshape_INCLUDE_PATH
X11_Xshape_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xt_INCLUDE_PATH
X11_Xt_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xt_LIB
X11_Xt_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xutil_INCLUDE_PATH
X11_Xutil_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xv_INCLUDE_PATH
X11_Xv_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xv_LIB
X11_Xv_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xxf86misc_LIB
X11_Xxf86misc_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_Xxf86vm_LIB
X11_Xxf86vm_LIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_dpms_INCLUDE_PATH
X11_dpms_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_xf86misc_INCLUDE_PATH
X11_xf86misc_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: X11_xf86vmode_INCLUDE_PATH
X11_xf86vmode_INCLUDE_PATH-ADVANCED:INTERNAL=1
__pkg_config_checked_PC_EPOXY:INTERNAL=1
prefix_result:INTERNAL=/usr/lib/x86_64-linux-gnu

15
KKK/CMakeLists.txt Normal file
View file

@ -0,0 +1,15 @@
project(KKK)
cmake_minimum_required(VERSION 3.0)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
function(setup_target NAME)
set_property(TARGET ${NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
target_compile_options(${NAME} PRIVATE -Wall -Wextra)
target_compile_options(${NAME} PRIVATE $<$<CONFIG:DEBUG>:-ggdb -O2>)
target_compile_options(${NAME} PRIVATE $<$<CONFIG:RELEASE>:-O3 -NDEBUG>)
endfunction(setup_target)
add_subdirectory(game)
add_subdirectory(tests)

View file

@ -0,0 +1,20 @@
set(epoxy_FOUND "no")
find_package(PkgConfig REQUIRED)
pkg_check_modules(PC_EPOXY QUIET epoxy)
find_path(epoxy_INCLUDE_DIR epoxy/gl.h
HINTS ${PC_EPOXY_INCLUDEDIR} ${PC_EPOXY_INCLUDE_DIRS}
PATH_SUFFIXES epoxy)
find_library(epoxy_LIBRARY_NAMES epoxy
HINTS ${PC_EPOXY_LIBDIR} ${PC_EPOXY_LIBRARY_DIRS})
if (epoxy_LIBRARY_NAMES)
set(epoxy_FOUND "yes")
add_library(epoxy SHARED IMPORTED)
set_property(TARGET epoxy APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${epoxy_INCLUDE_DIR})
set_property(TARGET epoxy PROPERTY INTERFACE_LINK_LIBRARIES ${epoxy_LIBRARY_NAMES})
set_property(TARGET epoxy APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_property(TARGET epoxy PROPERTY IMPORTED_LOCATION_RELEASE "${epoxy_LIBRARY_NAMES}")
set_property(TARGET epoxy PROPERTY IMPORTED_SONAME_RELEASE "${epoxy_LIBRARY_NAMES}")
endif (epoxy_LIBRARY_NAMES)

View file

@ -1,22 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-07-29T18:45:26
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = KKK
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
glwindow.cpp
HEADERS += mainwindow.h \
glwindow.h
FORMS += mainwindow.ui

23
KKK/game/CMakeLists.txt Normal file
View file

@ -0,0 +1,23 @@
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
set(CMAKE_AUTOMOC ON)
find_package(OpenGL REQUIRED)
find_package(epoxy REQUIRED)
find_package(X11 REQUIRED)
set(GAME_SRC
src/main.cpp
src/opengl.cpp
)
set(GAME_HEADERS
include/opengl.h
)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${OPENGL_INCLUDE_DIR})
add_executable(game ${GAME_SRC} ${GAME_HEADERS})
setup_target(game)
target_link_libraries(game X11 epoxy)

66
KKK/game/include/opengl.h Normal file
View file

@ -0,0 +1,66 @@
#pragma once
#include <stdexcept>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <epoxy/gl.h>
#include <epoxy/glx.h>
namespace endofthejedi {
class GLWindow {
private:
Display* m_display;
Window m_rootwnd;
GLint m_attributes[23] =
{
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR,
GLX_RED_SIZE, 8,
GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 8,
GLX_DEPTH_SIZE, 24,
GLX_STENCIL_SIZE, 8,
GLX_DOUBLEBUFFER, True,
None
};
XVisualInfo* m_visualinfo;
Colormap m_colormap;
XSetWindowAttributes m_swa;
Window m_window;
GLXContext m_glcontext;
XWindowAttributes m_gwa;
Atom m_atomWmDeleteWindow;
unsigned int m_width;
unsigned int m_height;
bool m_running = false;
protected:
virtual void handle(XEvent event);
virtual void init();
virtual void render(double time);
virtual void resize();
public:
GLWindow(unsigned int width, unsigned int height);
~GLWindow();
void loop();
void stop();
void swap();
unsigned int getheight() const {
return m_height;
}
unsigned int getwidth() const {
return m_width;
}
};
}

36
KKK/game/src/main.cpp Normal file
View file

@ -0,0 +1,36 @@
#include <include/opengl.h>
#include <iostream>
class MainWindow : public endofthejedi::GLWindow {
private:
protected:
void init() override {
glClearColor(0.5f, 0.6f, 0.7f, 1.0f);
resize();
glEnable(GL_DEPTH_TEST);
}
void render(double time) override {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glColor3f(1.0f, 0.0f, 0.0f);
glVertex3f(0.0f, -1.0f, 0.0f);
glColor3f(0.0f, 1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glColor3f(0.0f, 0.0f, 1.0f);
glVertex3f(1.0f, 1.0f, 0.0f);
glEnd();
}
void resize() override { glViewport(0, 0, getwidth(), getheight()); }
public:
MainWindow(unsigned int width, unsigned int height)
: endofthejedi::GLWindow(width, height) {}
};
int main(int argc, const char *argv[]) {
MainWindow window(500, 500);
window.loop();
window.stop();
}

122
KKK/game/src/opengl.cpp Normal file
View file

@ -0,0 +1,122 @@
#include <include/opengl.h>
#include <iostream>
#include <sys/time.h>
#define UNUSED(foo) (void)foo;
timespec diff(timespec start, timespec end) {
timespec result;
if ((end.tv_nsec - start.tv_nsec) < 0) {
result.tv_sec = end.tv_sec - start.tv_sec - 1;
result.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec;
} else {
result.tv_sec = end.tv_sec - start.tv_sec;
result.tv_nsec = end.tv_nsec - start.tv_nsec;
}
return result;
}
endofthejedi::GLWindow::GLWindow(unsigned int width, unsigned int height)
: m_width(width), m_height(height) {
m_display = XOpenDisplay(NULL);
if (m_display == NULL) {
throw std::runtime_error("XOpenDisplay NULL");
}
m_rootwnd = DefaultRootWindow(m_display);
m_visualinfo = glXChooseVisual(m_display, 0, m_attributes);
if (m_visualinfo == NULL) {
throw std::runtime_error("glXChooseVisual NULL");
}
m_colormap =
XCreateColormap(m_display, m_rootwnd, m_visualinfo->visual, AllocNone);
m_swa.colormap = m_colormap;
m_swa.event_mask = ExposureMask | KeyPressMask;
m_window = XCreateWindow(
m_display, m_rootwnd, 0, 0, width, height, 0, m_visualinfo->depth,
InputOutput, m_visualinfo->visual, CWColormap | CWEventMask, &m_swa);
m_atomWmDeleteWindow = XInternAtom(m_display, "WM_DELETE_WINDOW", False);
XSetWMProtocols(m_display, m_window, &m_atomWmDeleteWindow, 1);
XMapWindow(m_display, m_window);
XStoreName(m_display, m_window, "NAME");
m_glcontext = glXCreateContext(m_display, m_visualinfo, NULL, GL_TRUE);
XSync(m_display, False);
glXMakeCurrent(m_display, m_window, m_glcontext);
std::cout << "GL Renderer: " << glGetString(GL_RENDERER) << "\n";
std::cout << "GL Version: " << glGetString(GL_VERSION) << "\n";
std::cout << "GLSL Version: " << glGetString(GL_SHADING_LANGUAGE_VERSION)
<< "\n";
init();
XClearWindow(m_display, m_window);
XMapRaised(m_display, m_window);
}
endofthejedi::GLWindow::~GLWindow() {
glXMakeCurrent(m_display, None, NULL);
glXDestroyContext(m_display, m_glcontext);
XDestroyWindow(m_display, m_window);
XCloseDisplay(m_display);
}
void endofthejedi::GLWindow::handle(XEvent event) {
if (event.type == Expose) {
XWindowAttributes attribs;
XGetWindowAttributes(m_display, m_window, &attribs);
m_width = attribs.width;
m_height = attribs.height;
resize();
} else if (event.type == ClientMessage) {
if (event.xclient.data.l[0] == m_atomWmDeleteWindow) {
stop();
}
} else if (event.type == DestroyNotify) {
stop();
}
}
void endofthejedi::GLWindow::swap() { glXSwapBuffers(m_display, m_window); }
void endofthejedi::GLWindow::loop() {
m_running = true;
timespec prev;
clock_gettime(CLOCK_MONOTONIC_RAW, &prev);
timespec current;
clock_gettime(CLOCK_MONOTONIC_RAW, &current);
double delta = 0.0;
while (m_running) {
if (XPending(m_display) > 0) {
XEvent xev;
XNextEvent(m_display, &xev);
handle(xev);
}
render(delta);
swap();
clock_gettime(CLOCK_MONOTONIC_RAW, &current);
delta = diff(prev, current).tv_nsec;
prev = current;
}
}
void endofthejedi::GLWindow::stop() { m_running = false; }
void endofthejedi::GLWindow::init() {}
void endofthejedi::GLWindow::render(double time) { UNUSED(time) }
void endofthejedi::GLWindow::resize() {}

View file

@ -1,20 +0,0 @@
#include "glwindow.h"
void GLWindow::initializeGL()
{
}
void GLWindow::paintGL()
{
}
void GLWindow::resizeGL(int width, int height)
{
}
GLWindow::GLWindow(QWidget* parent)
{
}

View file

@ -1,14 +0,0 @@
#pragma once
#include <QOpenGLWidget>
class GLWindow : public QOpenGLWidget
{
private:
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
public:
explicit GLWindow(QWidget* parent);
};

View file

@ -1,11 +0,0 @@
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}

View file

@ -1,11 +0,0 @@
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
{
Ui::MainWindow::setupUi(this);
}
MainWindow::~MainWindow()
{
}

View file

@ -1,15 +0,0 @@
#pragma once
#include <QMainWindow>
#include <ui_mainwindow.h>
class MainWindow : public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
private:
protected:
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
};

View file

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="GLWindow" name="openGLWidget"/>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>19</height>
</rect>
</property>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>GLWindow</class>
<extends>QOpenGLWidget</extends>
<header>glwindow.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

7
KKK/tests/CMakeLists.txt Normal file
View file

@ -0,0 +1,7 @@
set(TEST_SRC
src/main.cpp
)
add_executable(tests ${TEST_SRC})
setup_target(tests)
target_include_directories(tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Catch/include)

1
KKK/tests/Catch Submodule

@ -0,0 +1 @@
Subproject commit 35f510545d55a831372d3113747bf1314ff4f2ef

2
KKK/tests/src/main.cpp Normal file
View file

@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include <catch.hpp>

BIN
KKK/tests/tests Executable file

Binary file not shown.