init versie
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
QMAKE_CXX.QT_COMPILER_STDCXX = 201703L
|
||||||
|
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 13
|
||||||
|
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
|
||||||
|
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
|
||||||
|
QMAKE_CXX.COMPILER_MACROS = \
|
||||||
|
QT_COMPILER_STDCXX \
|
||||||
|
QMAKE_GCC_MAJOR_VERSION \
|
||||||
|
QMAKE_GCC_MINOR_VERSION \
|
||||||
|
QMAKE_GCC_PATCH_VERSION
|
||||||
|
QMAKE_CXX.INCDIRS = \
|
||||||
|
/usr/include/c++/13 \
|
||||||
|
/usr/include/x86_64-linux-gnu/c++/13 \
|
||||||
|
/usr/include/c++/13/backward \
|
||||||
|
/usr/lib/gcc/x86_64-linux-gnu/13/include \
|
||||||
|
/usr/local/include \
|
||||||
|
/usr/include/x86_64-linux-gnu \
|
||||||
|
/usr/include
|
||||||
|
QMAKE_CXX.LIBDIRS = \
|
||||||
|
/usr/lib/gcc/x86_64-linux-gnu/13 \
|
||||||
|
/usr/lib/x86_64-linux-gnu \
|
||||||
|
/usr/lib \
|
||||||
|
/lib/x86_64-linux-gnu \
|
||||||
|
/lib
|
||||||
@@ -0,0 +1,508 @@
|
|||||||
|
#############################################################################
|
||||||
|
# Makefile for building: tiletest
|
||||||
|
# Generated by qmake (3.1) (Qt 5.15.13)
|
||||||
|
# Project: tiletest.pro
|
||||||
|
# Template: app
|
||||||
|
# Command: /usr/lib/qt5/bin/qmake -o Makefile tiletest.pro
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
MAKEFILE = Makefile
|
||||||
|
|
||||||
|
EQ = =
|
||||||
|
|
||||||
|
####### Compiler, tools and options
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
DEFINES = -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
|
||||||
|
CFLAGS = -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
|
||||||
|
CXXFLAGS = -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
|
||||||
|
INCPATH = -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
|
||||||
|
QMAKE = /usr/lib/qt5/bin/qmake
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
CHK_DIR_EXISTS= test -d
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
COPY = cp -f
|
||||||
|
COPY_FILE = cp -f
|
||||||
|
COPY_DIR = cp -f -R
|
||||||
|
INSTALL_FILE = install -m 644 -p
|
||||||
|
INSTALL_PROGRAM = install -m 755 -p
|
||||||
|
INSTALL_DIR = cp -f -R
|
||||||
|
QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
|
||||||
|
QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
SYMLINK = ln -f -s
|
||||||
|
DEL_DIR = rmdir
|
||||||
|
MOVE = mv -f
|
||||||
|
TAR = tar -cf
|
||||||
|
COMPRESS = gzip -9f
|
||||||
|
DISTNAME = tiletest1.0.0
|
||||||
|
DISTDIR = /home/bart/project/tiletest/.tmp/tiletest1.0.0
|
||||||
|
LINK = g++
|
||||||
|
LFLAGS = -Wl,-O1
|
||||||
|
LIBS = $(SUBLIBS) -L/usr/lib64 -lGLEW -lX11 -lGLU /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread
|
||||||
|
AR = ar cqs
|
||||||
|
RANLIB =
|
||||||
|
SED = sed
|
||||||
|
STRIP = strip
|
||||||
|
|
||||||
|
####### Output directory
|
||||||
|
|
||||||
|
OBJECTS_DIR = ./
|
||||||
|
|
||||||
|
####### Files
|
||||||
|
|
||||||
|
SOURCES = main.cpp \
|
||||||
|
mainwindow.cpp \
|
||||||
|
qscenerenderer.cpp \
|
||||||
|
vertex.cpp \
|
||||||
|
tile.cpp \
|
||||||
|
tilevertexinfo.cpp \
|
||||||
|
face.cpp qrc_shaders.cpp \
|
||||||
|
moc_mainwindow.cpp
|
||||||
|
OBJECTS = main.o \
|
||||||
|
mainwindow.o \
|
||||||
|
qscenerenderer.o \
|
||||||
|
vertex.o \
|
||||||
|
tile.o \
|
||||||
|
tilevertexinfo.o \
|
||||||
|
face.o \
|
||||||
|
qrc_shaders.o \
|
||||||
|
moc_mainwindow.o
|
||||||
|
DIST = shaders/simple.vert \
|
||||||
|
shaders/simple.frag \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigGui.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KService.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWindowSystem.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_script.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_scripttools.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/link_pkgconfig.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
|
||||||
|
tiletest.pro mainwindow.h \
|
||||||
|
qscenerenderer.h \
|
||||||
|
vertex.h \
|
||||||
|
tile.h \
|
||||||
|
terrain.h \
|
||||||
|
tilevertexinfo.h \
|
||||||
|
matrix2d.h \
|
||||||
|
face.h main.cpp \
|
||||||
|
mainwindow.cpp \
|
||||||
|
qscenerenderer.cpp \
|
||||||
|
vertex.cpp \
|
||||||
|
tile.cpp \
|
||||||
|
tilevertexinfo.cpp \
|
||||||
|
face.cpp
|
||||||
|
QMAKE_TARGET = tiletest
|
||||||
|
DESTDIR =
|
||||||
|
TARGET = tiletest
|
||||||
|
|
||||||
|
|
||||||
|
first: all
|
||||||
|
####### Build rules
|
||||||
|
|
||||||
|
tiletest: ui_mainwindow.h $(OBJECTS)
|
||||||
|
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
|
||||||
|
|
||||||
|
Makefile: tiletest.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigGui.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KService.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWindowSystem.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_script.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_scripttools.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/link_pkgconfig.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
|
||||||
|
tiletest.pro \
|
||||||
|
shaders.qrc
|
||||||
|
$(QMAKE) -o Makefile tiletest.pro
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigGui.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KService.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KWindowSystem.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_script.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_scripttools.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/link_pkgconfig.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf:
|
||||||
|
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf:
|
||||||
|
tiletest.pro:
|
||||||
|
shaders.qrc:
|
||||||
|
qmake: FORCE
|
||||||
|
@$(QMAKE) -o Makefile tiletest.pro
|
||||||
|
|
||||||
|
qmake_all: FORCE
|
||||||
|
|
||||||
|
|
||||||
|
all: Makefile tiletest
|
||||||
|
|
||||||
|
dist: distdir FORCE
|
||||||
|
(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
|
||||||
|
|
||||||
|
distdir: FORCE
|
||||||
|
@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
|
||||||
|
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
|
||||||
|
$(COPY_FILE) --parents shaders.qrc $(DISTDIR)/
|
||||||
|
$(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
|
||||||
|
$(COPY_FILE) --parents mainwindow.h qscenerenderer.h vertex.h tile.h terrain.h tilevertexinfo.h matrix2d.h face.h $(DISTDIR)/
|
||||||
|
$(COPY_FILE) --parents main.cpp mainwindow.cpp qscenerenderer.cpp vertex.cpp tile.cpp tilevertexinfo.cpp face.cpp $(DISTDIR)/
|
||||||
|
$(COPY_FILE) --parents mainwindow.ui $(DISTDIR)/
|
||||||
|
|
||||||
|
|
||||||
|
clean: compiler_clean
|
||||||
|
-$(DEL_FILE) $(OBJECTS)
|
||||||
|
-$(DEL_FILE) *~ core *.core
|
||||||
|
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
-$(DEL_FILE) $(TARGET)
|
||||||
|
-$(DEL_FILE) .qmake.stash
|
||||||
|
-$(DEL_FILE) Makefile
|
||||||
|
|
||||||
|
|
||||||
|
####### Sub-libraries
|
||||||
|
|
||||||
|
mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
|
||||||
|
|
||||||
|
mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
|
||||||
|
|
||||||
|
check: first
|
||||||
|
|
||||||
|
benchmark: first
|
||||||
|
|
||||||
|
compiler_rcc_make_all: qrc_shaders.cpp
|
||||||
|
compiler_rcc_clean:
|
||||||
|
-$(DEL_FILE) qrc_shaders.cpp
|
||||||
|
qrc_shaders.cpp: shaders.qrc \
|
||||||
|
/usr/lib/qt5/bin/rcc \
|
||||||
|
shaders/simple.frag \
|
||||||
|
shaders/simple.vert
|
||||||
|
/usr/lib/qt5/bin/rcc -name shaders shaders.qrc -o qrc_shaders.cpp
|
||||||
|
|
||||||
|
compiler_moc_predefs_make_all: moc_predefs.h
|
||||||
|
compiler_moc_predefs_clean:
|
||||||
|
-$(DEL_FILE) moc_predefs.h
|
||||||
|
moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
|
||||||
|
g++ -pipe -O2 -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
|
||||||
|
|
||||||
|
compiler_moc_header_make_all: moc_mainwindow.cpp
|
||||||
|
compiler_moc_header_clean:
|
||||||
|
-$(DEL_FILE) moc_mainwindow.cpp
|
||||||
|
moc_mainwindow.cpp: mainwindow.h \
|
||||||
|
moc_predefs.h \
|
||||||
|
/usr/lib/qt5/bin/moc
|
||||||
|
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/bart/project/tiletest/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/bart/project/tiletest -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/13 -I/usr/include/x86_64-linux-gnu/c++/13 -I/usr/include/c++/13/backward -I/usr/lib/gcc/x86_64-linux-gnu/13/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include mainwindow.h -o moc_mainwindow.cpp
|
||||||
|
|
||||||
|
compiler_moc_objc_header_make_all:
|
||||||
|
compiler_moc_objc_header_clean:
|
||||||
|
compiler_moc_source_make_all:
|
||||||
|
compiler_moc_source_clean:
|
||||||
|
compiler_uic_make_all: ui_mainwindow.h
|
||||||
|
compiler_uic_clean:
|
||||||
|
-$(DEL_FILE) ui_mainwindow.h
|
||||||
|
ui_mainwindow.h: mainwindow.ui \
|
||||||
|
/usr/lib/qt5/bin/uic \
|
||||||
|
qscenerenderer.h \
|
||||||
|
terrain.h \
|
||||||
|
tile.h \
|
||||||
|
vertex.h \
|
||||||
|
face.h \
|
||||||
|
tilevertexinfo.h \
|
||||||
|
matrix2d.h
|
||||||
|
/usr/lib/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h
|
||||||
|
|
||||||
|
compiler_yacc_decl_make_all:
|
||||||
|
compiler_yacc_decl_clean:
|
||||||
|
compiler_yacc_impl_make_all:
|
||||||
|
compiler_yacc_impl_clean:
|
||||||
|
compiler_lex_make_all:
|
||||||
|
compiler_lex_clean:
|
||||||
|
compiler_clean: compiler_rcc_clean compiler_moc_predefs_clean compiler_moc_header_clean compiler_uic_clean
|
||||||
|
|
||||||
|
####### Compile
|
||||||
|
|
||||||
|
main.o: main.cpp mainwindow.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
|
||||||
|
|
||||||
|
mainwindow.o: mainwindow.cpp mainwindow.h \
|
||||||
|
ui_mainwindow.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
|
||||||
|
|
||||||
|
qscenerenderer.o: qscenerenderer.cpp qscenerenderer.h \
|
||||||
|
terrain.h \
|
||||||
|
tile.h \
|
||||||
|
vertex.h \
|
||||||
|
face.h \
|
||||||
|
tilevertexinfo.h \
|
||||||
|
matrix2d.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qscenerenderer.o qscenerenderer.cpp
|
||||||
|
|
||||||
|
vertex.o: vertex.cpp vertex.h \
|
||||||
|
face.h \
|
||||||
|
tilevertexinfo.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o vertex.o vertex.cpp
|
||||||
|
|
||||||
|
tile.o: tile.cpp tile.h \
|
||||||
|
vertex.h \
|
||||||
|
face.h \
|
||||||
|
tilevertexinfo.h \
|
||||||
|
terrain.h \
|
||||||
|
matrix2d.h \
|
||||||
|
qscenerenderer.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tile.o tile.cpp
|
||||||
|
|
||||||
|
tilevertexinfo.o: tilevertexinfo.cpp tilevertexinfo.h \
|
||||||
|
vertex.h \
|
||||||
|
face.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tilevertexinfo.o tilevertexinfo.cpp
|
||||||
|
|
||||||
|
face.o: face.cpp face.h \
|
||||||
|
vertex.h \
|
||||||
|
tilevertexinfo.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o face.o face.cpp
|
||||||
|
|
||||||
|
qrc_shaders.o: qrc_shaders.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_shaders.o qrc_shaders.cpp
|
||||||
|
|
||||||
|
moc_mainwindow.o: moc_mainwindow.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
|
||||||
|
|
||||||
|
####### Install
|
||||||
|
|
||||||
|
install: FORCE
|
||||||
|
|
||||||
|
uninstall: FORCE
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
#include "face.h"
|
||||||
|
|
||||||
|
|
||||||
|
float Face::sign (QVector2D p1, QVector2D p2, QVector2D p3)
|
||||||
|
{
|
||||||
|
return (p1.x() - p3.x()) * (p2.y() - p3.y()) - (p2.x() - p3.x()) * (p1.y() - p3.y());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Face::PointInFace (QVector2D pt)
|
||||||
|
{
|
||||||
|
bool b1, b2, b3;
|
||||||
|
|
||||||
|
//b1 = sign(pt, v1, v2) < 0.0f;
|
||||||
|
//b2 = sign(pt, v2, v3) < 0.0f;
|
||||||
|
// b3 = sign(pt, v3, v1) < 0.0f;
|
||||||
|
|
||||||
|
return ((b1 == b2) && (b2 == b3));
|
||||||
|
}
|
||||||
|
|
||||||
|
Face::Face(Vertex *v1,TileVertexInfo *vi1, Vertex *v2,TileVertexInfo *vi2,Vertex *v3,TileVertexInfo *vi3)
|
||||||
|
{m_subface= NULL;
|
||||||
|
setSettings(v1,vi1,v2,vi2,v3,vi3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Face::setSettings(Vertex *v1, TileVertexInfo *vi1, Vertex *v2, TileVertexInfo *vi2, Vertex *v3, TileVertexInfo *vi3)
|
||||||
|
{
|
||||||
|
m_v1 = v1;
|
||||||
|
m_v2 = v2;
|
||||||
|
m_v3 = v3;
|
||||||
|
m_vi1 = vi1;
|
||||||
|
m_vi2 = vi2;
|
||||||
|
m_vi3 = vi3;
|
||||||
|
recalcNormal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Face::recalcNormal()
|
||||||
|
{
|
||||||
|
QVector3D v1=QVector3D(m_v1->position().x(),m_v1->position().y(),m_vi1->height());
|
||||||
|
QVector3D v2=QVector3D(m_v2->position().x(),m_v2->position().y(),m_vi2->height());
|
||||||
|
QVector3D v3=QVector3D(m_v3->position().x(),m_v3->position().y(),m_vi3->height());
|
||||||
|
|
||||||
|
QVector3D va = v1 - v2;
|
||||||
|
QVector3D vb = v3 - v2;
|
||||||
|
m_normal = QVector3D::crossProduct(va,vb);
|
||||||
|
/*float norm_len = sqrt(dot(norm, norm));
|
||||||
|
norm /= norm_len; */
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector3D Face::normal()
|
||||||
|
{
|
||||||
|
return m_normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Face::findFaces(std::vector<Face *> &vec, QVector2D s)
|
||||||
|
{
|
||||||
|
if (m_subface!=NULL) {
|
||||||
|
for (int i=0; i<4;i++) {
|
||||||
|
m_subface[i].findFaces(vec,s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (
|
||||||
|
((m_v1->position().x() == s.x()) && (m_v1->position().y() == s.y())) ||
|
||||||
|
((m_v2->position().x() == s.x()) && (m_v2->position().y() == s.y())) ||
|
||||||
|
((m_v3->position().x()== s.x()) && (m_v3->position().y() == s.y()))
|
||||||
|
) {
|
||||||
|
vec.push_back(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#ifndef FACE_H
|
||||||
|
#define FACE_H
|
||||||
|
#include "vertex.h"
|
||||||
|
#include "tilevertexinfo.h"
|
||||||
|
#include <QVector3D>
|
||||||
|
class Face;
|
||||||
|
class Vertex;
|
||||||
|
class TileVertexInfo;
|
||||||
|
class Face
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Vertex *m_v1;
|
||||||
|
Vertex *m_v2;
|
||||||
|
Vertex *m_v3;
|
||||||
|
|
||||||
|
TileVertexInfo *m_vi1;
|
||||||
|
TileVertexInfo *m_vi2;
|
||||||
|
TileVertexInfo *m_vi3;
|
||||||
|
|
||||||
|
Face * m_parent;
|
||||||
|
|
||||||
|
QVector3D m_normal;
|
||||||
|
Face * m_subface = NULL;
|
||||||
|
float sign (QVector2D p1, QVector2D p2, QVector2D p3);
|
||||||
|
bool PointInFace (QVector2D pt);
|
||||||
|
|
||||||
|
public:
|
||||||
|
Face () { m_subface= NULL;}
|
||||||
|
Face(Vertex *v1
|
||||||
|
, TileVertexInfo *vi1
|
||||||
|
, Vertex *v2
|
||||||
|
, TileVertexInfo *vi2
|
||||||
|
, Vertex *v3
|
||||||
|
, TileVertexInfo *vi3);
|
||||||
|
|
||||||
|
void setSettings(Vertex *v1
|
||||||
|
, TileVertexInfo *vi1
|
||||||
|
, Vertex *v2
|
||||||
|
, TileVertexInfo *vi2
|
||||||
|
, Vertex *v3
|
||||||
|
, TileVertexInfo *vi3);
|
||||||
|
|
||||||
|
void recalcNormal();
|
||||||
|
QVector3D normal();
|
||||||
|
|
||||||
|
inline TileVertexInfo * getVi1() { return m_vi1; }
|
||||||
|
inline TileVertexInfo * getVi2() { return m_vi2; }
|
||||||
|
inline TileVertexInfo * getVi3() { return m_vi3; }
|
||||||
|
|
||||||
|
void createSub() {
|
||||||
|
m_subface = new Face[4];
|
||||||
|
for (int i=0; i<4;i++) {
|
||||||
|
m_subface[i].setParent(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inline Face &getSub(int nr) { return m_subface[nr]; }
|
||||||
|
inline void setParent(Face *parent) {m_parent = parent;}
|
||||||
|
void findFaces(std::vector<Face *> &vec, QVector2D s);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FACE_H
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 MiB |
@@ -0,0 +1,11 @@
|
|||||||
|
#include "mainwindow.h"
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
MainWindow w;
|
||||||
|
w.show();
|
||||||
|
|
||||||
|
return a.exec();
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
|
QMainWindow(parent),
|
||||||
|
ui(new Ui::MainWindow)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
MainWindow::~MainWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef MAINWINDOW_H
|
||||||
|
#define MAINWINDOW_H
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MainWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MainWindow : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MainWindow(QWidget *parent = 0);
|
||||||
|
~MainWindow();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MainWindow *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MAINWINDOW_H
|
||||||
Binary file not shown.
@@ -0,0 +1,38 @@
|
|||||||
|
<?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>606</width>
|
||||||
|
<height>463</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralWidget">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QSceneRenderer" name="openGLWidget">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>QSceneRenderer</class>
|
||||||
|
<extends>QOpenGLWidget</extends>
|
||||||
|
<header>qscenerenderer.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#include "matrix2d.h"
|
||||||
|
|
||||||
|
Matrix2D::Matrix2D()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#ifndef MATRIX2D_H
|
||||||
|
#define MATRIX2D_H
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class Matrix2D {
|
||||||
|
std::vector<T> data;
|
||||||
|
unsigned int sizeX, sizeY;
|
||||||
|
public:
|
||||||
|
Matrix2D (unsigned int x, unsigned int y)
|
||||||
|
: sizeX (x), sizeY (y) {
|
||||||
|
data.resize (sizeX*sizeY);
|
||||||
|
}
|
||||||
|
|
||||||
|
T& operator()( int x, int y) {
|
||||||
|
if (x >= (int) sizeX )
|
||||||
|
x-= sizeX;
|
||||||
|
if (x < 0 )
|
||||||
|
x+= sizeX;
|
||||||
|
if (y<0) y=0;
|
||||||
|
if (y >= (int) sizeY )
|
||||||
|
y =sizeY-1;
|
||||||
|
//if (y>= sizeY || y<0)
|
||||||
|
// throw std::out_of_range("OOB access"); // Throw something more appropriate
|
||||||
|
return data[sizeX*y + x]; // Stride-aware access
|
||||||
|
}
|
||||||
|
|
||||||
|
T* row(unsigned int y) {
|
||||||
|
if (y >= sizeY) y = sizeY - 1;
|
||||||
|
return &data[sizeX * y];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endif // MATRIX2D_H
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Meta object code from reading C++ file 'mainwindow.h'
|
||||||
|
**
|
||||||
|
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.13)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include <QtCore/qbytearray.h>
|
||||||
|
#include <QtCore/qmetatype.h>
|
||||||
|
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||||
|
#error "The header file 'mainwindow.h' doesn't include <QObject>."
|
||||||
|
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||||
|
#error "This file was generated using the moc from 5.15.13. It"
|
||||||
|
#error "cannot be used with the include files from this version of Qt."
|
||||||
|
#error "(The moc has changed too much.)"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QT_BEGIN_MOC_NAMESPACE
|
||||||
|
QT_WARNING_PUSH
|
||||||
|
QT_WARNING_DISABLE_DEPRECATED
|
||||||
|
struct qt_meta_stringdata_MainWindow_t {
|
||||||
|
QByteArrayData data[1];
|
||||||
|
char stringdata0[11];
|
||||||
|
};
|
||||||
|
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||||
|
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||||
|
qptrdiff(offsetof(qt_meta_stringdata_MainWindow_t, stringdata0) + ofs \
|
||||||
|
- idx * sizeof(QByteArrayData)) \
|
||||||
|
)
|
||||||
|
static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = {
|
||||||
|
{
|
||||||
|
QT_MOC_LITERAL(0, 0, 10) // "MainWindow"
|
||||||
|
|
||||||
|
},
|
||||||
|
"MainWindow"
|
||||||
|
};
|
||||||
|
#undef QT_MOC_LITERAL
|
||||||
|
|
||||||
|
static const uint qt_meta_data_MainWindow[] = {
|
||||||
|
|
||||||
|
// content:
|
||||||
|
8, // revision
|
||||||
|
0, // classname
|
||||||
|
0, 0, // classinfo
|
||||||
|
0, 0, // methods
|
||||||
|
0, 0, // properties
|
||||||
|
0, 0, // enums/sets
|
||||||
|
0, 0, // constructors
|
||||||
|
0, // flags
|
||||||
|
0, // signalCount
|
||||||
|
|
||||||
|
0 // eod
|
||||||
|
};
|
||||||
|
|
||||||
|
void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||||
|
{
|
||||||
|
(void)_o;
|
||||||
|
(void)_id;
|
||||||
|
(void)_c;
|
||||||
|
(void)_a;
|
||||||
|
}
|
||||||
|
|
||||||
|
QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { {
|
||||||
|
QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
|
||||||
|
qt_meta_stringdata_MainWindow.data,
|
||||||
|
qt_meta_data_MainWindow,
|
||||||
|
qt_static_metacall,
|
||||||
|
nullptr,
|
||||||
|
nullptr
|
||||||
|
} };
|
||||||
|
|
||||||
|
|
||||||
|
const QMetaObject *MainWindow::metaObject() const
|
||||||
|
{
|
||||||
|
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *MainWindow::qt_metacast(const char *_clname)
|
||||||
|
{
|
||||||
|
if (!_clname) return nullptr;
|
||||||
|
if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0))
|
||||||
|
return static_cast<void*>(this);
|
||||||
|
return QMainWindow::qt_metacast(_clname);
|
||||||
|
}
|
||||||
|
|
||||||
|
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||||
|
{
|
||||||
|
_id = QMainWindow::qt_metacall(_c, _id, _a);
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
|
QT_WARNING_POP
|
||||||
|
QT_END_MOC_NAMESPACE
|
||||||
Binary file not shown.
+464
@@ -0,0 +1,464 @@
|
|||||||
|
#define __DBL_MIN_EXP__ (-1021)
|
||||||
|
#define __cpp_nontype_template_parameter_auto 201606L
|
||||||
|
#define __UINT_LEAST16_MAX__ 0xffff
|
||||||
|
#define __FLT16_HAS_QUIET_NAN__ 1
|
||||||
|
#define __ATOMIC_ACQUIRE 2
|
||||||
|
#define __FLT128_MAX_10_EXP__ 4932
|
||||||
|
#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
|
||||||
|
#define __GCC_IEC_559_COMPLEX 2
|
||||||
|
#define __cpp_aggregate_nsdmi 201304L
|
||||||
|
#define __UINT_LEAST8_TYPE__ unsigned char
|
||||||
|
#define __SIZEOF_FLOAT80__ 16
|
||||||
|
#define __BFLT16_DENORM_MIN__ 9.18354961579912115600575419704879436e-41BF16
|
||||||
|
#define __INTMAX_C(c) c ## L
|
||||||
|
#define __CHAR_BIT__ 8
|
||||||
|
#define __UINT8_MAX__ 0xff
|
||||||
|
#define __SCHAR_WIDTH__ 8
|
||||||
|
#define __WINT_MAX__ 0xffffffffU
|
||||||
|
#define __FLT32_MIN_EXP__ (-125)
|
||||||
|
#define __cpp_static_assert 201411L
|
||||||
|
#define __BFLT16_MIN_10_EXP__ (-37)
|
||||||
|
#define __ORDER_LITTLE_ENDIAN__ 1234
|
||||||
|
#define __WCHAR_MAX__ 0x7fffffff
|
||||||
|
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
|
||||||
|
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
|
||||||
|
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
|
||||||
|
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
|
||||||
|
#define __GCC_IEC_559 2
|
||||||
|
#define __FLT32X_DECIMAL_DIG__ 17
|
||||||
|
#define __FLT_EVAL_METHOD__ 0
|
||||||
|
#define __cpp_binary_literals 201304L
|
||||||
|
#define __FLT64_DECIMAL_DIG__ 17
|
||||||
|
#define __CET__ 3
|
||||||
|
#define __cpp_noexcept_function_type 201510L
|
||||||
|
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
|
||||||
|
#define __cpp_variadic_templates 200704L
|
||||||
|
#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __SIG_ATOMIC_TYPE__ int
|
||||||
|
#define __DBL_MIN_10_EXP__ (-307)
|
||||||
|
#define __FINITE_MATH_ONLY__ 0
|
||||||
|
#define __cpp_variable_templates 201304L
|
||||||
|
#define __FLT32X_MAX_EXP__ 1024
|
||||||
|
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
|
||||||
|
#define __FLT32_HAS_DENORM__ 1
|
||||||
|
#define __UINT_FAST8_MAX__ 0xff
|
||||||
|
#define __cpp_rvalue_reference 200610L
|
||||||
|
#define __cpp_nested_namespace_definitions 201411L
|
||||||
|
#define __DEC64_MAX_EXP__ 385
|
||||||
|
#define __INT8_C(c) c
|
||||||
|
#define __LDBL_HAS_INFINITY__ 1
|
||||||
|
#define __INT_LEAST8_WIDTH__ 8
|
||||||
|
#define __cpp_variadic_using 201611L
|
||||||
|
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __INT_LEAST8_MAX__ 0x7f
|
||||||
|
#define __cpp_attributes 200809L
|
||||||
|
#define __cpp_capture_star_this 201603L
|
||||||
|
#define __SHRT_MAX__ 0x7fff
|
||||||
|
#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
|
||||||
|
#define __FLT64X_MAX_10_EXP__ 4932
|
||||||
|
#define __cpp_if_constexpr 201606L
|
||||||
|
#define __BFLT16_MAX_10_EXP__ 38
|
||||||
|
#define __BFLT16_MAX_EXP__ 128
|
||||||
|
#define __LDBL_IS_IEC_60559__ 1
|
||||||
|
#define __FLT64X_HAS_QUIET_NAN__ 1
|
||||||
|
#define __UINT_LEAST8_MAX__ 0xff
|
||||||
|
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
|
||||||
|
#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
|
||||||
|
#define __UINTMAX_TYPE__ long unsigned int
|
||||||
|
#define __cpp_nsdmi 200809L
|
||||||
|
#define __BFLT16_DECIMAL_DIG__ 4
|
||||||
|
#define __linux 1
|
||||||
|
#define __DEC32_EPSILON__ 1E-6DF
|
||||||
|
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
|
||||||
|
#define __OPTIMIZE__ 1
|
||||||
|
#define __UINT32_MAX__ 0xffffffffU
|
||||||
|
#define __GXX_EXPERIMENTAL_CXX0X__ 1
|
||||||
|
#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
|
||||||
|
#define __FLT128_MIN_EXP__ (-16381)
|
||||||
|
#define __WINT_MIN__ 0U
|
||||||
|
#define __FLT128_MIN_10_EXP__ (-4931)
|
||||||
|
#define __FLT32X_IS_IEC_60559__ 1
|
||||||
|
#define __INT_LEAST16_WIDTH__ 16
|
||||||
|
#define __SCHAR_MAX__ 0x7f
|
||||||
|
#define __FLT128_MANT_DIG__ 113
|
||||||
|
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
|
||||||
|
#define __INT64_C(c) c ## L
|
||||||
|
#define __SSP_STRONG__ 3
|
||||||
|
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
|
||||||
|
#define __ATOMIC_SEQ_CST 5
|
||||||
|
#define _FORTIFY_SOURCE 3
|
||||||
|
#define __unix 1
|
||||||
|
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __FLT32X_MANT_DIG__ 53
|
||||||
|
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
|
||||||
|
#define __cpp_aligned_new 201606L
|
||||||
|
#define __FLT32_MAX_10_EXP__ 38
|
||||||
|
#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
|
||||||
|
#define __STDC_HOSTED__ 1
|
||||||
|
#define __DEC64_MIN_EXP__ (-382)
|
||||||
|
#define __cpp_decltype_auto 201304L
|
||||||
|
#define __DBL_DIG__ 15
|
||||||
|
#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
|
||||||
|
#define __GXX_WEAK__ 1
|
||||||
|
#define __SHRT_WIDTH__ 16
|
||||||
|
#define __FLT32_IS_IEC_60559__ 1
|
||||||
|
#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
|
||||||
|
#define __DBL_IS_IEC_60559__ 1
|
||||||
|
#define __DEC32_MAX__ 9.999999E96DF
|
||||||
|
#define __cpp_threadsafe_static_init 200806L
|
||||||
|
#define __cpp_enumerator_attributes 201411L
|
||||||
|
#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
|
||||||
|
#define __FLT32X_HAS_INFINITY__ 1
|
||||||
|
#define __unix__ 1
|
||||||
|
#define __INT_WIDTH__ 32
|
||||||
|
#define __STDC_IEC_559__ 1
|
||||||
|
#define __STDC_ISO_10646__ 201706L
|
||||||
|
#define __DECIMAL_DIG__ 21
|
||||||
|
#define __STDC_IEC_559_COMPLEX__ 1
|
||||||
|
#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
|
||||||
|
#define __gnu_linux__ 1
|
||||||
|
#define __INT16_MAX__ 0x7fff
|
||||||
|
#define __FLT64_MIN_EXP__ (-1021)
|
||||||
|
#define __FLT64X_MIN_10_EXP__ (-4931)
|
||||||
|
#define __LDBL_HAS_QUIET_NAN__ 1
|
||||||
|
#define __cpp_return_type_deduction 201304L
|
||||||
|
#define __FLT16_MIN_EXP__ (-13)
|
||||||
|
#define __FLT64_MANT_DIG__ 53
|
||||||
|
#define __FLT64X_MANT_DIG__ 64
|
||||||
|
#define __BFLT16_DIG__ 2
|
||||||
|
#define __GNUC__ 13
|
||||||
|
#define __GXX_RTTI 1
|
||||||
|
#define __pie__ 2
|
||||||
|
#define __MMX__ 1
|
||||||
|
#define __FLT_HAS_DENORM__ 1
|
||||||
|
#define __SIZEOF_LONG_DOUBLE__ 16
|
||||||
|
#define __BIGGEST_ALIGNMENT__ 16
|
||||||
|
#define __STDC_UTF_16__ 1
|
||||||
|
#define __FLT64_MAX_10_EXP__ 308
|
||||||
|
#define __BFLT16_IS_IEC_60559__ 0
|
||||||
|
#define __FLT16_MAX_10_EXP__ 4
|
||||||
|
#define __cpp_delegating_constructors 200604L
|
||||||
|
#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L)
|
||||||
|
#define __cpp_raw_strings 200710L
|
||||||
|
#define __INT_FAST32_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __DBL_HAS_INFINITY__ 1
|
||||||
|
#define __INT64_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __SIZEOF_FLOAT__ 4
|
||||||
|
#define __HAVE_SPECULATION_SAFE_VALUE 1
|
||||||
|
#define __cpp_fold_expressions 201603L
|
||||||
|
#define __DEC32_MIN_EXP__ (-94)
|
||||||
|
#define __INTPTR_WIDTH__ 64
|
||||||
|
#define __UINT_LEAST32_MAX__ 0xffffffffU
|
||||||
|
#define __FLT32X_HAS_DENORM__ 1
|
||||||
|
#define __INT_FAST16_TYPE__ long int
|
||||||
|
#define __MMX_WITH_SSE__ 1
|
||||||
|
#define __LDBL_HAS_DENORM__ 1
|
||||||
|
#define __SEG_GS 1
|
||||||
|
#define __BFLT16_EPSILON__ 7.81250000000000000000000000000000000e-3BF16
|
||||||
|
#define __cplusplus 201703L
|
||||||
|
#define __cpp_ref_qualifiers 200710L
|
||||||
|
#define __DEC32_MIN__ 1E-95DF
|
||||||
|
#define __DEPRECATED 1
|
||||||
|
#define __cpp_rvalue_references 200610L
|
||||||
|
#define __DBL_MAX_EXP__ 1024
|
||||||
|
#define __WCHAR_WIDTH__ 32
|
||||||
|
#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
|
||||||
|
#define __DEC128_EPSILON__ 1E-33DL
|
||||||
|
#define __FLT16_DECIMAL_DIG__ 5
|
||||||
|
#define __SSE2_MATH__ 1
|
||||||
|
#define __ATOMIC_HLE_RELEASE 131072
|
||||||
|
#define __PTRDIFF_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __amd64 1
|
||||||
|
#define __ATOMIC_HLE_ACQUIRE 65536
|
||||||
|
#define __GNUG__ 13
|
||||||
|
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
|
||||||
|
#define __SIZEOF_SIZE_T__ 8
|
||||||
|
#define __BFLT16_HAS_INFINITY__ 1
|
||||||
|
#define __FLT64X_MIN_EXP__ (-16381)
|
||||||
|
#define __SIZEOF_WINT_T__ 4
|
||||||
|
#define __FLT32X_DIG__ 15
|
||||||
|
#define __LONG_LONG_WIDTH__ 64
|
||||||
|
#define __cpp_initializer_lists 200806L
|
||||||
|
#define __FLT32_MAX_EXP__ 128
|
||||||
|
#define __cpp_hex_float 201603L
|
||||||
|
#define __GXX_ABI_VERSION 1018
|
||||||
|
#define __FLT_MIN_EXP__ (-125)
|
||||||
|
#define __GCC_HAVE_DWARF2_CFI_ASM 1
|
||||||
|
#define __x86_64 1
|
||||||
|
#define __cpp_lambdas 200907L
|
||||||
|
#define __INT_FAST64_TYPE__ long int
|
||||||
|
#define __BFLT16_MAX__ 3.38953138925153547590470800371487867e+38BF16
|
||||||
|
#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
|
||||||
|
#define __cpp_template_auto 201606L
|
||||||
|
#define __FLT16_DENORM_MIN__ 5.96046447753906250000000000000000000e-8F16
|
||||||
|
#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
|
||||||
|
#define __FLT64X_NORM_MAX__ 1.18973149535723176502126385303097021e+4932F64x
|
||||||
|
#define __SIZEOF_POINTER__ 8
|
||||||
|
#define __SIZE_TYPE__ long unsigned int
|
||||||
|
#define __LP64__ 1
|
||||||
|
#define __DBL_HAS_QUIET_NAN__ 1
|
||||||
|
#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
|
||||||
|
#define __LDBL_MAX_EXP__ 16384
|
||||||
|
#define __DECIMAL_BID_FORMAT__ 1
|
||||||
|
#define __FLT64_MIN_10_EXP__ (-307)
|
||||||
|
#define __FLT16_MIN_10_EXP__ (-4)
|
||||||
|
#define __FLT64X_DECIMAL_DIG__ 21
|
||||||
|
#define __DEC128_MIN__ 1E-6143DL
|
||||||
|
#define __REGISTER_PREFIX__
|
||||||
|
#define __UINT16_MAX__ 0xffff
|
||||||
|
#define __FLT128_HAS_INFINITY__ 1
|
||||||
|
#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
|
||||||
|
#define __UINT8_TYPE__ unsigned char
|
||||||
|
#define __FLT_DIG__ 6
|
||||||
|
#define __DEC_EVAL_METHOD__ 2
|
||||||
|
#define __FLT_MANT_DIG__ 24
|
||||||
|
#define __LDBL_DECIMAL_DIG__ 21
|
||||||
|
#define __VERSION__ "13.3.0"
|
||||||
|
#define __UINT64_C(c) c ## UL
|
||||||
|
#define __cpp_unicode_characters 201411L
|
||||||
|
#define _STDC_PREDEF_H 1
|
||||||
|
#define __INT_LEAST32_MAX__ 0x7fffffff
|
||||||
|
#define __GCC_ATOMIC_INT_LOCK_FREE 2
|
||||||
|
#define __FLT128_MAX_EXP__ 16384
|
||||||
|
#define __FLT32_MANT_DIG__ 24
|
||||||
|
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
|
||||||
|
#define __FLT32X_MIN_EXP__ (-1021)
|
||||||
|
#define __STDC_IEC_60559_COMPLEX__ 201404L
|
||||||
|
#define __cpp_aggregate_bases 201603L
|
||||||
|
#define __BFLT16_MIN__ 1.17549435082228750796873653722224568e-38BF16
|
||||||
|
#define __FLT128_HAS_DENORM__ 1
|
||||||
|
#define __FLT32_DECIMAL_DIG__ 9
|
||||||
|
#define __FLT128_DIG__ 33
|
||||||
|
#define __INT32_C(c) c
|
||||||
|
#define __DEC64_EPSILON__ 1E-15DD
|
||||||
|
#define __ORDER_PDP_ENDIAN__ 3412
|
||||||
|
#define __DEC128_MIN_EXP__ (-6142)
|
||||||
|
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
|
||||||
|
#define __INT_FAST32_TYPE__ long int
|
||||||
|
#define __UINT_LEAST16_TYPE__ short unsigned int
|
||||||
|
#define __DEC128_MAX_EXP__ 6145
|
||||||
|
#define unix 1
|
||||||
|
#define __DBL_HAS_DENORM__ 1
|
||||||
|
#define __cpp_rtti 199711L
|
||||||
|
#define __UINT64_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __FLT_IS_IEC_60559__ 1
|
||||||
|
#define __GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
|
||||||
|
#define __FLT64X_DIG__ 18
|
||||||
|
#define __INT8_TYPE__ signed char
|
||||||
|
#define __cpp_digit_separators 201309L
|
||||||
|
#define __ELF__ 1
|
||||||
|
#define __GCC_ASM_FLAG_OUTPUTS__ 1
|
||||||
|
#define __UINT32_TYPE__ unsigned int
|
||||||
|
#define __BFLT16_HAS_QUIET_NAN__ 1
|
||||||
|
#define __FLT_RADIX__ 2
|
||||||
|
#define __INT_LEAST16_TYPE__ short int
|
||||||
|
#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
|
||||||
|
#define __UINTMAX_C(c) c ## UL
|
||||||
|
#define __FLT16_DIG__ 3
|
||||||
|
#define __k8 1
|
||||||
|
#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
|
||||||
|
#define __SIG_ATOMIC_MAX__ 0x7fffffff
|
||||||
|
#define __cpp_constexpr 201603L
|
||||||
|
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
|
||||||
|
#define __USER_LABEL_PREFIX__
|
||||||
|
#define __STDC_IEC_60559_BFP__ 201404L
|
||||||
|
#define __SIZEOF_PTRDIFF_T__ 8
|
||||||
|
#define __FLT64X_HAS_INFINITY__ 1
|
||||||
|
#define __SIZEOF_LONG__ 8
|
||||||
|
#define __LDBL_DIG__ 18
|
||||||
|
#define __FLT64_IS_IEC_60559__ 1
|
||||||
|
#define __x86_64__ 1
|
||||||
|
#define __FLT16_IS_IEC_60559__ 1
|
||||||
|
#define __FLT16_MAX_EXP__ 16
|
||||||
|
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
|
||||||
|
#define __INT_FAST16_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __GCC_CONSTRUCTIVE_SIZE 64
|
||||||
|
#define __FLT64_DIG__ 15
|
||||||
|
#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __UINT_LEAST64_TYPE__ long unsigned int
|
||||||
|
#define __FLT16_EPSILON__ 9.76562500000000000000000000000000000e-4F16
|
||||||
|
#define __FLT_HAS_QUIET_NAN__ 1
|
||||||
|
#define __FLT_MAX_10_EXP__ 38
|
||||||
|
#define __LONG_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __FLT64X_HAS_DENORM__ 1
|
||||||
|
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
|
||||||
|
#define __FLT_HAS_INFINITY__ 1
|
||||||
|
#define __GNUC_EXECUTION_CHARSET_NAME "UTF-8"
|
||||||
|
#define __cpp_unicode_literals 200710L
|
||||||
|
#define __UINT_FAST16_TYPE__ long unsigned int
|
||||||
|
#define __DEC64_MAX__ 9.999999999999999E384DD
|
||||||
|
#define __INT_FAST32_WIDTH__ 64
|
||||||
|
#define __CHAR16_TYPE__ short unsigned int
|
||||||
|
#define __PRAGMA_REDEFINE_EXTNAME 1
|
||||||
|
#define __SIZE_WIDTH__ 64
|
||||||
|
#define __SEG_FS 1
|
||||||
|
#define __INT_LEAST16_MAX__ 0x7fff
|
||||||
|
#define __FLT16_NORM_MAX__ 6.55040000000000000000000000000000000e+4F16
|
||||||
|
#define __DEC64_MANT_DIG__ 16
|
||||||
|
#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
|
||||||
|
#define __SIG_ATOMIC_WIDTH__ 32
|
||||||
|
#define __INT_LEAST64_TYPE__ long int
|
||||||
|
#define __INT16_TYPE__ short int
|
||||||
|
#define __INT_LEAST8_TYPE__ signed char
|
||||||
|
#define __FLT16_MAX__ 6.55040000000000000000000000000000000e+4F16
|
||||||
|
#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
|
||||||
|
#define __cpp_structured_bindings 201606L
|
||||||
|
#define __SIZEOF_INT__ 4
|
||||||
|
#define __DEC32_MAX_EXP__ 97
|
||||||
|
#define __INT_FAST8_MAX__ 0x7f
|
||||||
|
#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
|
||||||
|
#define __INTPTR_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __cpp_sized_deallocation 201309L
|
||||||
|
#define __cpp_guaranteed_copy_elision 201606L
|
||||||
|
#define linux 1
|
||||||
|
#define __FLT64_HAS_QUIET_NAN__ 1
|
||||||
|
#define __FLT32_MIN_10_EXP__ (-37)
|
||||||
|
#define __EXCEPTIONS 1
|
||||||
|
#define __UINT16_C(c) c
|
||||||
|
#define __PTRDIFF_WIDTH__ 64
|
||||||
|
#define __LDBL_MANT_DIG__ 64
|
||||||
|
#define __cpp_range_based_for 201603L
|
||||||
|
#define __INT_FAST16_WIDTH__ 64
|
||||||
|
#define __FLT64_HAS_INFINITY__ 1
|
||||||
|
#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
|
||||||
|
#define __FLT16_HAS_INFINITY__ 1
|
||||||
|
#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16
|
||||||
|
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
|
||||||
|
#define __code_model_small__ 1
|
||||||
|
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
|
||||||
|
#define __cpp_nontype_template_args 201411L
|
||||||
|
#define __DEC32_MANT_DIG__ 7
|
||||||
|
#define __k8__ 1
|
||||||
|
#define __INTPTR_TYPE__ long int
|
||||||
|
#define __UINT16_TYPE__ short unsigned int
|
||||||
|
#define __WCHAR_TYPE__ int
|
||||||
|
#define __pic__ 2
|
||||||
|
#define __UINTPTR_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __INT_FAST64_WIDTH__ 64
|
||||||
|
#define __cpp_decltype 200707L
|
||||||
|
#define __INT_FAST64_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
|
||||||
|
#define __FLT_NORM_MAX__ 3.40282346638528859811704183484516925e+38F
|
||||||
|
#define __FLT32_HAS_INFINITY__ 1
|
||||||
|
#define __FLT64X_MAX_EXP__ 16384
|
||||||
|
#define __UINT_FAST64_TYPE__ long unsigned int
|
||||||
|
#define __cpp_inline_variables 201606L
|
||||||
|
#define __BFLT16_MIN_EXP__ (-125)
|
||||||
|
#define __INT_MAX__ 0x7fffffff
|
||||||
|
#define __linux__ 1
|
||||||
|
#define __INT64_TYPE__ long int
|
||||||
|
#define __FLT_MAX_EXP__ 128
|
||||||
|
#define __ORDER_BIG_ENDIAN__ 4321
|
||||||
|
#define __DBL_MANT_DIG__ 53
|
||||||
|
#define __cpp_inheriting_constructors 201511L
|
||||||
|
#define __SIZEOF_FLOAT128__ 16
|
||||||
|
#define __BFLT16_MANT_DIG__ 8
|
||||||
|
#define __DEC64_MIN__ 1E-383DD
|
||||||
|
#define __WINT_TYPE__ unsigned int
|
||||||
|
#define __UINT_LEAST32_TYPE__ unsigned int
|
||||||
|
#define __SIZEOF_SHORT__ 2
|
||||||
|
#define __FLT32_NORM_MAX__ 3.40282346638528859811704183484516925e+38F32
|
||||||
|
#define __SSE__ 1
|
||||||
|
#define __LDBL_MIN_EXP__ (-16381)
|
||||||
|
#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
|
||||||
|
#define __amd64__ 1
|
||||||
|
#define __WINT_WIDTH__ 32
|
||||||
|
#define __INT_LEAST64_WIDTH__ 64
|
||||||
|
#define __FLT32X_MAX_10_EXP__ 308
|
||||||
|
#define __cpp_namespace_attributes 201411L
|
||||||
|
#define __SIZEOF_INT128__ 16
|
||||||
|
#define __FLT16_MIN__ 6.10351562500000000000000000000000000e-5F16
|
||||||
|
#define __FLT64X_IS_IEC_60559__ 1
|
||||||
|
#define __LDBL_MAX_10_EXP__ 4932
|
||||||
|
#define __ATOMIC_RELAXED 0
|
||||||
|
#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
|
||||||
|
#define __INT_LEAST32_TYPE__ int
|
||||||
|
#define _LP64 1
|
||||||
|
#define __UINT8_C(c) c
|
||||||
|
#define __FLT64_MAX_EXP__ 1024
|
||||||
|
#define __SIZEOF_WCHAR_T__ 4
|
||||||
|
#define __GNUC_PATCHLEVEL__ 0
|
||||||
|
#define __FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128
|
||||||
|
#define __FLT64_NORM_MAX__ 1.79769313486231570814527423731704357e+308F64
|
||||||
|
#define __FLT128_HAS_QUIET_NAN__ 1
|
||||||
|
#define __INTMAX_MAX__ 0x7fffffffffffffffL
|
||||||
|
#define __INT_FAST8_TYPE__ signed char
|
||||||
|
#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
|
||||||
|
#define __STDCPP_THREADS__ 1
|
||||||
|
#define __BFLT16_HAS_DENORM__ 1
|
||||||
|
#define __GNUC_STDC_INLINE__ 1
|
||||||
|
#define __FLT64_HAS_DENORM__ 1
|
||||||
|
#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
|
||||||
|
#define __FLT16_HAS_DENORM__ 1
|
||||||
|
#define __DBL_DECIMAL_DIG__ 17
|
||||||
|
#define __STDC_UTF_32__ 1
|
||||||
|
#define __INT_FAST8_WIDTH__ 8
|
||||||
|
#define __FXSR__ 1
|
||||||
|
#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
|
||||||
|
#define __DBL_NORM_MAX__ double(1.79769313486231570814527423731704357e+308L)
|
||||||
|
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
|
||||||
|
#define __GCC_DESTRUCTIVE_SIZE 64
|
||||||
|
#define __INTMAX_WIDTH__ 64
|
||||||
|
#define __cpp_runtime_arrays 198712L
|
||||||
|
#define __FLT32_DIG__ 6
|
||||||
|
#define __UINT64_TYPE__ long unsigned int
|
||||||
|
#define __UINT32_C(c) c ## U
|
||||||
|
#define __cpp_alias_templates 200704L
|
||||||
|
#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
|
||||||
|
#define __FLT128_IS_IEC_60559__ 1
|
||||||
|
#define __INT8_MAX__ 0x7f
|
||||||
|
#define __LONG_WIDTH__ 64
|
||||||
|
#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
|
||||||
|
#define __PIC__ 2
|
||||||
|
#define __INT32_MAX__ 0x7fffffff
|
||||||
|
#define __UINT_FAST32_TYPE__ long unsigned int
|
||||||
|
#define __FLT16_MANT_DIG__ 11
|
||||||
|
#define __FLT32X_NORM_MAX__ 1.79769313486231570814527423731704357e+308F32x
|
||||||
|
#define __CHAR32_TYPE__ unsigned int
|
||||||
|
#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
|
||||||
|
#define __SSE2__ 1
|
||||||
|
#define __cpp_deduction_guides 201703L
|
||||||
|
#define __BFLT16_NORM_MAX__ 3.38953138925153547590470800371487867e+38BF16
|
||||||
|
#define __INT32_TYPE__ int
|
||||||
|
#define __SIZEOF_DOUBLE__ 8
|
||||||
|
#define __cpp_exceptions 199711L
|
||||||
|
#define __FLT_MIN_10_EXP__ (-37)
|
||||||
|
#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
|
||||||
|
#define __INT_LEAST32_WIDTH__ 32
|
||||||
|
#define __INTMAX_TYPE__ long int
|
||||||
|
#define __GLIBCXX_BITSIZE_INT_N_0 128
|
||||||
|
#define __FLT32X_HAS_QUIET_NAN__ 1
|
||||||
|
#define __ATOMIC_CONSUME 1
|
||||||
|
#define __GNUC_MINOR__ 3
|
||||||
|
#define __GLIBCXX_TYPE_INT_N_0 __int128
|
||||||
|
#define __UINTMAX_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __PIE__ 2
|
||||||
|
#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
|
||||||
|
#define __cpp_template_template_args 201611L
|
||||||
|
#define __DBL_MAX_10_EXP__ 308
|
||||||
|
#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
|
||||||
|
#define __INT16_C(c) c
|
||||||
|
#define __STDC__ 1
|
||||||
|
#define __PTRDIFF_TYPE__ long int
|
||||||
|
#define __FLT32X_MIN_10_EXP__ (-307)
|
||||||
|
#define __UINTPTR_TYPE__ long unsigned int
|
||||||
|
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
|
||||||
|
#define __DEC128_MANT_DIG__ 34
|
||||||
|
#define __LDBL_MIN_10_EXP__ (-4931)
|
||||||
|
#define __cpp_generic_lambdas 201304L
|
||||||
|
#define __SSE_MATH__ 1
|
||||||
|
#define __SIZEOF_LONG_LONG__ 8
|
||||||
|
#define __cpp_user_defined_literals 200809L
|
||||||
|
#define __FLT128_DECIMAL_DIG__ 36
|
||||||
|
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
|
||||||
|
#define __FLT32_HAS_QUIET_NAN__ 1
|
||||||
|
#define __FLT_DECIMAL_DIG__ 9
|
||||||
|
#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __LDBL_NORM_MAX__ 1.18973149535723176502126385303097021e+4932L
|
||||||
|
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
|
||||||
|
#define __SIZE_MAX__ 0xffffffffffffffffUL
|
||||||
|
#define __UINT_FAST8_TYPE__ unsigned char
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
#define __cpp_init_captures 201304L
|
||||||
|
#define __ATOMIC_ACQ_REL 4
|
||||||
|
#define __ATOMIC_RELEASE 3
|
||||||
+327
@@ -0,0 +1,327 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Resource object code
|
||||||
|
**
|
||||||
|
** Created by: The Resource Compiler for Qt version 5.15.13
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
static const unsigned char qt_resource_data[] = {
|
||||||
|
// /home/bart/project/tiletest/shaders/simple.frag
|
||||||
|
0x0,0x0,0xa,0x2f,
|
||||||
|
0x23,
|
||||||
|
0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x30,0x30,0xa,0x75,0x6e,0x69,0x66,
|
||||||
|
0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,
|
||||||
|
0x78,0x3b,0x20,0x2f,0x2f,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x74,0x68,0x65,
|
||||||
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0xa,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
||||||
|
0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x62,0x6f,0x72,0x64,0x65,
|
||||||
|
0x72,0x3b,0x20,0x2f,0x2f,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x74,0x68,0x65,
|
||||||
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0xa,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
||||||
|
0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x72,0x6f,0x63,0x6b,0x3b,
|
||||||
|
0x20,0x2f,0x2f,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x74,
|
||||||
|
0x65,0x78,0x74,0x75,0x72,0x65,0xa,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x20,0x69,0x6e,
|
||||||
|
0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0xa,0x73,
|
||||||
|
0x6d,0x6f,0x6f,0x74,0x68,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x57,
|
||||||
|
0x6f,0x72,0x6c,0x64,0x50,0x6f,0x73,0x3b,0xa,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,
|
||||||
|
0x20,0x66,0x72,0x61,0x67,0x56,0x65,0x72,0x74,0x3b,0xa,0x69,0x6e,0x20,0x66,0x6c,
|
||||||
|
0x6f,0x61,0x74,0x20,0x7a,0x5f,0x70,0x6f,0x73,0x3b,0xa,0x75,0x6e,0x69,0x66,0x6f,
|
||||||
|
0x72,0x6d,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x61,0x6d,0x65,0x72,0x61,0x50,0x6f,
|
||||||
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0xa,0xa,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
||||||
|
0x20,0x6d,0x61,0x74,0x34,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,0x72,0x69,
|
||||||
|
0x78,0x3b,0xa,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x74,0x69,0x6c,0x65,0x50,
|
||||||
|
0x6f,0x73,0x3b,0xa,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x66,0x72,0x61,0x67,
|
||||||
|
0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,0x3b,0x20,0x2f,0x2f,0x74,0x68,0x69,0x73,
|
||||||
|
0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x20,
|
||||||
|
0x63,0x6f,0x6f,0x72,0x64,0xa,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,
|
||||||
|
0x69,0x6e,0x61,0x6c,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x20,0x2f,0x2f,0x74,0x68,0x69,
|
||||||
|
0x73,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,
|
||||||
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x70,0x69,0x78,
|
||||||
|
0x65,0x6c,0xa,0xa,0xa,0xa,0xa,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x69,
|
||||||
|
0x6d,0x70,0x6c,0x65,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x4c,
|
||||||
|
0x69,0x67,0x68,0x74,0xa,0x7b,0xa,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
|
||||||
|
0x43,0x6f,0x6c,0x6f,0x72,0x3b,0xa,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
|
||||||
|
0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x3b,0xa,0x20,0x20,0x20,0x66,0x6c,
|
||||||
|
0x6f,0x61,0x74,0x20,0x66,0x41,0x6d,0x62,0x69,0x65,0x6e,0x74,0x49,0x6e,0x74,0x65,
|
||||||
|
0x6e,0x73,0x69,0x74,0x79,0x3b,0xa,0x7d,0x3b,0xa,0xa,0xa,0xa,0x75,0x6e,0x69,
|
||||||
|
0x66,0x6f,0x72,0x6d,0x20,0x53,0x69,0x6d,0x70,0x6c,0x65,0x44,0x69,0x72,0x65,0x63,
|
||||||
|
0x74,0x69,0x6f,0x6e,0x61,0x6c,0x4c,0x69,0x67,0x68,0x74,0x20,0x73,0x75,0x6e,0x4c,
|
||||||
|
0x69,0x67,0x68,0x74,0x3b,0xa,0xa,0x76,0x65,0x63,0x34,0x20,0x47,0x65,0x74,0x44,
|
||||||
|
0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x4c,0x69,0x67,0x68,0x74,0x43,
|
||||||
|
0x6f,0x6c,0x6f,0x72,0x28,0x53,0x69,0x6d,0x70,0x6c,0x65,0x44,0x69,0x72,0x65,0x63,
|
||||||
|
0x74,0x69,0x6f,0x6e,0x61,0x6c,0x4c,0x69,0x67,0x68,0x74,0x20,0x64,0x69,0x72,0x4c,
|
||||||
|
0x69,0x67,0x68,0x74,0x2c,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x4e,0x6f,0x72,0x6d,
|
||||||
|
0x61,0x6c,0x29,0xa,0x7b,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,
|
||||||
|
0x6f,0x61,0x74,0x20,0x66,0x44,0x69,0x66,0x66,0x75,0x73,0x65,0x49,0x6e,0x74,0x65,
|
||||||
|
0x6e,0x73,0x69,0x74,0x79,0x20,0x3d,0x20,0x20,0x64,0x6f,0x74,0x28,0x76,0x4e,0x6f,
|
||||||
|
0x72,0x6d,0x61,0x6c,0x2c,0x20,0x2d,0x64,0x69,0x72,0x4c,0x69,0x67,0x68,0x74,0x2e,
|
||||||
|
0x76,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x29,0x3b,0xa,0x20,0x20,0x20,
|
||||||
|
0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x66,0x4d,0x75,0x6c,0x74,
|
||||||
|
0x20,0x3d,0x20,0x70,0x6f,0x77,0x28,0x64,0x69,0x72,0x4c,0x69,0x67,0x68,0x74,0x2e,
|
||||||
|
0x66,0x41,0x6d,0x62,0x69,0x65,0x6e,0x74,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,
|
||||||
|
0x79,0x2b,0x66,0x44,0x69,0x66,0x66,0x75,0x73,0x65,0x49,0x6e,0x74,0x65,0x6e,0x73,
|
||||||
|
0x69,0x74,0x79,0x2c,0x31,0x2e,0x30,0x29,0x3b,0x2f,0x2f,0x63,0x6c,0x61,0x6d,0x70,
|
||||||
|
0x28,0x64,0x69,0x72,0x4c,0x69,0x67,0x68,0x74,0x2e,0x66,0x41,0x6d,0x62,0x69,0x65,
|
||||||
|
0x6e,0x74,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2b,0x66,0x44,0x69,0x66,
|
||||||
|
0x66,0x75,0x73,0x65,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x2d,
|
||||||
|
0x31,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,0x20,0x20,0x2f,0x2f,0x20,
|
||||||
|
0x69,0x66,0x28,0x64,0x69,0x72,0x4c,0x69,0x67,0x68,0x74,0x2e,0x69,0x53,0x6b,0x79,
|
||||||
|
0x62,0x6f,0x78,0x20,0x3d,0x3d,0x20,0x31,0x29,0x66,0x4d,0x75,0x6c,0x74,0x20,0x3d,
|
||||||
|
0x20,0x64,0x69,0x72,0x4c,0x69,0x67,0x68,0x74,0x2e,0x66,0x41,0x6d,0x62,0x69,0x65,
|
||||||
|
0x6e,0x74,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0xa,0x20,0x20,0x20,
|
||||||
|
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x34,
|
||||||
|
0x28,0x64,0x69,0x72,0x4c,0x69,0x67,0x68,0x74,0x2e,0x76,0x43,0x6f,0x6c,0x6f,0x72,
|
||||||
|
0x2a,0x66,0x4d,0x75,0x6c,0x74,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,0x7d,0xa,
|
||||||
|
0xa,0x76,0x65,0x63,0x34,0x20,0x47,0x65,0x74,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,
|
||||||
|
0x72,0x43,0x6f,0x6c,0x6f,0x72,0x28,0x76,0x65,0x63,0x33,0x20,0x76,0x57,0x6f,0x72,
|
||||||
|
0x6c,0x64,0x50,0x6f,0x73,0x2c,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x45,0x79,0x65,
|
||||||
|
0x50,0x6f,0x73,0x2c,0x20,0x20,0x53,0x69,0x6d,0x70,0x6c,0x65,0x44,0x69,0x72,0x65,
|
||||||
|
0x63,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x4c,0x69,0x67,0x68,0x74,0x20,0x64,0x4c,0x69,
|
||||||
|
0x67,0x68,0x74,0x2c,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x4e,0x6f,0x72,0x6d,0x61,
|
||||||
|
0x6c,0x29,0xa,0x7b,0xa,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x52,0x65,
|
||||||
|
0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x2c,
|
||||||
|
0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,
|
||||||
|
0xa,0xa,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x52,0x65,0x66,0x6c,0x65,
|
||||||
|
0x63,0x74,0x65,0x64,0x56,0x65,0x63,0x74,0x6f,0x72,0x20,0x3d,0x20,0x6e,0x6f,0x72,
|
||||||
|
0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x28,0x64,
|
||||||
|
0x4c,0x69,0x67,0x68,0x74,0x2e,0x76,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,
|
||||||
|
0x2c,0x20,0x76,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x29,0x3b,0xa,0x20,0x20,0x20,
|
||||||
|
0x76,0x65,0x63,0x33,0x20,0x76,0x56,0x65,0x72,0x74,0x65,0x78,0x54,0x6f,0x45,0x79,
|
||||||
|
0x65,0x56,0x65,0x63,0x74,0x6f,0x72,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
||||||
|
0x69,0x7a,0x65,0x28,0x76,0x45,0x79,0x65,0x50,0x6f,0x73,0x2d,0x76,0x57,0x6f,0x72,
|
||||||
|
0x6c,0x64,0x50,0x6f,0x73,0x29,0x3b,0xa,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
||||||
|
0x20,0x66,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x46,0x61,0x63,0x74,0x6f,0x72,
|
||||||
|
0x20,0x3d,0x20,0x64,0x6f,0x74,0x28,0x76,0x56,0x65,0x72,0x74,0x65,0x78,0x54,0x6f,
|
||||||
|
0x45,0x79,0x65,0x56,0x65,0x63,0x74,0x6f,0x72,0x2c,0x20,0x76,0x52,0x65,0x66,0x6c,
|
||||||
|
0x65,0x63,0x74,0x65,0x64,0x56,0x65,0x63,0x74,0x6f,0x72,0x29,0x3b,0xa,0xa,0x20,
|
||||||
|
0x20,0x20,0x69,0x66,0x20,0x28,0x66,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x46,
|
||||||
|
0x61,0x63,0x74,0x6f,0x72,0x20,0x3e,0x20,0x30,0x29,0xa,0x20,0x20,0x20,0x7b,0xa,
|
||||||
|
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x46,
|
||||||
|
0x61,0x63,0x74,0x6f,0x72,0x20,0x3d,0x20,0x70,0x6f,0x77,0x28,0x66,0x53,0x70,0x65,
|
||||||
|
0x63,0x75,0x6c,0x61,0x72,0x46,0x61,0x63,0x74,0x6f,0x72,0x2c,0x20,0x31,0x2e,0x30,
|
||||||
|
0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x52,0x65,0x73,0x75,0x6c,0x74,
|
||||||
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x64,0x4c,0x69,0x67,0x68,0x74,0x2e,0x76,
|
||||||
|
0x43,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,0x2a,0x20,0x31,0x2e,
|
||||||
|
0x30,0x20,0x2a,0x20,0x66,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x46,0x61,0x63,
|
||||||
|
0x74,0x6f,0x72,0x3b,0xa,0x20,0x20,0x20,0x7d,0xa,0xa,0x20,0x20,0x20,0x72,0x65,
|
||||||
|
0x74,0x75,0x72,0x6e,0x20,0x76,0x52,0x65,0x73,0x75,0x6c,0x74,0x3b,0xa,0x7d,0xa,
|
||||||
|
0xa,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x20,0x7b,0xa,0xa,
|
||||||
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x72,0x66,0x61,0x63,0x65,
|
||||||
|
0x54,0x6f,0x4c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
||||||
|
0x69,0x7a,0x65,0x28,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x2e,0x76,0x44,0x69,
|
||||||
|
0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x76,0x65,
|
||||||
|
0x63,0x33,0x20,0x73,0x75,0x72,0x66,0x61,0x63,0x65,0x50,0x6f,0x73,0x20,0x3d,0x20,
|
||||||
|
0x76,0x65,0x63,0x33,0x28,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,0x72,0x69,0x78,
|
||||||
|
0x20,0x2a,0x20,0x76,0x65,0x63,0x34,0x28,0x66,0x72,0x61,0x67,0x56,0x65,0x72,0x74,
|
||||||
|
0x2c,0x20,0x31,0x29,0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
||||||
|
0x73,0x75,0x72,0x66,0x61,0x63,0x65,0x54,0x6f,0x43,0x61,0x6d,0x65,0x72,0x61,0x20,
|
||||||
|
0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x63,0x61,0x6d,0x65,
|
||||||
|
0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2d,0x20,0x73,0x75,0x72,
|
||||||
|
0x66,0x61,0x63,0x65,0x50,0x6f,0x73,0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x76,0x65,
|
||||||
|
0x63,0x34,0x20,0x62,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,
|
||||||
|
0x75,0x72,0x65,0x28,0x62,0x6f,0x72,0x64,0x65,0x72,0x2c,0x20,0x76,0x65,0x63,0x32,
|
||||||
|
0x28,0x74,0x69,0x6c,0x65,0x50,0x6f,0x73,0x2e,0x78,0x2c,0x74,0x69,0x6c,0x65,0x50,
|
||||||
|
0x6f,0x73,0x2e,0x79,0x2a,0x31,0x2e,0x31,0x35,0x34,0x37,0x33,0x34,0x34,0x31,0x31,
|
||||||
|
0x29,0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x66,0x44,
|
||||||
|
0x69,0x66,0x66,0x75,0x73,0x65,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x20,
|
||||||
|
0x3d,0x20,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x64,0x6f,0x74,0x28,0x6e,
|
||||||
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x4e,0x6f,0x72,0x6d,0x61,0x6c,
|
||||||
|
0x29,0x2c,0x20,0x2d,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x2e,0x76,0x44,0x69,
|
||||||
|
0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x29,0x29,0x3b,0xa,0xa,0x20,0x20,0x20,0x20,
|
||||||
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x61,0x64,0x64,0x76,0x61,0x6c,0x20,0x3d,0x20,0x62,
|
||||||
|
0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x61,0x3b,0xa,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
||||||
|
0x34,0x20,0x76,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x43,0x6f,0x6c,0x6f,0x72,
|
||||||
|
0x20,0x3d,0x20,0x47,0x65,0x74,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x43,0x6f,
|
||||||
|
0x6c,0x6f,0x72,0x28,0x76,0x57,0x6f,0x72,0x6c,0x64,0x50,0x6f,0x73,0x2c,0x20,0x63,
|
||||||
|
0x61,0x6d,0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x73,
|
||||||
|
0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x2c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
|
||||||
|
0x7a,0x65,0x28,0x76,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x29,0x2b,0x20,0x47,0x65,
|
||||||
|
0x74,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x4c,0x69,0x67,0x68,
|
||||||
|
0x74,0x43,0x6f,0x6c,0x6f,0x72,0x28,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x2c,
|
||||||
|
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x4e,0x6f,0x72,0x6d,0x61,
|
||||||
|
0x6c,0x29,0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x67,0x72,
|
||||||
|
0x6f,0x75,0x6e,0x64,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,
|
||||||
|
0x65,0x78,0x2c,0x20,0x66,0x72,0x61,0x67,0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,
|
||||||
|
0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x72,0x6f,0x63,0x6b,
|
||||||
|
0x74,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x72,0x6f,0x63,0x6b,
|
||||||
|
0x2c,0x20,0x66,0x72,0x61,0x67,0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,0x29,0x3b,
|
||||||
|
0xa,0xa,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x6e,0x64,0x66,
|
||||||
|
0x61,0x63,0x20,0x3d,0x20,0x31,0x2e,0x30,0x3b,0xa,0x20,0x20,0x20,0x20,0x69,0x66,
|
||||||
|
0x20,0x28,0x7a,0x5f,0x70,0x6f,0x73,0x3e,0x30,0x2e,0x33,0x29,0xa,0x20,0x20,0x20,
|
||||||
|
0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6e,0x64,0x66,0x61,0x63,0x20,0x3d,0x20,0x30,
|
||||||
|
0x2e,0x30,0x3b,0xa,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x69,0x66,0x20,
|
||||||
|
0x28,0x7a,0x5f,0x70,0x6f,0x73,0x3e,0x30,0x2e,0x31,0x29,0xa,0x20,0x20,0x20,0x20,
|
||||||
|
0x20,0x20,0x20,0x20,0x67,0x6e,0x64,0x66,0x61,0x63,0x3d,0x31,0x2e,0x30,0x20,0x2d,
|
||||||
|
0x20,0x31,0x2e,0x30,0x20,0x2f,0x20,0x30,0x2e,0x32,0x20,0x2a,0x20,0x28,0x7a,0x5f,
|
||||||
|
0x70,0x6f,0x73,0x2d,0x30,0x2e,0x31,0x29,0x20,0x3b,0xa,0x20,0x20,0x20,0x20,0x66,
|
||||||
|
0x69,0x6e,0x61,0x6c,0x43,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x28,0x67,0x72,0x6f,
|
||||||
|
0x75,0x6e,0x64,0x20,0x2a,0x67,0x6e,0x64,0x66,0x61,0x63,0x2b,0x72,0x6f,0x63,0x6b,
|
||||||
|
0x74,0x20,0x2a,0x28,0x31,0x2e,0x30,0x2d,0x67,0x6e,0x64,0x66,0x61,0x63,0x29,0x20,
|
||||||
|
0x2b,0x62,0x63,0x6f,0x6c,0x6f,0x72,0x2a,0x61,0x64,0x64,0x76,0x61,0x6c,0x29,0x20,
|
||||||
|
0x2a,0x20,0x76,0x53,0x70,0x65,0x63,0x75,0x6c,0x61,0x72,0x43,0x6f,0x6c,0x6f,0x72,
|
||||||
|
0x3b,0x20,0x2f,0x2f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x2c,
|
||||||
|
0x20,0x66,0x72,0x61,0x67,0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,0x29,0x20,0x2a,
|
||||||
|
0x20,0x70,0x6f,0x77,0x28,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x64,0x6f,
|
||||||
|
0x74,0x28,0x73,0x75,0x72,0x66,0x61,0x63,0x65,0x54,0x6f,0x43,0x61,0x6d,0x65,0x72,
|
||||||
|
0x61,0x2c,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x28,0x2d,0x73,0x75,0x72,0x66,
|
||||||
|
0x61,0x63,0x65,0x54,0x6f,0x4c,0x69,0x67,0x68,0x74,0x2c,0x20,0x6e,0x6f,0x72,0x6d,
|
||||||
|
0x61,0x6c,0x29,0x29,0x29,0x2c,0x20,0x30,0x2e,0x35,0x29,0x3b,0xa,0xa,0x20,0x20,
|
||||||
|
0x20,0x20,0x2f,0x2f,0x20,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,
|
||||||
|
0x78,0x2c,0x20,0x66,0x72,0x61,0x67,0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,0x29,
|
||||||
|
0x2b,0x62,0x63,0x6f,0x6c,0x6f,0x72,0x2a,0x61,0x64,0x64,0x76,0x61,0x6c,0x29,0x2a,
|
||||||
|
0x76,0x65,0x63,0x34,0x28,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x2e,0x76,0x43,
|
||||||
|
0x6f,0x6c,0x6f,0x72,0x2a,0x28,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x2e,0x66,
|
||||||
|
0x41,0x6d,0x62,0x69,0x65,0x6e,0x74,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,
|
||||||
|
0x2b,0x66,0x44,0x69,0x66,0x66,0x75,0x73,0x65,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,
|
||||||
|
0x74,0x79,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,0xa,0x7d,0xa,
|
||||||
|
// /home/bart/project/tiletest/shaders/simple.vert
|
||||||
|
0x0,0x0,0x3,0xf9,
|
||||||
|
0x23,
|
||||||
|
0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x30,0x30,0xa,0x75,0x6e,0x69,0x66,
|
||||||
|
0x6f,0x72,0x6d,0x20,0x6d,0x61,0x74,0x34,0x20,0x63,0x61,0x6d,0x65,0x72,0x61,0x3b,
|
||||||
|
0xa,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x61,0x74,0x34,0x20,0x6d,0x6f,
|
||||||
|
0x64,0x65,0x6c,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78,0x3b,0xa,0x75,
|
||||||
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x61,0x74,0x34,0x20,0x70,0x72,0x6f,0x6a,
|
||||||
|
0x65,0x63,0x74,0x69,0x6f,0x6e,0x4d,0x61,0x74,0x72,0x69,0x78,0x3b,0xa,0xa,0x75,
|
||||||
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x61,0x74,0x34,0x20,0x6e,0x6f,0x72,0x6d,
|
||||||
|
0x61,0x6c,0x4d,0x61,0x74,0x72,0x69,0x78,0x3b,0xa,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
||||||
|
0x6d,0x20,0x6d,0x61,0x74,0x34,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,0x72,
|
||||||
|
0x69,0x78,0x3b,0xa,0xa,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
||||||
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
|
||||||
|
0x33,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0xa,0x6c,0x61,0x79,0x6f,
|
||||||
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,
|
||||||
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x69,0x6e,0x43,0x6f,0x6f,0x72,0x64,
|
||||||
|
0x3b,0xa,0xa,0x6c,0x61,0x79,0x6f,0x75,0x74,0x20,0x28,0x6c,0x6f,0x63,0x61,0x74,
|
||||||
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,
|
||||||
|
0x74,0x20,0x7a,0x50,0x6f,0x73,0x3b,0xa,0x6c,0x61,0x79,0x6f,0x75,0x74,0x20,0x28,
|
||||||
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x33,0x29,0x20,0x69,0x6e,0x20,
|
||||||
|
0x76,0x65,0x63,0x33,0x20,0x69,0x6e,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0xa,0xa,
|
||||||
|
0x2f,0x2f,0x69,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x65,0x69,0x67,0x68,
|
||||||
|
0x74,0x3b,0xa,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x66,0x72,0x61,0x67,
|
||||||
|
0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,0x3b,0xa,0x6f,0x75,0x74,0x20,0x76,0x65,
|
||||||
|
0x63,0x32,0x20,0x74,0x69,0x6c,0x65,0x50,0x6f,0x73,0x3b,0xa,0x6f,0x75,0x74,0x20,
|
||||||
|
0x76,0x65,0x63,0x33,0x20,0x66,0x72,0x61,0x67,0x56,0x65,0x72,0x74,0x3b,0xa,0x73,
|
||||||
|
0x6d,0x6f,0x6f,0x74,0x68,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
|
||||||
|
0x57,0x6f,0x72,0x6c,0x64,0x50,0x6f,0x73,0x3b,0xa,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
||||||
|
0x6d,0x20,0x6d,0x61,0x74,0x34,0x20,0x4d,0x56,0x50,0x3b,0xa,0x73,0x6d,0x6f,0x6f,
|
||||||
|
0x74,0x68,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x4e,0x6f,0x72,
|
||||||
|
0x6d,0x61,0x6c,0x3b,0xa,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x7a,
|
||||||
|
0x5f,0x70,0x6f,0x73,0x3b,0xa,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,
|
||||||
|
0x29,0xa,0x7b,0xa,0xa,0x76,0x65,0x63,0x34,0x20,0x69,0x6e,0x50,0x6f,0x73,0x69,
|
||||||
|
0x74,0x69,0x6f,0x6e,0x53,0x63,0x61,0x6c,0x65,0x64,0x20,0x3d,0x20,0x76,0x65,0x63,
|
||||||
|
0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x31,0x2e,0x30,0x29,
|
||||||
|
0x3b,0xa,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
|
||||||
|
0x3d,0x20,0x4d,0x56,0x50,0x20,0x2a,0x76,0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,
|
||||||
|
0x74,0x69,0x6f,0x6e,0x2e,0x78,0x2c,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,
|
||||||
|
0x79,0x2c,0x7a,0x50,0x6f,0x73,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,0x20,0x20,
|
||||||
|
0x76,0x65,0x63,0x34,0x20,0x74,0x65,0x78,0x70,0x3d,0x20,0x6d,0x6f,0x64,0x65,0x6c,
|
||||||
|
0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78,0x20,0x2a,0x76,0x65,0x63,0x34,
|
||||||
|
0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x2c,0x70,0x6f,0x73,0x69,
|
||||||
|
0x74,0x69,0x6f,0x6e,0x2e,0x79,0x2c,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,
|
||||||
|
0x20,0x20,0x66,0x72,0x61,0x67,0x54,0x65,0x78,0x43,0x6f,0x6f,0x72,0x64,0x20,0x3d,
|
||||||
|
0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x65,0x78,0x70,0x2e,0x78,0x2f,0x32,0x2c,0x74,
|
||||||
|
0x65,0x78,0x70,0x2e,0x79,0x2f,0x32,0x29,0x3b,0xa,0x20,0x20,0x76,0x65,0x63,0x34,
|
||||||
|
0x20,0x74,0x70,0x6f,0x73,0x20,0x3d,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,
|
||||||
|
0x72,0x69,0x78,0x2a,0x76,0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
||||||
|
0x6e,0x2e,0x78,0x2c,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x2c,0x30,
|
||||||
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,0x20,0x20,0x74,0x69,0x6c,0x65,0x50,0x6f,
|
||||||
|
0x73,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x74,0x70,0x6f,0x73,0x2e,0x78,0x2c,
|
||||||
|
0x74,0x70,0x6f,0x73,0x2e,0x79,0x29,0x3b,0xa,0x20,0x20,0x2f,0x2f,0x76,0x43,0x6f,
|
||||||
|
0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x63,0x6f,0x6c,0x6f,0x72,
|
||||||
|
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0xa,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x76,
|
||||||
|
0x52,0x65,0x73,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x69,0x6e,0x4e,0x6f,0x72,
|
||||||
|
0x6d,0x61,0x6c,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0xa,0x20,0x20,0x20,0x20,0x20,
|
||||||
|
0x76,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x69,0x6e,0x4e,0x6f,0x72,0x6d,
|
||||||
|
0x61,0x6c,0x2e,0x78,0x79,0x7a,0x3b,0xa,0x20,0x20,0x66,0x72,0x61,0x67,0x56,0x65,
|
||||||
|
0x72,0x74,0x20,0x3d,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0xa,0xa,
|
||||||
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x57,0x6f,0x72,0x6c,0x64,0x50,0x6f,0x73,
|
||||||
|
0x4c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,0x72,
|
||||||
|
0x69,0x78,0x2a,0x69,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x53,0x63,0x61,
|
||||||
|
0x6c,0x65,0x64,0x3b,0xa,0x20,0x20,0x76,0x57,0x6f,0x72,0x6c,0x64,0x50,0x6f,0x73,
|
||||||
|
0x20,0x3d,0x20,0x76,0x57,0x6f,0x72,0x6c,0x64,0x50,0x6f,0x73,0x4c,0x6f,0x63,0x61,
|
||||||
|
0x6c,0x2e,0x78,0x79,0x7a,0x3b,0xa,0x20,0x20,0x7a,0x5f,0x70,0x6f,0x73,0x3d,0x7a,
|
||||||
|
0x50,0x6f,0x73,0x3b,0xa,0x7d,0xa,0xa,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned char qt_resource_name[] = {
|
||||||
|
// shaders
|
||||||
|
0x0,0x7,
|
||||||
|
0x9,0xe7,0xac,0x73,
|
||||||
|
0x0,0x73,
|
||||||
|
0x0,0x68,0x0,0x61,0x0,0x64,0x0,0x65,0x0,0x72,0x0,0x73,
|
||||||
|
// simple.frag
|
||||||
|
0x0,0xb,
|
||||||
|
0x2,0xb0,0xd0,0x97,
|
||||||
|
0x0,0x73,
|
||||||
|
0x0,0x69,0x0,0x6d,0x0,0x70,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x66,0x0,0x72,0x0,0x61,0x0,0x67,
|
||||||
|
// simple.vert
|
||||||
|
0x0,0xb,
|
||||||
|
0x2,0xb1,0xc4,0x74,
|
||||||
|
0x0,0x73,
|
||||||
|
0x0,0x69,0x0,0x6d,0x0,0x70,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x76,0x0,0x65,0x0,0x72,0x0,0x74,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned char qt_resource_struct[] = {
|
||||||
|
// :
|
||||||
|
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
|
||||||
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
||||||
|
// :/shaders
|
||||||
|
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x2,
|
||||||
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
||||||
|
// :/shaders/simple.frag
|
||||||
|
0x0,0x0,0x0,0x14,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
|
||||||
|
0x0,0x0,0x1,0x70,0x12,0x77,0x25,0xb5,
|
||||||
|
// :/shaders/simple.vert
|
||||||
|
0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xa,0x33,
|
||||||
|
0x0,0x0,0x1,0x70,0x12,0x77,0x25,0x9d,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef QT_NAMESPACE
|
||||||
|
# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
|
||||||
|
# define QT_RCC_MANGLE_NAMESPACE0(x) x
|
||||||
|
# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
|
||||||
|
# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
|
||||||
|
# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
|
||||||
|
QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
|
||||||
|
#else
|
||||||
|
# define QT_RCC_PREPEND_NAMESPACE(name) name
|
||||||
|
# define QT_RCC_MANGLE_NAMESPACE(name) name
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef QT_NAMESPACE
|
||||||
|
namespace QT_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||||
|
bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||||
|
|
||||||
|
#ifdef QT_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int QT_RCC_MANGLE_NAMESPACE(qInitResources_shaders)();
|
||||||
|
int QT_RCC_MANGLE_NAMESPACE(qInitResources_shaders)()
|
||||||
|
{
|
||||||
|
int version = 3;
|
||||||
|
QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
|
||||||
|
(version, qt_resource_struct, qt_resource_name, qt_resource_data);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_shaders)();
|
||||||
|
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_shaders)()
|
||||||
|
{
|
||||||
|
int version = 3;
|
||||||
|
QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
|
||||||
|
(version, qt_resource_struct, qt_resource_name, qt_resource_data);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
struct initializer {
|
||||||
|
initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_shaders)(); }
|
||||||
|
~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_shaders)(); }
|
||||||
|
} dummy;
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,180 @@
|
|||||||
|
#include "qscenerenderer.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GLuint vertexbuffer;
|
||||||
|
GLuint VertexArrayID;
|
||||||
|
QSceneRenderer::QSceneRenderer(QWidget* parent): QOpenGLWidget(parent)
|
||||||
|
{
|
||||||
|
setFocusPolicy(Qt::FocusPolicy::StrongFocus);
|
||||||
|
installEventFilter(this);
|
||||||
|
QImage img = QImage("/home/bart/project/tiletest/images/heightmap.jpg").convertToFormat(QImage::Format_RGB32);
|
||||||
|
m_zoom = 4;
|
||||||
|
m_point = new Matrix2D<TerrainPoint>(img.width(),img.height());
|
||||||
|
m_numPoints05= img.width()/MAP_WIDTH/1.5/2;
|
||||||
|
for (int y = 0; y<img.height(); y++) {
|
||||||
|
QRgb *line = (QRgb *) img.scanLine(img.height() - 1 - y);
|
||||||
|
TerrainPoint *row = m_point->row(y);
|
||||||
|
for (int x = 0; x<img.width(); x++) {
|
||||||
|
row[x].height = qRed(line[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cameraUpDirection = cameraTransformation * QVector3D(0, 1, 0);
|
||||||
|
cameraTransformation.rotate(zRot, 0, 0, 1);
|
||||||
|
cameraPosition = cameraTransformation * QVector3D(5, 5, 5);
|
||||||
|
/*
|
||||||
|
for (int y=0; y<getNumPointsHeight(); y++)
|
||||||
|
for (int x=0; x<getNumPointsWidth(); x++){
|
||||||
|
|
||||||
|
m_point->operator ()(x,y).height = abs((x*10%200)-100);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
tiles=new Matrix2D<Tile>(MAP_WIDTH,MAP_HEIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
|
Tile * QSceneRenderer::getTile(int x, int y)
|
||||||
|
{
|
||||||
|
return &tiles->operator ()(x,y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
lastPos = event->pos();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
/*int dx = event->x() - lastPos.x();
|
||||||
|
int dy = event->y() - lastPos.y();
|
||||||
|
|
||||||
|
if (event->buttons() & Qt::LeftButton) {
|
||||||
|
zRot += 8 * dx;
|
||||||
|
} else if (event->buttons() & Qt::RightButton) {
|
||||||
|
zRot -= 8 * dx;
|
||||||
|
}
|
||||||
|
lastPos = event->pos();
|
||||||
|
update();*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if (e->key()== Qt::Key_A) {
|
||||||
|
cameraPosition.setX(cameraPosition.x()+ 0.1f*cos(PI*(zRot+90)/180.0f));
|
||||||
|
cameraPosition.setY(cameraPosition.y()+ 0.1f*sin(PI*(zRot+90)/180.0f));
|
||||||
|
}
|
||||||
|
else if (e->key()== Qt::Key_D) {
|
||||||
|
cameraPosition.setX(cameraPosition.x()+ 0.1f*cos(PI*(zRot-90)/180.0f));
|
||||||
|
cameraPosition.setY(cameraPosition.y()+ 0.1f*sin(PI*(zRot-90)/180.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e->key()== Qt::Key_W) {
|
||||||
|
cameraPosition.setX(cameraPosition.x()+ 0.1f*cos(PI*(zRot+0)/180.0f));
|
||||||
|
cameraPosition.setY(cameraPosition.y()+ 0.1f*sin(PI*(zRot+0)/180.0f));
|
||||||
|
}
|
||||||
|
else if (e->key()== Qt::Key_S) {
|
||||||
|
cameraPosition.setX(cameraPosition.x()+ 0.1f*cos(PI*(zRot+180)/180.0f));
|
||||||
|
cameraPosition.setY(cameraPosition.y()+ 0.1f*sin(PI*(zRot+180)/180.0f));
|
||||||
|
}
|
||||||
|
else if (e->key()== Qt::Key_E) {
|
||||||
|
zRot --;
|
||||||
|
if (zRot<0.0)
|
||||||
|
zRot+=360.0;
|
||||||
|
}
|
||||||
|
else if (e->key()== Qt::Key_Q) {
|
||||||
|
zRot ++;
|
||||||
|
if (zRot>=360.0)
|
||||||
|
zRot-=360.0;
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::wheelEvent(QWheelEvent *e)
|
||||||
|
{
|
||||||
|
m_zoom -= e->delta()/100.0;
|
||||||
|
if (m_zoom<2) m_zoom =2;
|
||||||
|
if (m_zoom>10)m_zoom =10;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::initializeGL()
|
||||||
|
{
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
glDepthFunc(GL_LESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::resizeGL(int width, int height)
|
||||||
|
{
|
||||||
|
Projection= QMatrix4x4();
|
||||||
|
Projection.perspective(45, (float) width / (float)height,0.1f,100.0f);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSceneRenderer::paintGL()
|
||||||
|
{
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
QMatrix4x4 cameraTransformation;
|
||||||
|
QMatrix4x4 vMatrix;
|
||||||
|
|
||||||
|
cameraTransformation.rotate(zRot, 0, 0, 1);
|
||||||
|
cameraUpDirection = cameraTransformation * QVector3D(0, 0, 1);
|
||||||
|
cameraPosition.setZ(m_zoom);
|
||||||
|
|
||||||
|
QVector3D lookat = QVector3D(cameraPosition.x()+ m_zoom*m_zoom/5.0f*cos(PI*zRot/180.0f)
|
||||||
|
, cameraPosition.y()+ m_zoom*m_zoom/5.0f*sin(PI*zRot/180.0f)
|
||||||
|
,0);
|
||||||
|
vMatrix.lookAt(cameraPosition, lookat, cameraUpDirection);
|
||||||
|
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
// Bounding box of the visible area in world coordinates
|
||||||
|
float minWorldX = std::min(cameraPosition.x(), lookat.x());
|
||||||
|
float maxWorldX = std::max(cameraPosition.x(), lookat.x());
|
||||||
|
float minWorldY = std::min(cameraPosition.y(), lookat.y());
|
||||||
|
float maxWorldY = std::max(cameraPosition.y(), lookat.y());
|
||||||
|
|
||||||
|
float margin = m_zoom * 2.5f + 8.0f;
|
||||||
|
minWorldX -= margin;
|
||||||
|
maxWorldX += margin;
|
||||||
|
minWorldY -= margin;
|
||||||
|
maxWorldY += margin;
|
||||||
|
|
||||||
|
float tileStepX = LOD_0_SIZE * 0.75f;
|
||||||
|
float tileStepY = LOD_0_SIZE_Y * 2.0f;
|
||||||
|
|
||||||
|
int minTileX = std::max(0, (int)floor(minWorldX / tileStepX));
|
||||||
|
int maxTileX = std::min(MAP_WIDTH - 1, (int)ceil(maxWorldX / tileStepX));
|
||||||
|
int minTileY = std::max(0, (int)floor(minWorldY / tileStepY));
|
||||||
|
int maxTileY = std::min(MAP_HEIGHT - 1, (int)ceil(maxWorldY / tileStepY));
|
||||||
|
|
||||||
|
// Expand margin by 1 for neighbor normal calculations
|
||||||
|
int initMinX = std::max(0, minTileX - 1);
|
||||||
|
int initMaxX = std::min(MAP_WIDTH - 1, maxTileX + 1);
|
||||||
|
int initMinY = std::max(0, minTileY - 1);
|
||||||
|
int initMaxY = std::min(MAP_HEIGHT - 1, maxTileY + 1);
|
||||||
|
|
||||||
|
// 1. Lazy initialize visible tiles and direct neighbors
|
||||||
|
for (int y = initMinY; y <= initMaxY; ++y) {
|
||||||
|
for (int x = initMinX; x <= initMaxX; ++x) {
|
||||||
|
tiles->operator()(x, y).ensureInitialized(this, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Ensure normals are built for visible tiles
|
||||||
|
for (int y = minTileY; y <= maxTileY; ++y) {
|
||||||
|
for (int x = minTileX; x <= maxTileX; ++x) {
|
||||||
|
tiles->operator()(x, y).ensureNormalsBuilt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Render only visible tiles
|
||||||
|
for (int y = minTileY; y <= maxTileY; ++y) {
|
||||||
|
for (int x = minTileX; x <= maxTileX; ++x) {
|
||||||
|
tiles->operator()(x, y).paint(Projection, cameraPosition, cameraUpDirection, vMatrix, zRot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#ifndef QSCENERENDERER_H
|
||||||
|
#define QSCENERENDERER_H
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include <qopenglwidget.h>
|
||||||
|
#include <QOpenGLFunctions_4_0_Core>
|
||||||
|
#include "terrain.h"
|
||||||
|
#include "tile.h"
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <vector>
|
||||||
|
#include "matrix2d.h"
|
||||||
|
|
||||||
|
|
||||||
|
class QSceneRenderer : public QOpenGLWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QSceneRenderer(QWidget* parent = Q_NULLPTR) ;
|
||||||
|
inline Matrix2D<TerrainPoint> * getMapPoints() {return m_point;}
|
||||||
|
inline int getNumPointsWidth() const {return m_numPointsWidth;}
|
||||||
|
inline int getNumPointsHeight() const {return m_numPointsHeight;}
|
||||||
|
inline int getNumPoints05() const {return m_numPoints05;}
|
||||||
|
|
||||||
|
Tile * getTile(int x, int y);
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
void keyPressEvent(QKeyEvent * e);
|
||||||
|
void wheelEvent(QWheelEvent * e);
|
||||||
|
void initializeGL();
|
||||||
|
void resizeGL(int w, int h);
|
||||||
|
void paintGL();
|
||||||
|
|
||||||
|
float m_camera_x =10.0;
|
||||||
|
float m_camera_y=0.0;
|
||||||
|
QMatrix4x4 Projection;
|
||||||
|
QMatrix4x4 cameraTransformation;
|
||||||
|
QVector3D cameraPosition;
|
||||||
|
QVector3D cameraUpDirection;
|
||||||
|
|
||||||
|
|
||||||
|
Matrix2D<TerrainPoint> * m_point;
|
||||||
|
Matrix2D<Tile> * tiles;
|
||||||
|
QPoint lastPos;
|
||||||
|
float zRot=0;
|
||||||
|
float m_numPointsWidth;
|
||||||
|
float m_numPointsHeight;
|
||||||
|
int m_numPoints05;
|
||||||
|
float m_zoom;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // QSCENERENDERER_H
|
||||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/shaders">
|
||||||
|
<file alias="simple.vert">shaders/simple.vert</file>
|
||||||
|
<file alias="simple.frag">shaders/simple.frag</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
#version 400
|
||||||
|
uniform sampler2D tex; //this is the texture
|
||||||
|
uniform sampler2D border; //this is the texture
|
||||||
|
uniform sampler2D rock; //this is the texture
|
||||||
|
smooth in vec3 vNormal;
|
||||||
|
smooth in vec3 vWorldPos;
|
||||||
|
in vec3 fragVert;
|
||||||
|
in float z_pos;
|
||||||
|
uniform vec3 cameraPosition;
|
||||||
|
|
||||||
|
uniform mat4 modelMatrix;
|
||||||
|
in vec2 tilePos;
|
||||||
|
in vec2 fragTexCoord; //this is the texture coord
|
||||||
|
out vec4 finalColor; //this is the output color of the pixel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct SimpleDirectionalLight
|
||||||
|
{
|
||||||
|
vec3 vColor;
|
||||||
|
vec3 vDirection;
|
||||||
|
float fAmbientIntensity;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
uniform SimpleDirectionalLight sunLight;
|
||||||
|
|
||||||
|
vec4 GetDirectionalLightColor(SimpleDirectionalLight dirLight, vec3 vNormal)
|
||||||
|
{
|
||||||
|
float fDiffuseIntensity = dot(vNormal, -dirLight.vDirection);
|
||||||
|
float fMult = pow(dirLight.fAmbientIntensity+fDiffuseIntensity,1.0);//clamp(dirLight.fAmbientIntensity+fDiffuseIntensity, -1.0, 1.0);
|
||||||
|
// if(dirLight.iSkybox == 1)fMult = dirLight.fAmbientIntensity;
|
||||||
|
return vec4(dirLight.vColor*fMult, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 GetSpecularColor(vec3 vWorldPos, vec3 vEyePos, SimpleDirectionalLight dLight, vec3 vNormal)
|
||||||
|
{
|
||||||
|
vec4 vResult = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
|
||||||
|
vec3 vReflectedVector = normalize(reflect(dLight.vDirection, vNormal));
|
||||||
|
vec3 vVertexToEyeVector = normalize(vEyePos-vWorldPos);
|
||||||
|
float fSpecularFactor = dot(vVertexToEyeVector, vReflectedVector);
|
||||||
|
|
||||||
|
if (fSpecularFactor > 0)
|
||||||
|
{
|
||||||
|
fSpecularFactor = pow(fSpecularFactor, 1.0);
|
||||||
|
vResult = vec4(dLight.vColor, 1.0) * 1.0 * fSpecularFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
|
||||||
|
vec3 surfaceToLight = normalize(sunLight.vDirection);
|
||||||
|
vec3 surfacePos = vec3(modelMatrix * vec4(fragVert, 1));
|
||||||
|
vec3 surfaceToCamera = normalize(cameraPosition - surfacePos);
|
||||||
|
vec4 bcolor = texture(border, vec2(tilePos.x,tilePos.y*1.154734411));
|
||||||
|
float fDiffuseIntensity = max(0.0, dot(normalize(vNormal), -sunLight.vDirection));
|
||||||
|
|
||||||
|
float addval = bcolor.a;
|
||||||
|
vec4 vSpecularColor = GetSpecularColor(vWorldPos, cameraPosition, sunLight, normalize(vNormal))+ GetDirectionalLightColor(sunLight,normalize(vNormal));
|
||||||
|
vec4 ground = texture(tex, fragTexCoord);
|
||||||
|
vec4 rockt = texture(rock, fragTexCoord);
|
||||||
|
|
||||||
|
float gndfac = 1.0;
|
||||||
|
if (z_pos>0.3)
|
||||||
|
gndfac = 0.0;
|
||||||
|
else if (z_pos>0.1)
|
||||||
|
gndfac=1.0 - 1.0 / 0.2 * (z_pos-0.1) ;
|
||||||
|
finalColor = (ground *gndfac+rockt *(1.0-gndfac) +bcolor*addval) * vSpecularColor; //texture(tex, fragTexCoord) * pow(max(0.0, dot(surfaceToCamera, reflect(-surfaceToLight, normal))), 0.5);
|
||||||
|
|
||||||
|
// (texture(tex, fragTexCoord)+bcolor*addval)*vec4(sunLight.vColor*(sunLight.fAmbientIntensity+fDiffuseIntensity), 1.0);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#version 400
|
||||||
|
uniform mat4 camera;
|
||||||
|
uniform mat4 modelViewMatrix;
|
||||||
|
uniform mat4 projectionMatrix;
|
||||||
|
|
||||||
|
uniform mat4 normalMatrix;
|
||||||
|
uniform mat4 modelMatrix;
|
||||||
|
|
||||||
|
layout(location = 0) in vec3 position;
|
||||||
|
layout(location = 1) in vec2 inCoord;
|
||||||
|
|
||||||
|
layout (location = 2) in float zPos;
|
||||||
|
layout (location =3) in vec3 inNormal;
|
||||||
|
|
||||||
|
//in float height;
|
||||||
|
out vec2 fragTexCoord;
|
||||||
|
out vec2 tilePos;
|
||||||
|
out vec3 fragVert;
|
||||||
|
smooth out vec3 vWorldPos;
|
||||||
|
uniform mat4 MVP;
|
||||||
|
smooth out vec3 vNormal;
|
||||||
|
out float z_pos;
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
vec4 inPositionScaled = vec4(position, 1.0);
|
||||||
|
gl_Position = MVP *vec4(position.x,position.y,zPos, 1.0);
|
||||||
|
vec4 texp= modelViewMatrix *vec4(position.x,position.y,0, 1.0);
|
||||||
|
fragTexCoord = vec2(texp.x/2,texp.y/2);
|
||||||
|
vec4 tpos = modelMatrix*vec4(position.x,position.y,0, 1.0);
|
||||||
|
tilePos = vec2(tpos.x,tpos.y);
|
||||||
|
//vColor = vec4(color, 1.0);
|
||||||
|
vec4 vRes = vec4(inNormal, 0.0);
|
||||||
|
vNormal = inNormal.xyz;
|
||||||
|
fragVert = position;
|
||||||
|
|
||||||
|
vec4 vWorldPosLocal =modelMatrix*inPositionScaled;
|
||||||
|
vWorldPos = vWorldPosLocal.xyz;
|
||||||
|
z_pos=zPos;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#ifndef TERRAIN_H
|
||||||
|
#define TERRAIN_H
|
||||||
|
|
||||||
|
#define MAP_WIDTH 300
|
||||||
|
#define MAP_HEIGHT 125
|
||||||
|
#define NUM_TRIANGLES_0 6
|
||||||
|
#define NUM_TRIANGLES_SUB 4
|
||||||
|
#define NUM_TRIANGLE_VERTICES 3
|
||||||
|
#define LOD_0_SIZE 1.0f
|
||||||
|
#define LOD_0_SIZE_Y 0.4328799197461722f
|
||||||
|
//#define LOD_0_S 0.75f
|
||||||
|
|
||||||
|
//#define NUM_POINTS_05f 10
|
||||||
|
|
||||||
|
//#define NUM_POINTS_WIDTH (NUM_POINTS_05f * 3 * MAP_WIDTH*2)
|
||||||
|
|
||||||
|
//#define NUM_POINTS_HEIGHT (NUM_POINTS_05f * MAP_HEIGHT)
|
||||||
|
|
||||||
|
#define NUM_TRIANGLES NUM_TRIANGLES_0*NUM_TRIANGLES_SUB * NUM_TRIANGLES_SUB
|
||||||
|
|
||||||
|
#define PI 3.14159265359f
|
||||||
|
|
||||||
|
struct TerrainPoint {
|
||||||
|
char height;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TERRAIN_H
|
||||||
@@ -0,0 +1,388 @@
|
|||||||
|
#include "tile.h"
|
||||||
|
#include "matrix2d.h"
|
||||||
|
#include <math.h>
|
||||||
|
#include "qscenerenderer.h"
|
||||||
|
#include <QVector3D>
|
||||||
|
QImage * Tile::m_image = NULL;
|
||||||
|
QOpenGLTexture * Tile::m_texture = NULL;
|
||||||
|
QImage * Tile::m_image_border = NULL;
|
||||||
|
QOpenGLTexture * Tile::m_texture_border = NULL;
|
||||||
|
QOpenGLTexture * Tile::m_texture_rock = NULL;
|
||||||
|
QImage * Tile::m_image_rock = NULL;
|
||||||
|
|
||||||
|
Vertex * Tile::m_vertices= NULL;
|
||||||
|
int Tile::m_numVertex;
|
||||||
|
|
||||||
|
QOpenGLBuffer Tile::m_vertex=QOpenGLBuffer();
|
||||||
|
QOpenGLVertexArrayObject Tile::m_object;
|
||||||
|
QOpenGLShaderProgram *Tile::m_program= NULL;
|
||||||
|
|
||||||
|
|
||||||
|
Tile::Tile()
|
||||||
|
: m_scene(NULL), m_tilevertices(NULL), m_x(0), m_y(0),
|
||||||
|
m_startpoint_x(0.0f), m_startpoint_y(0.0f),
|
||||||
|
m_initialized(false), m_normalsBuilt(false)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::ensureInitialized(QSceneRenderer* s, int x, int y)
|
||||||
|
{
|
||||||
|
if (!m_initialized) {
|
||||||
|
init(s, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::ensureNormalsBuilt()
|
||||||
|
{
|
||||||
|
if (!m_normalsBuilt && m_initialized) {
|
||||||
|
buildNormals();
|
||||||
|
m_normalsBuilt = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::init(QSceneRenderer* s, int x, int y)
|
||||||
|
{
|
||||||
|
m_x = x;
|
||||||
|
m_y = y;
|
||||||
|
m_scene = s;
|
||||||
|
|
||||||
|
//m_x*LOD_0_SIZE *1.5+ (m_y%2==1 ?( LOD_0_SIZE*1.5f)/2.0f:0),m_y*LOD_0_SIZE/2.0f,1.0f)
|
||||||
|
|
||||||
|
// m_startpoint_x =( m_scene->getNumPoints05()*3*x)+ (y%2==1? (m_scene->getNumPoints05()*1.5):0);
|
||||||
|
//m_startpoint_y = m_scene->getNumPoints05()*y;
|
||||||
|
|
||||||
|
m_startpoint_x =( m_scene->getNumPoints05()*1.5f*x) ;
|
||||||
|
m_startpoint_y = m_scene->getNumPoints05()*y*2.0f + (x%2==1? (m_scene->getNumPoints05()):0) ;
|
||||||
|
|
||||||
|
bool first = false;
|
||||||
|
if (m_vertices==NULL){
|
||||||
|
buildVertices();first=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
buildHeights();
|
||||||
|
|
||||||
|
if (Tile::m_image == NULL)
|
||||||
|
Tile::m_image = new QImage("/home/bart/project/tiletest/images/grass.jpg");
|
||||||
|
if (Tile::m_image_border == NULL)
|
||||||
|
Tile::m_image_border = new QImage("/home/bart/project/tiletest/images/border.png");
|
||||||
|
if (Tile::m_image_rock == NULL)
|
||||||
|
Tile::m_image_rock = new QImage("/home/bart/project/tiletest/images/rock.jpg");
|
||||||
|
|
||||||
|
if (Tile::m_texture_rock == NULL) {
|
||||||
|
m_texture_rock = new QOpenGLTexture(*m_image_rock);
|
||||||
|
m_texture_rock->setWrapMode(QOpenGLTexture::Repeat);
|
||||||
|
m_texture_rock->setMinificationFilter(QOpenGLTexture::NearestMipMapNearest);
|
||||||
|
m_texture_rock->setMagnificationFilter(QOpenGLTexture::Nearest);
|
||||||
|
//m_texture->setFormat(QOpenGLTexture::RGB32F);33
|
||||||
|
m_texture_rock->allocateStorage();
|
||||||
|
}
|
||||||
|
if (Tile::m_texture_border == NULL) {
|
||||||
|
m_texture_border = new QOpenGLTexture(*m_image_border);
|
||||||
|
m_texture_border->setWrapMode(QOpenGLTexture::Repeat);
|
||||||
|
m_texture_border->setMinificationFilter(QOpenGLTexture::NearestMipMapNearest);
|
||||||
|
m_texture_border->setMagnificationFilter(QOpenGLTexture::Nearest);
|
||||||
|
//m_texture->setFormat(QOpenGLTexture::RGB32F);33
|
||||||
|
m_texture_border->allocateStorage();
|
||||||
|
}
|
||||||
|
if (Tile::m_texture == NULL) {
|
||||||
|
m_texture = new QOpenGLTexture(*m_image);
|
||||||
|
m_texture->setWrapMode(QOpenGLTexture::Repeat);
|
||||||
|
m_texture->setMinificationFilter(QOpenGLTexture::NearestMipMapNearest);
|
||||||
|
m_texture->setMagnificationFilter(QOpenGLTexture::Nearest);
|
||||||
|
//m_texture->setFormat(QOpenGLTexture::RGB32F);
|
||||||
|
m_texture->allocateStorage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (first){
|
||||||
|
m_program = new QOpenGLShaderProgram();
|
||||||
|
m_program->addShaderFromSourceFile(QOpenGLShader::Vertex, "/home/bart/project/tiletest/shaders/simple.vert");
|
||||||
|
m_program->addShaderFromSourceFile(QOpenGLShader::Fragment, "/home/bart/project/tiletest/shaders/simple.frag");
|
||||||
|
m_program->link();
|
||||||
|
}
|
||||||
|
m_program->bind();
|
||||||
|
// Generate 1 buffer, put the resulting identifier in vertexbuffer
|
||||||
|
// Create Buffer (Do not release until VAO is created)
|
||||||
|
if (first) {
|
||||||
|
m_vertex.create();
|
||||||
|
m_vertex.bind();
|
||||||
|
m_vertex.setUsagePattern(QOpenGLBuffer::StaticDraw);
|
||||||
|
m_vertex.allocate(m_vertices, sizeof(Vertex) * (m_numVertex+1));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Create Vertex Array Object
|
||||||
|
m_object.create();
|
||||||
|
m_object.bind();
|
||||||
|
m_program->enableAttributeArray(0);
|
||||||
|
m_program->enableAttributeArray(1);
|
||||||
|
|
||||||
|
m_program->setAttributeBuffer(0, GL_FLOAT, Vertex::positionOffset(), Vertex::PositionTupleSize, Vertex::stride());
|
||||||
|
m_program->setAttributeBuffer(1, GL_FLOAT, Vertex::colorOffset(), Vertex::ColorTupleSize, Vertex::stride());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Release (unbind) all
|
||||||
|
m_object.release();
|
||||||
|
m_vertex.release();
|
||||||
|
m_program->release();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
m_initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::paint(QMatrix4x4 p, QVector3D& cameraPosition,QVector3D& cameraUpDirection,QMatrix4x4& vMatrix, float zRot)
|
||||||
|
{
|
||||||
|
if (!m_initialized) return;
|
||||||
|
|
||||||
|
|
||||||
|
QMatrix4x4 mModelToCamera;
|
||||||
|
QMatrix4x4 rMatrix;
|
||||||
|
QMatrix4x4 mMatrix;
|
||||||
|
|
||||||
|
float fSunAngle = 45.0;
|
||||||
|
|
||||||
|
|
||||||
|
QVector3D vSunPos(-sin(fSunAngle*PI/180.0f), -cos(fSunAngle*PI/180.0f), 0.0);
|
||||||
|
|
||||||
|
glActiveTexture(GL_TEXTURE0);
|
||||||
|
|
||||||
|
//mMatrix.translate(m_x*LOD_0_SIZE *1.5+ (m_y%2==1 ?( LOD_0_SIZE*1.5f)/2.0f:0),m_y*LOD_0_SIZE/2.0f,1.0f);
|
||||||
|
mMatrix.translate(m_x*(LOD_0_SIZE*0.75) ,(m_y*(LOD_0_SIZE_Y*2)+(m_x%2==0?0:LOD_0_SIZE_Y)) ,1.0f);
|
||||||
|
|
||||||
|
m_texture->bind(0);
|
||||||
|
m_texture_border->bind(1);
|
||||||
|
m_texture_rock->bind(2);
|
||||||
|
// Render using our shader
|
||||||
|
m_program->bind();
|
||||||
|
|
||||||
|
m_heightsbuffer.create();
|
||||||
|
m_heightsbuffer.bind();
|
||||||
|
m_heightsbuffer.setUsagePattern(QOpenGLBuffer::StaticDraw);
|
||||||
|
m_heightsbuffer.allocate(m_tilevertices, sizeof(TileVertexInfo) * (m_numVertex+1));
|
||||||
|
|
||||||
|
{ vSunPos.normalize();
|
||||||
|
float fSign = -1.0f; // This just returns -1.0f or 1.0f (try to examine this)
|
||||||
|
m_program->setUniformValue("sunLight.vColor", QVector3D(1.0f, 1.0f, 1.0f));
|
||||||
|
m_program->setUniformValue("sunLight.fAmbientIntensity",0.8f);
|
||||||
|
m_program->setUniformValue("sunLight.vDirection", vSunPos);
|
||||||
|
QVector3D vPos = QVector3D(fSign*15.0f, 0.0f, 50.0f-float(0)*25.0f);
|
||||||
|
vPos.setZ(vPos.z()+1.0f);
|
||||||
|
mModelToCamera =vMatrix * mMatrix.inverted().transposed();//QMatrix4x4();// vPos.translate(1.0f);
|
||||||
|
|
||||||
|
//mModelToCamera.scale(0.8);
|
||||||
|
|
||||||
|
|
||||||
|
m_program->setUniformValue("grass", 0);
|
||||||
|
m_program->setUniformValue("border", 1);
|
||||||
|
m_program->setUniformValue("rock", 2);
|
||||||
|
m_object.bind();
|
||||||
|
|
||||||
|
m_heightsbuffer.bind();
|
||||||
|
m_program->enableAttributeArray(2);
|
||||||
|
m_program->setAttributeBuffer(2, GL_FLOAT,TileVertexInfo::heightOffset(),TileVertexInfo::HeightTupleSize, TileVertexInfo::stride());
|
||||||
|
m_program->enableAttributeArray(3);
|
||||||
|
m_program->setAttributeBuffer(3, GL_FLOAT,TileVertexInfo::normalOffset(),TileVertexInfo::NormalTupleSize, TileVertexInfo::stride());
|
||||||
|
|
||||||
|
m_heightsbuffer.release();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rMatrix.translate(0.5f,LOD_0_SIZE_Y,0);
|
||||||
|
|
||||||
|
m_program->setUniformValue("cameraPosition", cameraPosition);
|
||||||
|
//mModelToCamera =vMatrix * mMatrix.inverted().transposed();//QMatrix4x4();// vPos.translate(1.0f);
|
||||||
|
m_program->setUniformValue("normalMatrix", mModelToCamera);
|
||||||
|
m_program->setUniformValue("modelMatrix", rMatrix);
|
||||||
|
m_program->setUniformValue("modelViewMatrix", vMatrix * mMatrix);
|
||||||
|
m_program->setUniformValue("MVP", p * vMatrix * mMatrix);
|
||||||
|
glDrawArrays(GL_TRIANGLES, 0, NUM_TRIANGLES*NUM_TRIANGLE_VERTICES);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
m_object.release();
|
||||||
|
|
||||||
|
|
||||||
|
}m_heightsbuffer.destroy();
|
||||||
|
m_program->release();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::buildVertices()
|
||||||
|
{
|
||||||
|
m_numVertex= NUM_TRIANGLES*NUM_TRIANGLE_VERTICES;
|
||||||
|
m_vertices = new Vertex[m_numVertex];
|
||||||
|
int cnt =0;
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i< NUM_TRIANGLES_0; i++) {
|
||||||
|
|
||||||
|
addTriangleVertices(cnt
|
||||||
|
, QVector2D( 0.0f, 0.0f)
|
||||||
|
, QVector2D( 0.5f*cos(PI*60.0f*i/180.0f)*-1.0f , 0.5f*sin(PI*60.0f*i/180.0f))//, QVector2D(-LOD_0_SIZE/2.0f , 0.0f ) )
|
||||||
|
, QVector2D( 0.5f*cos(PI*60.0f*(i+1)/180.0f)*-1.0f , 0.5f*sin(PI*60.0f*(i+1)/180.0f))//, QVector2D(-LOD_0_SIZE/4.0f , LOD_0_SIZE/2.0f) )
|
||||||
|
//, QVector2D(0.0f , 0.0f ) )
|
||||||
|
, 1 , 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Tile::addTriangleVertices(int &cnt, QVector2D t1, QVector2D t2, QVector2D t3,int level, int hex, int l1)
|
||||||
|
{
|
||||||
|
if (level>0) {
|
||||||
|
level--;
|
||||||
|
addTriangleVertices(cnt
|
||||||
|
, QVector2D( t1.x(), t1.y())//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t1.x()+t2.x())/2.0f, (t1.y()+t2.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t1.x()+t3.x())/2.0f , (t1.y()+t3.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, level, hex, 0
|
||||||
|
);
|
||||||
|
|
||||||
|
addTriangleVertices(cnt
|
||||||
|
, QVector2D( (t1.x()+t2.x())/2.0f, (t1.y()+t2.y())/2.0f)//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t2.x()+t3.x())/2.0f, (t2.y()+t3.y())/2.0f)//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t1.x()+t3.x())/2.0f , (t1.y()+t3.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, level, hex, 1
|
||||||
|
);
|
||||||
|
|
||||||
|
addTriangleVertices(cnt
|
||||||
|
, QVector2D( (t1.x()+t2.x())/2.0f, (t1.y()+t2.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, QVector2D( t2.x(), t2.y() )//, t1.texturepos()*0.7f )
|
||||||
|
, QVector2D( (t2.x()+t3.x())/2.0f, (t2.y()+t3.y())/2.0f)//,QVector2D(0,0) )
|
||||||
|
, level, hex, 2
|
||||||
|
);
|
||||||
|
|
||||||
|
addTriangleVertices(cnt
|
||||||
|
, QVector2D( (t1.x()+t3.x())/2.0f , (t1.y()+t3.y())/2.0f )//,QVector2D(0,0) )
|
||||||
|
, QVector2D( (t2.x()+t3.x())/2.0f, (t2.y()+t3.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, QVector2D( t3.x(), t3.y() )//, t1.texturepos())
|
||||||
|
, level, hex, 3
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
drawSubTriangleVertices(cnt
|
||||||
|
, QVector2D( t1.x(), t1.y())//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t1.x()+t2.x())/2.0f, (t1.y()+t2.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t1.x()+t3.x())/2.0f , (t1.y()+t3.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, hex, l1,0
|
||||||
|
);
|
||||||
|
|
||||||
|
drawSubTriangleVertices(cnt
|
||||||
|
, QVector2D( (t1.x()+t2.x())/2.0f, (t1.y()+t2.y())/2.0f)//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t2.x()+t3.x())/2.0f, (t2.y()+t3.y())/2.0f)//, QVector2D(0,0) )
|
||||||
|
, QVector2D( (t1.x()+t3.x())/2.0f , (t1.y()+t3.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, hex, l1,1
|
||||||
|
);
|
||||||
|
|
||||||
|
drawSubTriangleVertices(cnt
|
||||||
|
, QVector2D( (t1.x()+t2.x())/2.0f, (t1.y()+t2.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, QVector2D( t2.x(), t2.y() )//, t1.texturepos()*0.7f )
|
||||||
|
, QVector2D( (t2.x()+t3.x())/2.0f, (t2.y()+t3.y())/2.0f)//,QVector2D(0,0) )
|
||||||
|
, hex, l1,2
|
||||||
|
);
|
||||||
|
|
||||||
|
drawSubTriangleVertices(cnt
|
||||||
|
, QVector2D( (t1.x()+t3.x())/2.0f , (t1.y()+t3.y())/2.0f )//,QVector2D(0,0) )
|
||||||
|
, QVector2D( (t2.x()+t3.x())/2.0f, (t2.y()+t3.y())/2.0f )//, QVector2D(0,0) )
|
||||||
|
, QVector2D( t3.x(), t3.y() )//, t1.texturepos())
|
||||||
|
, hex, l1,3
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::drawSubTriangleVertices(int &cnt, QVector2D t1, QVector2D t2, QVector2D t3, int hex, int l1, int l2)
|
||||||
|
{
|
||||||
|
|
||||||
|
m_vertices[cnt++] = Vertex( t1
|
||||||
|
, QVector2D(t1.x()+LOD_0_SIZE/2.0f,t1.y()+LOD_0_SIZE/2.0f)
|
||||||
|
|
||||||
|
);
|
||||||
|
m_vertices[cnt++] = Vertex( t2
|
||||||
|
, QVector2D(t2.x()+LOD_0_SIZE/2.0f,t2.y()+LOD_0_SIZE/2.0f)
|
||||||
|
|
||||||
|
);
|
||||||
|
m_vertices[cnt++] = Vertex( t3
|
||||||
|
, QVector2D(t3.x()+LOD_0_SIZE/2.0f,t3.y()+LOD_0_SIZE/2.0f)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Tile::buildHeights() {
|
||||||
|
m_tilevertices = new TileVertexInfo[m_numVertex];
|
||||||
|
Matrix2D<TerrainPoint> * points = Tile::m_scene->getMapPoints();
|
||||||
|
for (int i = 0; i< m_numVertex; i++) {
|
||||||
|
|
||||||
|
/*float x=m_vertices[i].position().x();
|
||||||
|
int xpos = m_vertices[i].position().x()*(m_scene->getNumPoints05()*2);
|
||||||
|
int mappos=(int) round( m_startpoint_x+ ( m_vertices[i].position().x())*(m_scene->getNumPoints05()*2));
|
||||||
|
int res = (int) round( m_startpoint_x+ ( m_vertices[i].position().x())*(m_scene->getNumPoints05()*2));*/
|
||||||
|
float r = points->operator ()( (int) round( m_startpoint_x+ ( m_vertices[i].position().x())*(m_scene->getNumPoints05()*2.0f))
|
||||||
|
,(int) round( m_startpoint_y+ ( m_vertices[i].position().y())*(m_scene->getNumPoints05()*2.0f))).height /255.0f;
|
||||||
|
//m_heights[i] = 1r;
|
||||||
|
m_tilevertices[i].setHeight(r);
|
||||||
|
//m_tilevertices[i].setNormal(QVector3D(rand()%20/10.0f-1.0,rand()%20/10.0f-1.0,rand()%20/10.0f-1.0));
|
||||||
|
|
||||||
|
}
|
||||||
|
m_faces.reserve(m_numVertex/3);
|
||||||
|
int i =0;
|
||||||
|
for (int h = 0; h< 6; h++) {
|
||||||
|
m_face[h].createSub();
|
||||||
|
for (int l0 = 0; l0< 4; l0++) {
|
||||||
|
m_face[h].getSub(l0).createSub();
|
||||||
|
for (int l1 = 0; l1< 4; l1++) {
|
||||||
|
|
||||||
|
m_face[h].getSub(l0).getSub(l1).setSettings(
|
||||||
|
&m_vertices[i],&m_tilevertices[i],
|
||||||
|
&m_vertices[i+1],&m_tilevertices[i+1],
|
||||||
|
&m_vertices[i+2],&m_tilevertices[i+2]
|
||||||
|
);
|
||||||
|
m_faces.push_back(m_face[h].getSub(l0).getSub(l1));
|
||||||
|
i +=3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::findFaces(std::vector<Face *> &vec, QVector2D s)
|
||||||
|
{
|
||||||
|
if (!m_initialized) return;
|
||||||
|
for (int h = 0; h< 6; h++) {
|
||||||
|
m_face[h].findFaces(vec, s);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tile::buildNormals()
|
||||||
|
{
|
||||||
|
if (!m_initialized) return;
|
||||||
|
std::vector<Face *> vec;
|
||||||
|
for (int i=0; i<m_numVertex;i++) {
|
||||||
|
vec.clear();
|
||||||
|
|
||||||
|
findFaces(vec, m_vertices[i].position());
|
||||||
|
m_scene->getTile(m_x-1,m_y)->findFaces(vec,m_vertices[i].position());
|
||||||
|
m_scene->getTile(m_x+1,m_y)->findFaces(vec,m_vertices[i].position());
|
||||||
|
|
||||||
|
QVector3D r;
|
||||||
|
float cnt =0;
|
||||||
|
for (std::vector<Face *>::iterator it = vec.begin() ; it != vec.end(); ++it) {
|
||||||
|
QVector3D v = (*it)->normal();
|
||||||
|
cnt++;
|
||||||
|
r.setX(r.x() + v.x());
|
||||||
|
r.setY(r.y() + v.y());
|
||||||
|
r.setZ(r.z() + v.z());
|
||||||
|
}
|
||||||
|
|
||||||
|
r.setX(r.x() /cnt);
|
||||||
|
r.setY(r.y() /cnt);
|
||||||
|
r.setZ(r.z() /cnt);
|
||||||
|
m_tilevertices[i].setNormal(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
#ifndef TILE_H
|
||||||
|
#define TILE_H
|
||||||
|
#include <QOpenGLShaderProgram>
|
||||||
|
#include <QOpenGLBuffer>
|
||||||
|
#include <QOpenGLVertexArrayObject>
|
||||||
|
#include <QOpenGLTexture>
|
||||||
|
#include "vertex.h"
|
||||||
|
#include "terrain.h"
|
||||||
|
#include "tilevertexinfo.h"
|
||||||
|
#include <QVector>
|
||||||
|
#include "face.h"
|
||||||
|
class QSceneRenderer;
|
||||||
|
|
||||||
|
class Tile
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Tile();
|
||||||
|
void init(QSceneRenderer* s,int x, int y);
|
||||||
|
void paint(QMatrix4x4 p,QVector3D& cameraPosition,QVector3D& cameraUpDirection,QMatrix4x4& vMatrix, float zRot);
|
||||||
|
void buildVertices();
|
||||||
|
void buildNormals();
|
||||||
|
bool isInitialized() const { return m_initialized; }
|
||||||
|
bool normalsBuilt() const { return m_normalsBuilt; }
|
||||||
|
void ensureInitialized(QSceneRenderer* s, int x, int y);
|
||||||
|
void ensureNormalsBuilt();
|
||||||
|
void findFaces(std::vector<Face *> &vec, QVector2D s);
|
||||||
|
protected:
|
||||||
|
void addTriangleVertices(int &cnt, QVector2D t1, QVector2D t2, QVector2D t3,int level, int hex, int l1);
|
||||||
|
void drawSubTriangleVertices(int &cnt, QVector2D t1, QVector2D t2, QVector2D t3, int hex, int l1, int l2);
|
||||||
|
void buildHeights();
|
||||||
|
|
||||||
|
QOpenGLBuffer m_heightsbuffer;
|
||||||
|
static QOpenGLBuffer m_vertex;
|
||||||
|
static QOpenGLVertexArrayObject m_object;
|
||||||
|
static QOpenGLShaderProgram *m_program;
|
||||||
|
QSceneRenderer *m_scene;
|
||||||
|
static int m_numVertex;
|
||||||
|
TileVertexInfo * m_tilevertices;
|
||||||
|
|
||||||
|
std::vector<Face> m_faces;
|
||||||
|
Face m_face[6];
|
||||||
|
|
||||||
|
int m_x;
|
||||||
|
int m_y;
|
||||||
|
|
||||||
|
float m_startpoint_x;
|
||||||
|
float m_startpoint_y;
|
||||||
|
bool m_initialized;
|
||||||
|
bool m_normalsBuilt;
|
||||||
|
static Vertex * m_vertices;
|
||||||
|
static QOpenGLTexture * m_texture;
|
||||||
|
static QOpenGLTexture * m_texture_border;
|
||||||
|
static QOpenGLTexture * m_texture_rock;
|
||||||
|
static QImage * m_image;
|
||||||
|
static QImage * m_image_rock;
|
||||||
|
static QImage * m_image_border;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TILE_H
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2017-05-02T19:47:48
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
QT += core gui
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
TARGET = tiletest
|
||||||
|
TEMPLATE = app
|
||||||
|
|
||||||
|
|
||||||
|
SOURCES += main.cpp\
|
||||||
|
mainwindow.cpp \
|
||||||
|
qscenerenderer.cpp \
|
||||||
|
vertex.cpp \
|
||||||
|
tile.cpp \
|
||||||
|
tilevertexinfo.cpp \
|
||||||
|
face.cpp
|
||||||
|
|
||||||
|
HEADERS += mainwindow.h \
|
||||||
|
qscenerenderer.h \
|
||||||
|
vertex.h \
|
||||||
|
tile.h \
|
||||||
|
terrain.h \
|
||||||
|
tilevertexinfo.h \
|
||||||
|
matrix2d.h \
|
||||||
|
face.h
|
||||||
|
|
||||||
|
FORMS += mainwindow.ui
|
||||||
|
|
||||||
|
unix: CONFIG += link_pkgconfig
|
||||||
|
unix: PKGCONFIG += glew
|
||||||
|
|
||||||
|
DISTFILES += \
|
||||||
|
shaders/simple.vert \
|
||||||
|
shaders/simple.frag
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
shaders.qrc
|
||||||
@@ -0,0 +1,334 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 3.6.1, 2017-10-14T18:39:31. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{f0a66801-0dd7-42e1-b4c1-85787695328d}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap"/>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.6.0 GCC 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.6.0 GCC 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.56.gcc_64_kit</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bart/project/build-tiletest-Desktop_Qt_5_6_0_GCC_64bit-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||||
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bart/project/build-tiletest-Desktop_Qt_5_6_0_GCC_64bit-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||||
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bart/project/build-tiletest-Desktop_Qt_5_6_0_GCC_64bit-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||||
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||||
|
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||||
|
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">tiletest</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/bart/project/tiletest/tiletest.pro</value>
|
||||||
|
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">tiletest.pro</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||||
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">18</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">18</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#include "tilevertexinfo.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#ifndef TILEVERTEXINFO_H
|
||||||
|
#define TILEVERTEXINFO_H
|
||||||
|
|
||||||
|
#include <QVector3D>
|
||||||
|
#include <QVector2D>
|
||||||
|
#include "vertex.h"
|
||||||
|
class TileVertexInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
Q_DECL_CONSTEXPR inline TileVertexInfo(){}
|
||||||
|
Q_DECL_CONSTEXPR inline TileVertexInfo(float z):m_z(z){}
|
||||||
|
// Accessors / Mutators
|
||||||
|
Q_DECL_CONSTEXPR const float& height() const { return m_z; }
|
||||||
|
|
||||||
|
void inline setHeight(float f){m_z=f;}
|
||||||
|
void inline setNormal(QVector3D n){m_normal=n;}
|
||||||
|
//void calculateNormal(QVector2D v);
|
||||||
|
|
||||||
|
static const int HeightTupleSize = 1;
|
||||||
|
static const int NormalTupleSize = 3;
|
||||||
|
static int heightOffset() { return offsetof(TileVertexInfo, m_z); }
|
||||||
|
static int normalOffset() { return offsetof(TileVertexInfo, m_normal); }
|
||||||
|
static int stride() { return sizeof(TileVertexInfo); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
float m_z=0.0f;
|
||||||
|
QVector3D m_normal;
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(TileVertexInfo, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // TILEVERTEXINFO_H
|
||||||
Binary file not shown.
@@ -0,0 +1,65 @@
|
|||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'mainwindow.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 5.15.13
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_MAINWINDOW_H
|
||||||
|
#define UI_MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QMainWindow>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
#include "qscenerenderer.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_MainWindow
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QWidget *centralWidget;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QSceneRenderer *openGLWidget;
|
||||||
|
|
||||||
|
void setupUi(QMainWindow *MainWindow)
|
||||||
|
{
|
||||||
|
if (MainWindow->objectName().isEmpty())
|
||||||
|
MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
|
||||||
|
MainWindow->resize(606, 463);
|
||||||
|
centralWidget = new QWidget(MainWindow);
|
||||||
|
centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
|
||||||
|
horizontalLayout = new QHBoxLayout(centralWidget);
|
||||||
|
horizontalLayout->setSpacing(6);
|
||||||
|
horizontalLayout->setContentsMargins(11, 11, 11, 11);
|
||||||
|
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
|
||||||
|
openGLWidget = new QSceneRenderer(centralWidget);
|
||||||
|
openGLWidget->setObjectName(QString::fromUtf8("openGLWidget"));
|
||||||
|
openGLWidget->setFocusPolicy(Qt::StrongFocus);
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(openGLWidget);
|
||||||
|
|
||||||
|
MainWindow->setCentralWidget(centralWidget);
|
||||||
|
|
||||||
|
retranslateUi(MainWindow);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(MainWindow);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QMainWindow *MainWindow)
|
||||||
|
{
|
||||||
|
MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MainWindow: public Ui_MainWindow {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_MAINWINDOW_H
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "vertex.h"
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
#ifndef VERTEX_H
|
||||||
|
#define VERTEX_H
|
||||||
|
|
||||||
|
#include <QVector3D>
|
||||||
|
#include <QVector2D>
|
||||||
|
#include "face.h"
|
||||||
|
class Vertex
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructors
|
||||||
|
Q_DECL_CONSTEXPR Vertex();
|
||||||
|
//Q_DECL_CONSTEXPR explicit Vertex(const QVector2D &position);
|
||||||
|
Q_DECL_CONSTEXPR Vertex(const QVector2D &position, const QVector2D &texturepos);
|
||||||
|
|
||||||
|
// Accessors / Mutators
|
||||||
|
Q_DECL_CONSTEXPR const QVector2D& position() const;
|
||||||
|
Q_DECL_CONSTEXPR const QVector2D& texturepos() const;
|
||||||
|
void setPosition(const QVector2D& position);
|
||||||
|
void setTexturepos(const QVector2D& texturepos);
|
||||||
|
|
||||||
|
// OpenGL Helpers
|
||||||
|
static const int PositionTupleSize = 3;
|
||||||
|
static const int ColorTupleSize = 3;
|
||||||
|
static Q_DECL_CONSTEXPR int positionOffset();
|
||||||
|
static Q_DECL_CONSTEXPR int colorOffset();
|
||||||
|
static Q_DECL_CONSTEXPR int stride();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QVector2D m_position;
|
||||||
|
QVector2D m_texturepos;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Inline Implementation
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
// Note: Q_MOVABLE_TYPE means it can be memcpy'd.
|
||||||
|
Q_DECLARE_TYPEINFO(Vertex, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
Q_DECL_CONSTEXPR inline Vertex::Vertex() {}
|
||||||
|
//Q_DECL_CONSTEXPR inline Vertex::Vertex(const QVector2D &position) : m_position(position) {}
|
||||||
|
Q_DECL_CONSTEXPR inline Vertex::Vertex(const QVector2D &position, const QVector2D &texturepos)
|
||||||
|
: m_position(position), m_texturepos(texturepos) {}
|
||||||
|
|
||||||
|
// Accessors / Mutators
|
||||||
|
Q_DECL_CONSTEXPR inline const QVector2D& Vertex::position() const { return m_position; }
|
||||||
|
Q_DECL_CONSTEXPR inline const QVector2D& Vertex::texturepos() const { return m_texturepos; }
|
||||||
|
void inline Vertex::setPosition(const QVector2D& position) { m_position = position; }
|
||||||
|
void inline Vertex::setTexturepos(const QVector2D& texturepos) { m_texturepos = texturepos; }
|
||||||
|
|
||||||
|
// OpenGL Helpers
|
||||||
|
Q_DECL_CONSTEXPR inline int Vertex::positionOffset() { return offsetof(Vertex, m_position); }
|
||||||
|
Q_DECL_CONSTEXPR inline int Vertex::colorOffset() { return offsetof(Vertex, m_texturepos); }
|
||||||
|
Q_DECL_CONSTEXPR inline int Vertex::stride() { return sizeof(Vertex); }
|
||||||
|
|
||||||
|
#endif // VERTEX_H
|
||||||
Reference in New Issue
Block a user