diff --git a/.gitignore b/.gitignore index 0fdb6e0..43887ea 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ *.userosscache *.sln.docstates +Logs/ + # Build results [Dd]ebug/ [Dd]ebugPublic/ diff --git a/CUGL.pro b/CUGL.pro index 0a16416..b764b11 100644 --- a/CUGL.pro +++ b/CUGL.pro @@ -37,6 +37,7 @@ SOURCES += main.cpp\ texture.cpp \ texturepopup.cpp \ utilities.cpp \ + savable.cpp \ HEADERS += mainwindow.h \ glwidget.h \ @@ -61,7 +62,7 @@ HEADERS += mainwindow.h \ texture.h \ texturepopup.h \ utilities.h \ - serializable.h \ + savable.h \ FORMS += mainwindow.ui @@ -80,11 +81,11 @@ OBJECTS_DIR = debug/obj # directory where .obj files will be saved #CUDA Settings CUDA_OBJECTS_DIR = debug/obj # directory where .obj of cuda file will be saved -CUDA_DIR = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5" +CUDA_DIR = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v7.5" SYSTEM_NAME = x64 # Depending on your system either 'Win32', 'x64', or 'Win64' SYSTEM_TYPE = 64 # '32' or '64', depending on your system CUDA_ARCH = sm_35 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10' -NVCC_OPTIONS += --use_fast_math # default setting +NVCC_OPTIONS += --use_fast_math # default setting22 INCLUDE_FORMATTED = $$join(CUDA_DIR,'"', '"', '/include"') LIB_FORMATTED = $$join(CUDA_DIR,'"', '"', '/lib/x64"') @@ -95,7 +96,7 @@ NVCC_FORMATTED = $$join(CUDA_DIR,'"', '"', '/bin/nvcc"') INCLUDEPATH += $$CUDA_DIR/include # library directories -QMAKE_LIBDIR += $$CUDA_DIR/lib/$$SYSTEM_NAME #"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5/lib/x64" +QMAKE_LIBDIR += $$CUDA_DIR/lib/$$SYSTEM_NAME # Add the necessary libraries CUDA_LIBS= -lcuda -lcudart diff --git a/CUGL.sdf b/CUGL.sdf deleted file mode 100644 index 5a772d4..0000000 Binary files a/CUGL.sdf and /dev/null differ diff --git a/CUGL.sln b/CUGL.sln deleted file mode 100644 index f285cfa..0000000 --- a/CUGL.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUGL", "CUGL.vcxproj", "{542D2B32-3337-39AE-9735-4C0B989A3A7E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {542D2B32-3337-39AE-9735-4C0B989A3A7E}.Debug|x64.ActiveCfg = Debug|x64 - {542D2B32-3337-39AE-9735-4C0B989A3A7E}.Debug|x64.Build.0 = Debug|x64 - {542D2B32-3337-39AE-9735-4C0B989A3A7E}.Release|x64.ActiveCfg = Release|x64 - {542D2B32-3337-39AE-9735-4C0B989A3A7E}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/CUGL.v12.suo b/CUGL.v12.suo deleted file mode 100644 index 5c9b18c..0000000 Binary files a/CUGL.v12.suo and /dev/null differ diff --git a/CUGL.vcxproj b/CUGL.vcxproj deleted file mode 100644 index 61f0bc5..0000000 --- a/CUGL.vcxproj +++ /dev/null @@ -1,635 +0,0 @@ - - - - - Release - x64 - - - Debug - x64 - - - - {542D2B32-3337-39AE-9735-4C0B989A3A7E} - CUGL - Qt4VSv1.0 - - - - v120 - release\ - false - NotSet - Application - release\obj\ - CUGL - - - v120 - debug\ - false - NotSet - Application - debug\obj\ - CUGL - - - - - - - - - - - - release\ - $(Platform)\$(Configuration)\ - CUGL - true - false - debug\ - $(Platform)\$(Configuration)\ - CUGL - true - - - - .;.;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include;$(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtCore;release;.;$(QTDIR)\mkspecs\win32-msvc2013;.\GeneratedFiles;%(AdditionalIncludeDirectories) - -Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions) - release\obj\ - false - None - Sync - $(IntDir) - MaxSpeed - _WINDOWS;UNICODE;WIN32;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;%(PreprocessorDefinitions) - false - $(IntDir)vc$(PlatformToolsetVersion).pdb - MultiThreadedDLL - true - true - true - Level3 - - - $(QTDIR)\lib\qtmain.lib;shell32.lib;C:/qt/5.5/msvc2013_64/lib\Qt5Core.lib;"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\lib\x64\cuda.lib";"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\lib\x64\cudart.lib";$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Core.lib;%(AdditionalDependencies) - $(QTDIR)\lib;C:/qt/5.5/msvc2013_64/lib;$(QTDIR)\lib;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\lib\x64;%(AdditionalLibraryDirectories) - "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) - true - false - true - false - $(OutDir)\CUGL.exe - true - Windows - true - - - Unsigned - None - 0 - - - _WINDOWS;UNICODE;WIN32;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - - - - - .;.;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include;$(QTDIR)\include;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtCore;debug;.;$(QTDIR)\mkspecs\win32-msvc2013;.\GeneratedFiles;%(AdditionalIncludeDirectories) - -w34100 -w34189 -w44996 %(AdditionalOptions) - debug\obj\ - false - ProgramDatabase - Sync - $(IntDir) - Disabled - _WINDOWS;UNICODE;WIN32;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - false - MultiThreadedDebugDLL - true - true - true - Level3 - $(IntDir)vc$(PlatformToolsetVersion).pdb - - - $(QTDIR)\lib\qtmaind.lib;shell32.lib;C:/qt/5.5/msvc2013_64/lib\Qt5Cored.lib;"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\lib\x64\cuda.lib";"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\lib\x64\cudart.lib";$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Cored.lib;%(AdditionalDependencies) - $(QTDIR)\lib;C:/qt/5.5/msvc2013_64/lib;$(QTDIR)\lib;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\lib\x64;%(AdditionalLibraryDirectories) - "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) - true - true - true - $(OutDir)\CUGL.exe - true - Windows - true - - - Unsigned - None - 0 - - - _WINDOWS;UNICODE;WIN32;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing bufferpopup.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing bufferpopup.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing controltab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing controltab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing cubuffertab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing cubuffertab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing cugeneraltab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing cugeneraltab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing cusettings.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing cusettings.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glbuffertab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glbuffertab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glgeneraltab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glgeneraltab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glsettings.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glsettings.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glwidget.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing glwidget.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing mainwindow.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing mainwindow.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing objectpopup.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing objectpopup.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing objecttab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing objecttab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing outputsettings.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing outputsettings.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing paramtab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing paramtab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing texturepopup.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing texturepopup.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing texturetab.h... - setlocal -if errorlevel 1 goto VCEnd - -if errorlevel 1 goto VCEnd -endlocal -"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB "-I." "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2013" - Moc%27ing texturetab.h... - $(ConfigurationName)\moc_%(Filename).cpp - $(ConfigurationName)\moc_%(Filename).cpp - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - - - Document - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - - - - - Kernels\kernel.cu;%(AdditionalInputs) - setlocal -if errorlevel 1 goto VCEnd -"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5/bin/nvcc" --use_fast_math -I"C:/Users/Anth/Documents/GitHub/CUGL/" -I"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5/include" -lcuda -lcudart --machine 64 -arch=sm_35 --compile -cudart static -DWIN32 -D_MBCS -Xcompiler /wd4819,/EHsc,/W3,/nologo,/O2,/Zi -Xcompiler /MD -c -o debug\obj\kernel_cuda.obj Kernels\kernel.cu -if errorlevel 1 goto VCEnd -endlocal - "C:/Program - debug\obj\kernel_cuda.obj;%(Outputs) - - - - - Kernels\kernel.cu;%(AdditionalInputs) - setlocal -if errorlevel 1 goto VCEnd -"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5/bin/nvcc" -D_DEBUG --use_fast_math -I"C:/Users/Anth/Documents/GitHub/CUGL/" -I"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5/include" -lcuda -lcudart --machine 64 -arch=sm_35 --compile -cudart static -g -G -DWIN32 -D_MBCS -Xcompiler /wd4819,/EHsc,/W3,/nologo,/Od,/Zi,/RTC1 -Xcompiler /MDd -c -o debug\obj\kernel_cuda.obj Kernels\kernel.cu -if errorlevel 1 goto VCEnd -endlocal - "C:/Program - debug\obj\kernel_cuda.obj;%(Outputs) - - - - - - - - - - \ No newline at end of file diff --git a/CUGL.vcxproj.filters b/CUGL.vcxproj.filters deleted file mode 100644 index 647fbae..0000000 --- a/CUGL.vcxproj.filters +++ /dev/null @@ -1,322 +0,0 @@ - - - - - {99349809-55BA-4b9d-BF79-8FDBB0286EB3} - ui - false - - - {99349809-55BA-4b9d-BF79-8FDBB0286EB3} - ui - false - - - {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} - cpp;c;cxx;moc;h;def;odl;idl;res; - - - {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} - cpp;c;cxx;moc;h;def;odl;idl;res; - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {E0D8C965-CC5F-43d7-AD63-FAEF0BBC0F85}-cuda - false - - - {E0D8C965-CC5F-43d7-AD63-FAEF0BBC0F85}-cuda_d - false - - - {5ff8a653-a367-4660-9a27-27cf7b8d218c} - cpp;moc - False - - - {c27b95d4-e4c3-47a3-9bc3-6d0f43086709} - cpp;moc - False - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - - Form Files - - - - - cuda - - - - - cuda_d - - - - - Generated Files - - - Header Files - - - \ No newline at end of file diff --git a/CUGL.vcxproj.user b/CUGL.vcxproj.user deleted file mode 100644 index ab23433..0000000 --- a/CUGL.vcxproj.user +++ /dev/null @@ -1,12 +0,0 @@ - - - - - C:\Qt\5.5\msvc2013_64 - PATH=$(QTDIR)\bin%3b$(PATH) - - - C:\Qt\5.5\msvc2013_64 - PATH=$(QTDIR)\bin%3b$(PATH) - - \ No newline at end of file diff --git a/GeneratedFiles/ui_mainwindow.h b/GeneratedFiles/ui_mainwindow.h deleted file mode 100644 index f5746ce..0000000 --- a/GeneratedFiles/ui_mainwindow.h +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'mainwindow.ui' -** -** Created by: Qt User Interface Compiler version 5.5.1 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_MAINWINDOW_H -#define UI_MAINWINDOW_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_MainWindow -{ -public: - QAction *actionExit; - QAction *actionOpenGL; - QAction *actionOpenGL_2; - QAction *actionCUDA; - QAction *actionOutput; - QWidget *centralWidget; - QMenuBar *menuBar; - QMenu *menuFile; - QMenu *menuView; - QMenu *menuSettings; - QMenu *menuHelp; - QMenu *menuAbout; - QStatusBar *statusBar; - - void setupUi(QMainWindow *MainWindow) - { - if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QStringLiteral("MainWindow")); - MainWindow->resize(1200, 900); - actionExit = new QAction(MainWindow); - actionExit->setObjectName(QStringLiteral("actionExit")); - actionOpenGL = new QAction(MainWindow); - actionOpenGL->setObjectName(QStringLiteral("actionOpenGL")); - actionOpenGL->setCheckable(true); - actionOpenGL->setChecked(true); - actionOpenGL_2 = new QAction(MainWindow); - actionOpenGL_2->setObjectName(QStringLiteral("actionOpenGL_2")); - actionOpenGL_2->setCheckable(true); - actionOpenGL_2->setChecked(true); - actionCUDA = new QAction(MainWindow); - actionCUDA->setObjectName(QStringLiteral("actionCUDA")); - actionCUDA->setCheckable(true); - actionCUDA->setChecked(true); - actionOutput = new QAction(MainWindow); - actionOutput->setObjectName(QStringLiteral("actionOutput")); - actionOutput->setCheckable(true); - actionOutput->setChecked(false); - centralWidget = new QWidget(MainWindow); - centralWidget->setObjectName(QStringLiteral("centralWidget")); - MainWindow->setCentralWidget(centralWidget); - menuBar = new QMenuBar(MainWindow); - menuBar->setObjectName(QStringLiteral("menuBar")); - menuBar->setGeometry(QRect(0, 0, 400, 21)); - menuFile = new QMenu(menuBar); - menuFile->setObjectName(QStringLiteral("menuFile")); - menuView = new QMenu(menuBar); - menuView->setObjectName(QStringLiteral("menuView")); - menuSettings = new QMenu(menuView); - menuSettings->setObjectName(QStringLiteral("menuSettings")); - menuHelp = new QMenu(menuBar); - menuHelp->setObjectName(QStringLiteral("menuHelp")); - menuAbout = new QMenu(menuBar); - menuAbout->setObjectName(QStringLiteral("menuAbout")); - MainWindow->setMenuBar(menuBar); - statusBar = new QStatusBar(MainWindow); - statusBar->setObjectName(QStringLiteral("statusBar")); - statusBar->setEnabled(true); - statusBar->setFocusPolicy(Qt::NoFocus); - statusBar->setAutoFillBackground(false); - MainWindow->setStatusBar(statusBar); - - menuBar->addAction(menuFile->menuAction()); - menuBar->addAction(menuView->menuAction()); - menuBar->addAction(menuHelp->menuAction()); - menuBar->addAction(menuAbout->menuAction()); - menuFile->addAction(actionExit); - menuView->addAction(actionOpenGL); - menuView->addAction(menuSettings->menuAction()); - menuSettings->addAction(actionOpenGL_2); - menuSettings->addAction(actionCUDA); - menuSettings->addAction(actionOutput); - - retranslateUi(MainWindow); - - QMetaObject::connectSlotsByName(MainWindow); - } // setupUi - - void retranslateUi(QMainWindow *MainWindow) - { - MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0)); - actionExit->setText(QApplication::translate("MainWindow", "Exit", 0)); - actionExit->setShortcut(QApplication::translate("MainWindow", "Esc", 0)); - actionOpenGL->setText(QApplication::translate("MainWindow", "OpenGL", 0)); -#ifndef QT_NO_TOOLTIP - actionOpenGL->setToolTip(QApplication::translate("MainWindow", "OpenGL Window", 0)); -#endif // QT_NO_TOOLTIP - actionOpenGL->setShortcut(QApplication::translate("MainWindow", "Shift+O", 0)); - actionOpenGL_2->setText(QApplication::translate("MainWindow", "OpenGL", 0)); -#ifndef QT_NO_TOOLTIP - actionOpenGL_2->setToolTip(QApplication::translate("MainWindow", "OpenGL Settings", 0)); -#endif // QT_NO_TOOLTIP - actionOpenGL_2->setShortcut(QApplication::translate("MainWindow", "Shift+Q", 0)); - actionCUDA->setText(QApplication::translate("MainWindow", "CUDA", 0)); -#ifndef QT_NO_TOOLTIP - actionCUDA->setToolTip(QApplication::translate("MainWindow", "CUDA Settings", 0)); -#endif // QT_NO_TOOLTIP - actionCUDA->setShortcut(QApplication::translate("MainWindow", "Shift+W", 0)); - actionOutput->setText(QApplication::translate("MainWindow", "Output", 0)); -#ifndef QT_NO_TOOLTIP - actionOutput->setToolTip(QApplication::translate("MainWindow", "Output Settings", 0)); -#endif // QT_NO_TOOLTIP - actionOutput->setShortcut(QApplication::translate("MainWindow", "Shift+E", 0)); - menuFile->setTitle(QApplication::translate("MainWindow", "File", 0)); - menuView->setTitle(QApplication::translate("MainWindow", "View", 0)); - menuSettings->setTitle(QApplication::translate("MainWindow", "Settings", 0)); - menuHelp->setTitle(QApplication::translate("MainWindow", "Help", 0)); - menuAbout->setTitle(QApplication::translate("MainWindow", "About", 0)); - } // retranslateUi - -}; - -namespace Ui { - class MainWindow: public Ui_MainWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_MAINWINDOW_H diff --git a/Kernels/kernel.cu b/Kernels/kernel.cu index b3dc18b..4f97f98 100644 --- a/Kernels/kernel.cu +++ b/Kernels/kernel.cu @@ -11,61 +11,502 @@ #include #include #include +#include +#include #include #include +#include #include "math_constants.h" #include "helper_math.h" #include "utilities.h" -#define N 4096 -#define N_ITERS 10 -#define BLOCK_SIZE 256 -#define N_BLOCKS (N + BLOCK_SIZE - 1) / BLOCK_SIZE +//non-pow2 PBO doesn't work +#define N_X 256 //not inc ghost +#define N_Y 256 //not inc ghost +#define N N_X * N_Y //not inc ghost +#define BLOCK_SIZE_X 16 //inc ghost/overlap //large size should hide wasted threads better - CHECK! +#define BLOCK_SIZE_Y 16 //inc ghost/overlap +#define BLOCK_SIZE_COPY_X 16 +#define BLOCK_SIZE_COPY_Y 16 +#define N_BLOCKS_X (N_X + (BLOCK_SIZE_X - 2) - 1) / (BLOCK_SIZE_X - 2) //-2 for increased no blocks for ghost cells +#define N_BLOCKS_Y (N_Y + (BLOCK_SIZE_Y - 2) - 1) / (BLOCK_SIZE_Y - 2) +#define N_BLOCKS_RAND (N + (BLOCK_SIZE_X * BLOCK_SIZE_Y) - 1) / (BLOCK_SIZE_X * BLOCK_SIZE_Y) +#define N_BLOCKS_COPY_X (N_X + BLOCK_SIZE_COPY_X - 1) / BLOCK_SIZE_COPY_X +#define N_BLOCKS_COPY_Y (N_Y + BLOCK_SIZE_COPY_Y - 1) / BLOCK_SIZE_COPY_Y +#define STREAM_COUNT 5 -__global__ void setup_rand(curandState *state){ +namespace CUMath +{ + //non-empty constructor was drastically slowing down performance (1->10ms) + __host__ __device__ SimpleComplex::SimpleComplex() + { + //real = 0.0f; + //imag = 0.0f; + } + + __host__ __device__ SimpleComplex::SimpleComplex(float real, float imag) + { + this->real = real; + this->imag = imag; + } + + __host__ __device__ SimpleComplex SimpleComplex::Polar(float amp, float theta) + { + return SimpleComplex(cosf(theta) * amp, sinf(theta) * amp); + } + + __host__ __device__ float SimpleComplex::abs() + { + return sqrt(real * real + imag * imag); + } + __host__ __device__ float SimpleComplex::absSq() + { + return real * real + imag * imag; + } + + __host__ __device__ float SimpleComplex::Angle() + { + float angle = 0.0f; + angle = atan2f(imag, real); + + if(real < 0) + { + angle += CUDART_PI_F; + } + else if(angle < 0) + { + angle += CUDART_PI_F * 2.0f; + } + + return angle; + } - int idx = threadIdx.x + blockIdx.x * blockDim.x; - curand_init(1234, idx, 0, &state[idx]); + __host__ __device__ SimpleComplex SimpleComplex::operator*(const float& f) const + { + return SimpleComplex(real * f, imag * f); + } + + __host__ __device__ SimpleComplex SimpleComplex::operator/(const float& f) const + { + return SimpleComplex(real / f, imag / f); + } + + __host__ __device__ SimpleComplex SimpleComplex::operator+(const SimpleComplex& c) const + { + return SimpleComplex(real + c.real, imag + c.imag); + } } -inline -__device__ unsigned char countAliveCells(int *data, size_t x0, size_t x1, size_t x2, - size_t y0, size_t y1, size_t y2) +struct HQubit { - return data[x0 + y0] + data[x1 + y0] + data[x2 + y0] - + data[x0 + y1] + data[x2 + y1] - + data[x0 + y2] + data[x1 + y2] + data[x2 + y2]; -} + std::complex zero = std::complex(); + std::complex one = std::complex(); -__global__ -void GOL(uchar4 *texBuf, int *lifeBuf, int *output, size_t width, size_t height) + HQubit(){}; + + HQubit(float amp, float theta) + { + one = std::polar(amp, theta); //std::complex(amp, theta); + zero = std::polar(1 - amp, theta); + } + + //QCA + //|modulus| of sum of surrounding neighbours = rule to apply + + void Normalise() + { + double norm = sqrt(abs(zero) * abs(zero) + abs(one) * abs(one)); //sqrt(pow(abs(zero), 2) + pow(abs(one), 2)); + zero /= norm; + one /= norm; + } + + int Measure() + { + float oneProb = abs(one) * abs(one); //pow(abs(one), 2); + float roll = (rand() / (float)RAND_MAX); + + if(roll < oneProb) + { + return 1; + } + else + { + return 0; + } + } +}; + +struct DQubit +{ + CUMath::SimpleComplex zero, one; + + __host__ __device__ DQubit(){} + + __host__ __device__ DQubit(float amp, float theta) + { + one = CUMath::SimpleComplex::Polar(amp, theta); + zero = CUMath::SimpleComplex::Polar(sqrtf(1.0f - (amp * amp)), theta); + } + + //QCA + //|modulus| of sum of surrounding neighbours = rule to apply + //sum of phase = theta to use in OP + + __host__ __device__ void Normalise() + { + float norm = sqrtf(zero.absSq() + one.absSq()); //sqrt(pow(abs(zero), 2) + pow(thrust::abs(one), 2)); + one = one / norm; + zero = zero / norm; + } + + //to-do: implement prob field with white = dead % and varying colours (from angle) = alive + //look up gradient implementation + __device__ int Measure(curandState *state) + { + //prob of finding qubit in |1> + float oneProb = one.absSq(); + + //curand 0-1 + if(curand_uniform(state) < oneProb) + { + return 1; + } + else + { + return 0; + } + } +}; + +__device__ curandState randArray[N]; //rand doesn't need extra + +static curandState* randPtr; +static int *lifePtr; +static int *lifeTempPtr; +static DQubit *qubitPtr; +static DQubit *qubitTempPtr; +static int *cornersPtr; +static CUTimer t("Timings\\QGoL_Shared_256_5.txt"); +static cudaStream_t streams[STREAM_COUNT]; + +__global__ void setup_rand(curandState *state) { int x = threadIdx.x + blockIdx.x * blockDim.x; int y = threadIdx.y + blockIdx.y * blockDim.y; int offset = x + y * blockDim.x * gridDim.x; + if(offset < (N_X * N_Y)) + { + curand_init((unsigned long long)clock(), offset, 0, &state[offset]); //random seed of (unsigned long long)clock() + } +} + +__global__ void CopyToTop(int *life, DQubit *qubits) +{ + //copy bottom row to top (ghost cells) + int x = threadIdx.x + blockIdx.x * blockDim.x + 1; //threads = 1 <= N_X - if(offset < N) + if(x <= N_X) { - size_t x1 = offset % width; - size_t y1 = offset - x1; - size_t y0 = (y1 + (width * height) - width) % (width * height); - size_t y2 = (y1 + width) % (width * height); - size_t x0 = (x1 + width - 1) % width; - size_t x2 = (x1 + 1) % width; + life[x] = life[x + N_Y * (N_X + 2)]; //N_Y + qubits[x] = qubits[x + N_Y * (N_X + 2)]; + } +} + +__global__ void CopyToBottom(int *life, DQubit *qubits) +{ + //copy top row to bottom (ghost cells) + int x = threadIdx.x + blockIdx.x * blockDim.x + 1; //threads = 1 <= N_X - unsigned char aliveCells = countAliveCells(lifeBuf, x0, x1, x2, y0, y1, y2); - output[y1 + x1] = - aliveCells == 3 || (aliveCells == 2 && lifeBuf[x1 + y1]) ? 1 : 0; + if(x <= N_X) + { + life[x + (N_Y + 1) * (N_X + 2)] = life[x + N_X + 2]; + qubits[x + (N_Y + 1) * (N_X + 2)] = qubits[x + N_X + 2]; } } +__global__ void CopyToLeft(int *life, DQubit *qubits) +{ + //copy right column to left (ghost cells) + int x = threadIdx.x + blockIdx.x * blockDim.x + 1; //threads = 1 <= N_Y + + if(x <= N_Y) + { + x *= N_X + 2; //transform to vertical + + life[x] = life[x + N_X]; + qubits[x] = qubits[x + N_X]; + } +} + +__global__ void CopyToRight(int *life, DQubit *qubits) +{ + //copy left column to right (ghost cells) + int x = threadIdx.x + blockIdx.x * blockDim.x + 1; //threads = 1 <= N_Y + + if(x <= N_Y) + { + x *= N_X + 2; //transform to vertical + + life[x + (N_X + 1)] = life[x + 1]; + qubits[x + (N_X + 1)] = qubits[x + 1]; + } +} + +//ids contains destination and source ids (0-3 = dest, 4-7 = source) +__global__ void CopyToCorners(int *life, DQubit *qubits, int ids[]) +{ + //copy left column to right (ghost cells) + int x = threadIdx.x + blockIdx.x * blockDim.x; //threads = 0 < 4 + life[ids[x]] = life[ids[x + 4]]; + qubits[ids[x]] = qubits[ids[x + 4]]; +} + +inline +__device__ void BirthOp(DQubit *q, float thetaSum, float multiplier = 1.0f) +{ + //a+|b|e^(i*theta) + + //*q = (*q + DQubit::Polar(q->ZeroStateAmp, thetaSum)) * multiplier; + q->one = (q->one + CUMath::SimpleComplex::Polar(q->zero.abs(), thetaSum)) * multiplier; + q->zero = CUMath::SimpleComplex(0.0f, 0.0f); +} + +//|0> angle does not effect simulations? +inline +__device__ void DeathOp(DQubit *q, float thetaSum, float multiplier = 1.0f) +{ + //b + |a|e^(i*theta) + + //*q = (DQubit::Polar(q->ZeroStateAmp, q->Angle()) + DQubit::Polar(q->cAbs(), thetaSum)) * multiplier; + q->zero = (q->zero + CUMath::SimpleComplex::Polar(q->one.abs(), thetaSum)) * multiplier; + q->one = CUMath::SimpleComplex(0.0f, 0.0f); +} + +//optimise qubits passed in +//load in block to shared +//watch out for overlap (load extra or use global sparingly) +inline +__device__ CUMath::SimpleComplex SumNeighbours(DQubit(*qubits)[BLOCK_SIZE_X][BLOCK_SIZE_Y], int(*lifeData)[BLOCK_SIZE_X][BLOCK_SIZE_Y], int x, int y) +{ + //sum of all surrounding superpositions (Ae^(i*theta)) + + CUMath::SimpleComplex sum = CUMath::SimpleComplex(0.0f, 0.0f); + + if((*lifeData)[x - 1][y - 1] == 1) + sum = sum + (*qubits)[x - 1][y - 1].one; + if((*lifeData)[x][y - 1] == 1) + sum = sum + (*qubits)[x][y - 1].one; + if((*lifeData)[x + 1][y - 1] == 1) + sum = sum + (*qubits)[x + 1][y - 1].one; + if((*lifeData)[x - 1][y] == 1) + sum = sum + (*qubits)[x - 1][y].one; + if((*lifeData)[x + 1][y] == 1) + sum = sum + (*qubits)[x + 1][y].one; + if((*lifeData)[x - 1][y + 1] == 1) + sum = sum + (*qubits)[x - 1][y + 1].one; + if((*lifeData)[x][y + 1] == 1) + sum = sum + (*qubits)[x][y + 1].one; + if((*lifeData)[x + 1][y + 1] == 1) + sum = sum + (*qubits)[x + 1][y + 1].one; + + //no if statements - causes NaN errors with NSIGHT (probably from casting 0 to float) + /*sum += (*qubits)[x - 1][y - 1].one * (float)(*lifeData)[x - 1][y - 1]; + sum += (*qubits)[x][y - 1].one * (float)(*lifeData)[x][y - 1]; + sum += (*qubits)[x + 1][y - 1].one * (float)(*lifeData)[x + 1][y - 1]; + sum += (*qubits)[x - 1][y].one * (float)(*lifeData)[x - 1][y]; + sum += (*qubits)[x + 1][y].one * (float)(*lifeData)[x + 1][y]; + sum += (*qubits)[x - 1][y + 1].one * (float)(*lifeData)[x - 1][y + 1]; + sum += (*qubits)[x][y + 1].one * (float)(*lifeData)[x][y + 1]; + sum += (*qubits)[x + 1][y + 1].one * (float)(*lifeData)[x + 1][y + 1];*/ + + return sum; +} + +//remove temps from params +__global__ +void QGOL(float *topProb, float *bottomProb, int *lifeBuf, int *output, DQubit *qubits, DQubit *tempQubits, curandState *states) +{ + int t_X = threadIdx.x; + int t_Y = threadIdx.y; + //new x/y coords with ghost cells + int x = t_X + blockIdx.x * (blockDim.x - 2); //pushback id to cover overlap column from prev block + int y = t_Y + blockIdx.y * (blockDim.y - 2); //pushback id to cover overlap row from prev block + int offset = x + y * (N_X + 2); //use N_X over blockDim * gridDim due to overlapping blocks + int innerOffset = (x - 1) + (y - 1) * N_X; //move up/left diag and put into inner grid dim + + //change to 1D array and test perf + __shared__ int s_Life[BLOCK_SIZE_X][BLOCK_SIZE_Y]; + __shared__ DQubit s_Qubits[BLOCK_SIZE_X][BLOCK_SIZE_Y]; + + //if in range (inc ghost cells) + if(x < (N_X + 2) && y < (N_Y + 2)) + { + s_Life[t_X][t_Y] = lifeBuf[offset]; + s_Qubits[t_X][t_Y] = qubits[offset]; + } + + __syncthreads(); + + if(x > 0 && y > 0 && x < (N_X + 1) && y < (N_Y + 1)) //skips ghost cells + { + if(t_X > 0 && t_X < blockDim.x - 1 && t_Y > 0 && t_Y < blockDim.y - 1) //skip overlap cells + { + //sum neighbours + //take abs(sum) for neighbour count + //take angle from sum to use in various ops + //perform op + //normalise + + curandState localState = states[innerOffset]; //use inner grid id to reduce number of rand variables + DQubit q = s_Qubits[t_X][t_Y]; + DQubit qtemp = q; + + CUMath::SimpleComplex sum = SumNeighbours(&s_Qubits, &s_Life, t_X, t_Y); + float mod = sum.abs(); + float sumAngle = sum.Angle(); + + //determine op from mod + //0 <= A <= 1 op = D + //1 < A <= 2 op = (sqrt(2)+1)(2-A)D + (A-1)S + //2 < A <= 3 op = (sqrt(2)+1)(3-A)S + (A-2)B + //3 < A < 4 op = (sqrt(2)+1)(4-A)B + (A-3)D + //A >= 4 op = D + + if(mod >= 0 && mod <= 1) + { + //D + DeathOp(&q, sumAngle); //.imag != angle //change 1st/last OP to q = 0 for optimisation + } + else if(mod > 1 && mod <= 2) + { + //D & S + DeathOp(&q, sumAngle, (sqrtf(2.0f) + 1.0f) * (2.0f - mod)); + qtemp.zero = qtemp.zero * (mod - 1.0f); + qtemp.one = qtemp.one * (mod - 1.0f); + q.zero = q.zero + qtemp.zero; + q.one = q.one + qtemp.one; + } + else if(mod > 2 && mod <= 3) + { + //S & B + q.zero = q.zero * (sqrtf(2.0f) + 1.0f) * (3.0f - mod); + q.one = q.one * (sqrtf(2.0f) + 1.0f) * (3.0f - mod); + BirthOp(&qtemp, sumAngle, (mod - 2.0f)); + q.zero = q.zero + qtemp.zero; + q.one = q.one + qtemp.one; + } + else if(mod > 3 && mod < 4) + { + //B & D + BirthOp(&q, sumAngle, (sqrtf(2.0f) + 1.0f) * (4.0f - mod)); + DeathOp(&qtemp, sumAngle, (mod - 3.0f)); + q.zero = q.zero + qtemp.zero; + q.one = q.one + qtemp.one; + } + else if(mod >= 4) + { + //D + DeathOp(&q, sumAngle); + } + else + { + //something went wrong + assert(0); + } + + //measure state to update lifebuf + //update tex + + q.Normalise(); + + int alive = q.Measure(&localState); + + output[offset] = alive; + topProb[innerOffset] = q.one.absSq(); + bottomProb[innerOffset] = q.zero.absSq(); + //texBuf[innerOffset].x = (alive == 0) ? 255 : 0; //check perf + //texBuf[offset].y = (abs(qtemp2.one) == 0) ? 255 : 0; //for multi-colour cells (D/D = White|D/A = Green|A/D = Purple|A/A = Black) + //texBuf[offset].y = (alive == 0) ? 255 : 0; + //texBuf[offset].z = (alive == 0) ? 255 : 0; + //texBuf[offset].w = 255; + tempQubits[offset] = q; + } + } +} + +void FindCornerIDs(int *ids) +{ + ids[0] = 0; //top left + ids[1] = N_X + 1; //top right + ids[2] = (N_X + 2) * (N_Y + 2) - (N_X + 2); //bottom left + ids[3] = (N_X + 2) * (N_Y + 2) - 1; //bottom right + ids[4] = ids[3] - (N_X + 2) - 1; + ids[5] = ids[4] - (N_X - 1); + ids[6] = (N_X + 2) + 1 + (N_X - 1); + ids[7] = ids[6] - (N_X - 1); +} + +void CUSetup() +{ + //cudaOccupancyMaxPotentialBlockSize(... + for(int i = 0; i < STREAM_COUNT; i++) + { + cudaStreamCreate(&streams[i]); + } + + ERRORCHECK(cudaGetSymbolAddress((void**)&randPtr, randArray)); + setup_rand << > >(randPtr); + ERRORCHECK(cudaGetLastError()); + + int *hCornerPtr = (int*)malloc(8 * sizeof(int)); + FindCornerIDs(hCornerPtr); + ERRORCHECK(cudaMalloc((void**)&cornersPtr, 8 * sizeof(int))); + ERRORCHECK(cudaMemcpy(cornersPtr, hCornerPtr, 8 * sizeof(int), cudaMemcpyHostToDevice)); + + int *hLifePtr = (int*)malloc((N_X + 2) * (N_Y + 2) * sizeof(int)); + DQubit *hQubitPtr = (DQubit*)malloc((N_X + 2) * (N_Y + 2) * sizeof(DQubit)); + + for(int i = 0; i < (N_X + 2) * (N_Y + 2); ++i) + { + hLifePtr[i] = (1.5f - 0.5f) * (rand() / (float)RAND_MAX) + 0.5f; + hQubitPtr[i] = DQubit(hLifePtr[i], (rand() / (float)RAND_MAX) * (2 * CUDART_PI_F)); + } + + ERRORCHECK(cudaMalloc((void**)&lifePtr, (N_X + 2) * (N_Y + 2) * sizeof(int))); + ERRORCHECK(cudaMalloc((void**)&lifeTempPtr, (N_X + 2) * (N_Y + 2) * sizeof(int))); + ERRORCHECK(cudaMemcpy(lifePtr, hLifePtr, (N_X + 2) * (N_Y + 2) * sizeof(int), cudaMemcpyHostToDevice)); + ERRORCHECK(cudaMemcpy(lifeTempPtr, lifePtr, (N_X + 2) * (N_Y + 2) * sizeof(int), cudaMemcpyDeviceToDevice)); + + ERRORCHECK(cudaMalloc((void**)&qubitPtr, (N_X + 2) * (N_Y + 2) * sizeof(DQubit))); + ERRORCHECK(cudaMalloc((void**)&qubitTempPtr, (N_X + 2) * (N_Y + 2) * sizeof(DQubit))); + ERRORCHECK(cudaMemcpy(qubitPtr, hQubitPtr, (N_X + 2) * (N_Y + 2) * sizeof(DQubit), cudaMemcpyHostToDevice)); + ERRORCHECK(cudaMemcpy(qubitTempPtr, qubitPtr, (N_X + 2) * (N_Y + 2) * sizeof(DQubit), cudaMemcpyDeviceToDevice)); + + free(hCornerPtr); + free(hLifePtr); + free(hQubitPtr); +} + //UI option for iterations void CUExecuteKernel(std::vector *params) //std::vector *params, size_t instances, float dt { - //CUTimer t; - //t.Begin(); - GOL<<>>((uchar4*)(params->at(0)), (int*)(params->at(1)), (int*)(params->at(2))); + t.Begin(); + + CopyToTop << > >(lifePtr, qubitPtr); + CopyToBottom << > >(lifePtr, qubitPtr); + CopyToLeft << > >(lifePtr, qubitPtr); + CopyToRight << > >(lifePtr, qubitPtr); + CopyToCorners << <1, 4, 0, streams[4] >> >(lifePtr, qubitPtr, cornersPtr); + + cudaDeviceSynchronize(); + + QGOL << > >((float*)(params->at(0)), (float*)(params->at(1)), lifePtr, lifeTempPtr, qubitPtr, qubitTempPtr, randPtr); + + t.End(); + + //normal swap since static + std::swap(lifePtr, lifeTempPtr); + std::swap(qubitPtr, qubitTempPtr); ERRORCHECK(cudaGetLastError()); - //t.End(); } \ No newline at end of file diff --git a/Savable.h b/Savable.h new file mode 100644 index 0000000..80a2bca --- /dev/null +++ b/Savable.h @@ -0,0 +1,12 @@ +#pragma once + +#include +#include + +class Savable +{ +public: + virtual ~Savable(); + virtual void Save(QTextStream *output, std::vector *varList); +}; + diff --git a/Shaders/bottom_prob_3_3.vert b/Shaders/bottom_prob_3_3.vert new file mode 100644 index 0000000..ea2e7d7 --- /dev/null +++ b/Shaders/bottom_prob_3_3.vert @@ -0,0 +1,15 @@ +#version 330 + +uniform highp mat4 uModelMatrix; +uniform highp mat4 uViewMatrix; +uniform highp mat4 uProjMatrix; + +in highp vec3 aPos; +in int gl_InstanceID; + +void main() +{ + vec3 iPos = vec3(gl_InstanceID % 256, 0, gl_InstanceID / 256); + iPos *= 2.0f; //2 = cell width + gl_Position = uProjMatrix * uViewMatrix * uModelMatrix * vec4(aPos + iPos, 1.0); +} \ No newline at end of file diff --git a/Shaders/heightmap.frag b/Shaders/heightmap.frag new file mode 100644 index 0000000..adaf08b --- /dev/null +++ b/Shaders/heightmap.frag @@ -0,0 +1,14 @@ +#version 330 + +uniform sampler2D texture; + +in mediump vec2 texCoords; + +layout(location = 0) out highp vec4 colour; + +void main() +{ + colour = texture2D(texture, texCoords); + colour.g += colour.r; + colour.b += colour.r; +} \ No newline at end of file diff --git a/Shaders/heightmap.vert b/Shaders/heightmap.vert new file mode 100644 index 0000000..6b5f8e2 --- /dev/null +++ b/Shaders/heightmap.vert @@ -0,0 +1,22 @@ +#version 330 + +uniform highp mat4 uModelMatrix; +uniform highp mat4 uViewMatrix; +uniform highp mat4 uProjMatrix; +uniform sampler2D texture; + +in highp vec3 aPos; +in highp vec4 iPos; +in mediump vec2 aUV; + +out mediump vec2 texCoords; + +void main() +{ + vec4 colour = texture2D(texture, aUV); + texCoords = aUV; + + vec4 position = vec4(aPos + iPos.xyz, 1.0); + position.y += colour.r; + gl_Position = uProjMatrix * uViewMatrix * uModelMatrix * position; +} \ No newline at end of file diff --git a/Shaders/prob_3_3.frag b/Shaders/prob_3_3.frag new file mode 100644 index 0000000..b3f8245 --- /dev/null +++ b/Shaders/prob_3_3.frag @@ -0,0 +1,14 @@ +#version 330 + +uniform sampler2D tex; + +layout(location = 0) out highp vec4 colour; +in mediump vec2 texCoords; + +void main() +{ + colour = texture2D(tex, texCoords); + + if(colour == vec4(1.0, 1.0, 1.0, 1.0)) + colour = vec4(1.0, 0.0, 0.0, 1.0); +} \ No newline at end of file diff --git a/Shaders/simple_3_3.frag b/Shaders/simple_3_3.frag index d6dab31..adaf08b 100644 --- a/Shaders/simple_3_3.frag +++ b/Shaders/simple_3_3.frag @@ -9,4 +9,6 @@ layout(location = 0) out highp vec4 colour; void main() { colour = texture2D(texture, texCoords); + colour.g += colour.r; + colour.b += colour.r; } \ No newline at end of file diff --git a/Shaders/simple_3_3.vert b/Shaders/simple_3_3.vert index 5966ad7..773c2c8 100644 --- a/Shaders/simple_3_3.vert +++ b/Shaders/simple_3_3.vert @@ -1,13 +1,13 @@ #version 330 -in highp vec3 aPos; -in highp vec4 iPos; -in mediump vec2 aUV; - uniform highp mat4 uModelMatrix; uniform highp mat4 uViewMatrix; uniform highp mat4 uProjMatrix; +in highp vec3 aPos; +in highp vec4 iPos; +in mediump vec2 aUV; + out mediump vec2 texCoords; void main() diff --git a/Shaders/top_prob_3_3.vert b/Shaders/top_prob_3_3.vert new file mode 100644 index 0000000..7ee6b8a --- /dev/null +++ b/Shaders/top_prob_3_3.vert @@ -0,0 +1,31 @@ +#version 330 + +uniform highp mat4 uModelMatrix; +uniform highp mat4 uViewMatrix; +uniform highp mat4 uProjMatrix; + +in highp vec3 aPos; +in mediump vec2 aUV; +in float tProb; +in float bProb; +in int gl_InstanceID; + +out mediump vec2 texCoords; + +void main() +{ + texCoords = aUV; + + vec3 iPos = vec3(gl_InstanceID % 256, 0, gl_InstanceID / 256); + iPos *= 2.0f; //2 = cell width + + vec4 gridPos = vec4(aPos + iPos, 1.0); + + if(gridPos.y > 0) + { + gridPos.y *= (50 * tProb); + //texCoords.y *= (50 * tProb); + } + + gl_Position = uProjMatrix * uViewMatrix * uModelMatrix * gridPos; +} \ No newline at end of file diff --git a/bufferpopup.cpp b/bufferpopup.cpp index f05ce66..5d2342d 100644 --- a/bufferpopup.cpp +++ b/bufferpopup.cpp @@ -1,41 +1,13 @@ #include "bufferpopup.h" #include "glsettings.h" -#pragma region Shapes -float quad[] = -{ - -0.5f, -0.5f, 0.0f, - -0.5f, 0.5f, 0.0f, - 0.5f, 0.5f, 0.0f, - 0.5f, 0.5f, 0.0f, - 0.5f, -0.5f, 0.0f, - -0.5f, -0.5f, 0.0f -}; - -float quadUV[] = -{ - 0.0f, 1.0f, - 0.0f, 0.0f, - 1.0f, 0.0f, - 1.0f, 0.0f, - 1.0f, 1.0f, - 0.0f, 1.0f -}; - -GLfloat triangle[] = -{ - -1.0f, -1.0f, 0.0f, - 0.0f, 1.0f, 0.0f, - 1.0f, -1.0f, 0.0f, -}; -#pragma endregion Shapes - BufferPopup::BufferPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint) { append = false; //Object detail popup //setup layouts/widgets mainLayout = new QGridLayout; + checkboxLayout = new QHBoxLayout; nameLabel = new QLabel("Name/ID:"); targetLabel = new QLabel("Target:"); @@ -46,12 +18,14 @@ BufferPopup::BufferPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint attribCapacityLabel = new QLabel("Attribute Capacity:"); typeLabel = new QLabel("Type:"); normalisedLabel = new QLabel("Normalised:"); + perInstanceLabel = new QLabel("Per Instance:"); nameBox = new QLineEdit; //SIGNAL/SLOT if there's parameters targetBox = new QComboBox; targetBox->addItem("GL_ARRAY_BUFFER"); + targetBox->addItem("GL_ELEMENT_ARRAY_BUFFER"); targetBox->addItem("GL_PIXEL_UNPACK_BUFFER"); targetBox->connect(targetBox, SIGNAL(currentIndexChanged(int)), this, SLOT(TargetChanged(int))); @@ -63,7 +37,10 @@ BufferPopup::BufferPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint dataPickerBox = new QComboBox; dataPickerBox->addItem("Custom"); dataPickerBox->addItem("Screen Aligned Quad Vertices"); - dataPickerBox->addItem("Screen Aligned Quad UV"); + dataPickerBox->addItem("Screen Aligned Quad UVs"); + dataPickerBox->addItem("Cube Vertices"); + dataPickerBox->addItem("Cube UVs"); + dataPickerBox->addItem("Cube Indices"); dataPickerBox->connect(dataPickerBox, SIGNAL(currentIndexChanged(int)), this, SLOT(DataChanged(int))); dataBox = new QLineEdit; @@ -74,6 +51,7 @@ BufferPopup::BufferPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint { textureBox->addItem(GLSettings::TextureList.at(i)->Name()); } + textureBox->connect(textureBox, SIGNAL(currentIndexChanged(int)), this, SLOT(TextureChanged(int))); textureBox->hide(); usageBox = new QComboBox; @@ -101,6 +79,12 @@ BufferPopup::BufferPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint typeBox->addItem("GL_UNSIGNED_BYTE"); normalisedBox = new QCheckBox; + perInstanceBox = new QCheckBox; + + checkboxLayout->addWidget(normalisedLabel); + checkboxLayout->addWidget(normalisedBox); + checkboxLayout->addWidget(perInstanceLabel); + checkboxLayout->addWidget(perInstanceBox); buttons = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel); connect(buttons, SIGNAL(accepted()), this, SLOT(Save())); @@ -124,8 +108,7 @@ BufferPopup::BufferPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint mainLayout->addWidget(attribCapacityBox, 7, 1); mainLayout->addWidget(typeLabel, 8, 0); mainLayout->addWidget(typeBox, 8, 1); - mainLayout->addWidget(normalisedLabel, 9, 0); - mainLayout->addWidget(normalisedBox, 9, 1); + mainLayout->addLayout(checkboxLayout, 9, 0, 1, 2); mainLayout->addWidget(buttons, 10, 1); setLayout(mainLayout); @@ -150,13 +133,28 @@ BufferPopup::BufferPopup(QWidget* parent, CUGLBuffer *b) : BufferPopup(parent) dataPickerBox->setCurrentIndex(2); DisableBufferBoxes(true); } + else if(b->bName == "Cube Vertices") + { + dataPickerBox->setCurrentIndex(3); + DisableBufferBoxes(true); + } + else if(b->bName == "Cube UVs") + { + dataPickerBox->setCurrentIndex(4); + DisableBufferBoxes(true); + } + else if(b->bName == "Cube Indices") + { + dataPickerBox->setCurrentIndex(5); + DisableBufferBoxes(true); + } else { dataPickerBox->setCurrentIndex(0); dataBox->setText(b->bDataPath); DisableBufferBoxes(false); } - + usageBox->setCurrentIndex(usageBox->findText(b->bUsage.second)); attribNameBox->setText(b->aID.first); attribCapacityBox->setValue(b->aSize); @@ -166,30 +164,6 @@ BufferPopup::BufferPopup(QWidget* parent, CUGLBuffer *b) : BufferPopup(parent) BufferPopup::~BufferPopup() { - delete nameLabel; - delete targetLabel; - delete capacityLabel; - delete dataLabel; - delete usageLabel; - delete attribNameLabel; - delete attribCapacityLabel; - delete typeLabel; - delete normalisedLabel; - - delete nameBox; - delete dataPickerBox; - delete dataBox; - delete textureBox; - delete attribNameBox; - delete capacityBox; - delete attribCapacityBox; - delete targetBox; - delete usageBox; - delete typeBox; - delete normalisedBox; - - delete buttons; - delete mainLayout; } @@ -206,18 +180,18 @@ bool BufferPopup::Validation() { nameBox->setStyleSheet(""); } - + //set bool for correct custom load //if not empty, check for successful load //if blank, set data as 0 /*if(dataBox->text().isEmpty()) //or if file fails to load { - dataBox->setStyleSheet("border: 2px solid red"); - result = false; + dataBox->setStyleSheet("border: 2px solid red"); + result = false; } else { - dataBox->setStyleSheet(""); + dataBox->setStyleSheet(""); }*/ if(attribNameBox->text().isEmpty()) //if string, check returned id @@ -258,75 +232,43 @@ void BufferPopup::TargetChanged(int i) { switch(i) { - case 0: - { - dataLabel->setText("Data:"); - dataPickerBox->show(); - dataBox->show(); + case 0: + case 1: + { + dataLabel->setText("Data:"); + dataPickerBox->show(); + dataBox->show(); - capacityLabel->show(); - capacityBox->show(); + capacityLabel->show(); + capacityBox->show(); + capacityBox->setValue(0); - textureBox->hide(); - break; - } - case 1: - { - dataLabel->setText("Texture:"); - dataPickerBox->hide(); - dataBox->hide(); + textureBox->hide(); + break; + } + case 2: + { + dataLabel->setText("Texture:"); + dataPickerBox->hide(); + dataBox->hide(); - capacityLabel->hide(); - capacityBox->hide(); + capacityLabel->hide(); + capacityBox->hide(); - textureBox->show(); - break; - } + textureBox->show(); + textureBox->setCurrentIndex(-1); + textureBox->setCurrentIndex(0); + break; } -} - -void BufferPopup::SetTarget() -{ - switch(targetBox->currentIndex()) - { - case 0: - { - target.first = GL_ARRAY_BUFFER; - break; - } - case 1: - { - target.first = GL_PIXEL_UNPACK_BUFFER; - break; - } } - - target.second = targetBox->currentText(); } -void BufferPopup::SetData() +void BufferPopup::TextureChanged(int i) { - if(targetBox->currentIndex() == 0) - { - switch(dataPickerBox->currentIndex()) - { - case 1: - { - data = quad; - break; - } - case 2: - { - data = quadUV; - break; - } - } - } - else + if(i != -1) { Texture *t = GLSettings::TextureList.at(textureBox->currentIndex()); - capacityBox->setValue(t->ImageSize().width() * t->ImageSize().height() * 4); - data = nullptr;//(void*)t->Data(); + capacityBox->setValue(t->ImageSize().width() * t->ImageSize().height() * t->FormatCount()); } } @@ -334,43 +276,85 @@ void BufferPopup::DataChanged(int i) { switch(i) { - case 0: - nameBox->setText(""); - capacityBox->setValue(1); - attribNameBox->setText(""); - attribCapacityBox->setValue(0); - - DisableBufferBoxes(false); - CustomDataClicked(); - break; - case 1: - //SAQ Verts - nameBox->setText("Screen Aligned Quad Vertices"); - capacityBox->setValue(18); - targetBox->setCurrentIndex(0); - dataBox->setText(""); - usageBox->setCurrentIndex(0); - attribNameBox->setText("aPos"); - attribCapacityBox->setValue(3); - typeBox->setCurrentIndex(0); - normalisedBox->setChecked(false); - - DisableBufferBoxes(true); - break; - case 2: - //SAQ UVs - nameBox->setText("Screen Aligned Quad UVs"); - capacityBox->setValue(12); - targetBox->setCurrentIndex(0); - dataBox->setText(""); - usageBox->setCurrentIndex(0); - attribNameBox->setText("aUV"); - attribCapacityBox->setValue(2); - typeBox->setCurrentIndex(0); - normalisedBox->setChecked(false); - - DisableBufferBoxes(true); - break; + case 0: + nameBox->setText(""); + capacityBox->setValue(1); + attribNameBox->setText(""); + attribCapacityBox->setValue(0); + + DisableBufferBoxes(false); + CustomDataClicked(); + break; + case 1: + //SAQ Verts + nameBox->setText("Screen Aligned Quad Vertices"); + targetBox->setCurrentIndex(0); + capacityBox->setValue(18); + dataBox->setText(""); + usageBox->setCurrentIndex(0); + attribNameBox->setText("aPos"); + attribCapacityBox->setValue(3); + typeBox->setCurrentIndex(0); + normalisedBox->setChecked(false); + + DisableBufferBoxes(true); + break; + case 2: + //SAQ UVs + nameBox->setText("Screen Aligned Quad UVs"); + targetBox->setCurrentIndex(0); + capacityBox->setValue(12); + dataBox->setText(""); + usageBox->setCurrentIndex(0); + attribNameBox->setText("aUV"); + attribCapacityBox->setValue(2); + typeBox->setCurrentIndex(0); + normalisedBox->setChecked(false); + + DisableBufferBoxes(true); + break; + case 3: + //Cube + nameBox->setText("Cube Vertices"); + targetBox->setCurrentIndex(0); + capacityBox->setValue(108); + dataBox->setText(""); + usageBox->setCurrentIndex(0); + attribNameBox->setText("aPos"); + attribCapacityBox->setValue(3); + typeBox->setCurrentIndex(0); + normalisedBox->setChecked(false); + + DisableBufferBoxes(true); + break; + case 4: + //Cube + nameBox->setText("Cube UVs"); + targetBox->setCurrentIndex(0); + capacityBox->setValue(72); + dataBox->setText(""); + usageBox->setCurrentIndex(0); + attribNameBox->setText("aUV"); + attribCapacityBox->setValue(2); + typeBox->setCurrentIndex(0); + normalisedBox->setChecked(false); + + DisableBufferBoxes(true); + break; + case 5: + //Cube + nameBox->setText("Cube Indices"); + targetBox->setCurrentIndex(1); + capacityBox->setValue(36); + dataBox->setText(""); + usageBox->setCurrentIndex(0); + attribNameBox->setText("aIndex"); + attribCapacityBox->setValue(1); + typeBox->setCurrentIndex(6); + normalisedBox->setChecked(false); + + DisableBufferBoxes(true); + break; } } @@ -379,7 +363,7 @@ void BufferPopup::CustomDataClicked() QString s; QString title = "Open Data File"; QString filter = ""; - + s = QFileDialog::getOpenFileName(this, title, QDir::currentPath(), filter); if(s.size() == 0) return; //cancelled @@ -388,108 +372,35 @@ void BufferPopup::CustomDataClicked() dataBox->setCursorPosition(s.size()); } -void BufferPopup::SetUsage() -{ - switch(usageBox->currentIndex()) - { - case 0: - usage.first = GL_DYNAMIC_DRAW; - break; - case 1: - usage.first = GL_DYNAMIC_COPY; - break; - case 2: - usage.first = GL_STATIC_DRAW; - break; - case 3: - usage.first = GL_STATIC_COPY; - break; - } - - usage.second = usageBox->currentText(); -} - -void BufferPopup::SetType() -{ - GLenum typeEnum; - QString typeString = typeBox->currentText(); - int size; - - switch(typeBox->currentIndex()) - { - case 0: - typeEnum = GL_FLOAT; - size = sizeof(float); - break; - case 1: - typeEnum = GL_HALF_FLOAT; - size = sizeof(float) / 2; - break; - case 2: - typeEnum = GL_DOUBLE; - size = sizeof(double); - break; - case 3: - typeEnum = GL_INT; - size = sizeof(int); - break; - case 4: - typeEnum = GL_UNSIGNED_INT; - size = sizeof(unsigned int); - break; - case 5: - typeEnum = GL_SHORT; - size = sizeof(short); - break; - case 6: - typeEnum = GL_UNSIGNED_SHORT; - size = sizeof(unsigned short); - break; - case 7: - typeEnum = GL_BYTE; - size = sizeof(byte); - break; - case 8: - typeEnum = GL_UNSIGNED_BYTE; - size = sizeof(byte); - break; - } - - type = std::make_tuple(typeEnum, typeString, size); -} - void BufferPopup::Save() { if(Validation()) { - SetTarget(); - SetData(); - SetUsage(); - SetType(); - QString name = nameBox->text(); + QString target = targetBox->currentText(); + QString dataType = dataPickerBox->currentText(); int capacity = capacityBox->value(); - QString dataPath = dataBox->text(); - std::pair aID(attribNameBox->text(), -1); + QString dataPath = (targetBox->currentIndex() == 2) ? QString::number(textureBox->currentIndex()) : dataBox->text(); + QString usage = usageBox->currentText(); + QString aID = attribNameBox->text(); int aCapacity = attribCapacityBox->value(); + QString type = typeBox->currentText(); bool norm = normalisedBox->isChecked(); + bool perInstance = perInstanceBox->isChecked(); if(!append) { CUGLBuffer* b; + b = new CUGLBuffer(name, capacity, target, dataType, dataPath, usage, aID, aCapacity, type, norm, perInstance); - if(dataPickerBox->isVisible() && dataPickerBox->currentIndex() == 0) - b = new CUGLBuffer(name, capacity, target, dataPath, usage, aID, aCapacity, type, norm); - else - b = new CUGLBuffer(name, capacity, target, data, usage, aID, aCapacity, type, norm); - if(targetBox->currentIndex() == 1) + if(targetBox->currentIndex() == 2) GLSettings::TextureList.at(textureBox->currentIndex())->PBO(b->bufID); GLSettings::BufferList.push_back(b); static_cast(parent())->AddToTable(b); } else { - appBuf->bName = name; + /*appBuf->bName = name; appBuf->bCap = capacity; appBuf->bTarget = target; if(dataPath != "") @@ -500,7 +411,7 @@ void BufferPopup::Save() appBuf->aID = aID; appBuf->aSize = aCapacity; appBuf->bType = type; - appBuf->norm = norm; + appBuf->norm = norm;*/ } close(); diff --git a/bufferpopup.h b/bufferpopup.h index 313c8ff..9520374 100644 --- a/bufferpopup.h +++ b/bufferpopup.h @@ -30,39 +30,31 @@ class BufferPopup : public QDialog void CustomDataClicked(); void DisableBufferBoxes(bool b); bool Validation(); - void SetTarget(); - void SetData(); - void SetUsage(); - void SetType(); QWidget* parentWidget; QGridLayout* mainLayout; + QHBoxLayout* checkboxLayout; QLabel *nameLabel, *targetLabel, - *capacityLabel, *dataLabel, - *usageLabel, *attribNameLabel, - *attribCapacityLabel, *typeLabel, - *normalisedLabel; + *capacityLabel, *dataLabel, + *usageLabel, *attribNameLabel, + *attribCapacityLabel, *typeLabel, + *normalisedLabel, *perInstanceLabel; //*handledLabel; QLineEdit *nameBox, *dataBox, *attribNameBox; QSpinBox *capacityBox, *attribCapacityBox; QComboBox *targetBox, *dataPickerBox, *textureBox, *usageBox, *typeBox; - QCheckBox* normalisedBox; //*handledBox; + QCheckBox* normalisedBox, *perInstanceBox; QDialogButtonBox* buttons; - void *data; - std::pair target, usage; - std::tuple type; - bool append; CUGLBuffer *appBuf; -private slots: + private slots: bool eventFilter(QObject* object, QEvent* event); void TargetChanged(int i); void DataChanged(int i); + void TextureChanged(int i); void Save(); }; -#endif // BUFFERPOPUP_H - - +#endif // BUFFERPOPUP_H \ No newline at end of file diff --git a/controltab.cpp b/controltab.cpp index e0e8781..20d9eb0 100644 --- a/controltab.cpp +++ b/controltab.cpp @@ -9,11 +9,13 @@ ControlTab::ControlTab(QWidget* parent) : QWidget(parent) back = new QPushButton("Step Back"); stop = new QPushButton("Stop"); play = new QPushButton("Play"); - connect(play, SIGNAL(clicked()), this, SLOT(PlayClicked())); - forward = new QPushButton("Step Forward"); last = new QPushButton("Last"); + connect(back, SIGNAL(clicked()), this, SLOT(StepBackward())); + connect(play, SIGNAL(clicked()), this, SLOT(PlayClicked())); + connect(forward, SIGNAL(clicked()), this, SLOT(StepForward())); + mainLayout->addWidget(first); mainLayout->addWidget(back); mainLayout->addWidget(stop); @@ -26,14 +28,7 @@ ControlTab::ControlTab(QWidget* parent) : QWidget(parent) ControlTab::~ControlTab() { - delete mainLayout; - - delete first; - delete back; - delete stop; - delete play; - delete forward; - delete last; + delete mainLayout; } void ControlTab::PlayClicked() @@ -50,3 +45,15 @@ void ControlTab::PlayClicked() } } +void ControlTab::StepForward() +{ + GLWidget::StepForward(); + //update frame counter + //implement frame counter +} + +void ControlTab::StepBackward() +{ + GLWidget::StepBackward(); +} + diff --git a/controltab.h b/controltab.h index 6b9a9cf..8d385f4 100644 --- a/controltab.h +++ b/controltab.h @@ -19,10 +19,13 @@ class ControlTab : public QWidget signals: - public slots : +public slots : - private slots : - void PlayClicked(); +private slots : + void PlayClicked(); + void StepForward(); + void StepBackward(); + }; #endif // CONTROLSTAB_H diff --git a/cubuffertab.cpp b/cubuffertab.cpp index f8b1b75..53cd848 100644 --- a/cubuffertab.cpp +++ b/cubuffertab.cpp @@ -47,6 +47,7 @@ CUBufferTab::CUBufferTab(QWidget* parent) : QWidget(parent) CUBufferTab::~CUBufferTab() { + delete mainLayout; } void CUBufferTab::Update() @@ -68,9 +69,7 @@ void CUBufferTab::Update() void CUBufferTab::BufferChanged(int i) { - if(i == -1) - int j = 10; - else + if(i != -1) { activateBox->setChecked(GLSettings::BufferList.at(i)->Cuda()); paramIDBox->setValue(GLSettings::BufferList.at(i)->ParamID()); @@ -81,6 +80,7 @@ void CUBufferTab::ActivatedChanged(int i) { CUGLBuffer *b = GLSettings::BufferList.at(bufferBox->currentIndex()); b->Cuda((i == 0) ? false : true); + CUSettings::BufferList.push_back(b); } void CUBufferTab::ParamIDChanged(int i) diff --git a/cugeneraltab.cpp b/cugeneraltab.cpp index 13066cb..ff69c5d 100644 --- a/cugeneraltab.cpp +++ b/cugeneraltab.cpp @@ -63,21 +63,7 @@ CUGeneralTab::CUGeneralTab(QWidget* parent) : QWidget(parent) CUGeneralTab::~CUGeneralTab() { - delete mainLayout; - delete widthLabel; - delete heightLabel; - delete drawLabel; - delete colourLabel; - delete vsyncLabel; - delete msaaLabel; - delete fovLabel; - delete widthBox; - delete heightBox; - delete fovBox; - delete drawBox; - delete colourBox; - delete vsyncBox; - delete msaaBox; + delete mainLayout; } void CUGeneralTab::WidthChanged(int i) diff --git a/cugeneraltab.h b/cugeneraltab.h index 94ba3db..ea8d2e4 100644 --- a/cugeneraltab.h +++ b/cugeneraltab.h @@ -12,9 +12,8 @@ #include #include "colourtextbox.h" -#include "serializable.h" -class CUGeneralTab : public QWidget//, public Serializable +class CUGeneralTab : public QWidget { Q_OBJECT diff --git a/cuglbuffer.cpp b/cuglbuffer.cpp index 22ab7de..127d528 100644 --- a/cuglbuffer.cpp +++ b/cuglbuffer.cpp @@ -1,58 +1,166 @@ #include "cuglbuffer.h" +#include "glsettings.h" -CUGLBuffer::CUGLBuffer(QString name, int capacity, std::pair target, QString data, std::pair usage, std::pair attribID, int attribCapacity, std::tuple type, bool norm) : bName(name), -bCap(capacity), -bTarget(target), -bDataPath(data), -bUsage(usage), -aID(attribID), -aSize(attribCapacity), -bType(type), -norm(norm), -cuda(false), -paramID(-1) +#pragma region Shapes +float quad[] = { - glFuncs = 0; + -0.5f, -0.5f, 0.0f, + -0.5f, 0.5f, 0.0f, + 0.5f, 0.5f, 0.0f, + 0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, + -0.5f, -0.5f, 0.0f +}; - GLWidget::MakeCurrent(); - glFuncs = QOpenGLContext::currentContext()->versionFunctions(); - if(!glFuncs) - { - qWarning() << "Could not obtain required OpenGL context version"; - exit(1); - } +float quadUV[] = +{ + 0.0f, 1.0f, + 0.0f, 0.0f, + 1.0f, 0.0f, + 1.0f, 0.0f, + 1.0f, 1.0f, + 0.0f, 1.0f +}; - bSize = bCap * std::get<2>(bType); +float triangle[] = +{ + -1.0f, -1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, + 1.0f, -1.0f, 0.0f, +}; - if(!LoadData()) - { - qWarning() << "Buffer data could not be loaded"; - exit(1); - } +float cube_vertices[] = { + // front + -1.0, -1.0, 1.0, + 1.0, -1.0, 1.0, + 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, + -1.0, 1.0, 1.0, + -1.0, -1.0, 1.0, + // top + -1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, + 1.0, 1.0, -1.0, + 1.0, 1.0, -1.0, + -1.0, 1.0, -1.0, + -1.0, 1.0, 1.0, + // back + 1.0, -1.0, -1.0, + -1.0, -1.0, -1.0, + -1.0, 1.0, -1.0, + -1.0, 1.0, -1.0, + 1.0, 1.0, -1.0, + 1.0, -1.0, -1.0, + // bottom + -1.0, -1.0, -1.0, + 1.0, -1.0, -1.0, + 1.0, -1.0, 1.0, + 1.0, -1.0, 1.0, + -1.0, -1.0, 1.0, + -1.0, -1.0, -1.0, + // left + -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, + -1.0, 1.0, 1.0, + -1.0, 1.0, 1.0, + -1.0, 1.0, -1.0, + -1.0, -1.0, -1.0, + // right + 1.0, -1.0, 1.0, + 1.0, -1.0, -1.0, + 1.0, 1.0, -1.0, + 1.0, 1.0, -1.0, + 1.0, 1.0, 1.0, + 1.0, -1.0, 1.0, +}; - if(!InitVBO()) - { - qWarning() << "Buffer could not be initialised"; - exit(1); - } +float cube_texcoords[] = { + // front + 0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0, + // top + 0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0, + // back + 0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0, + // bottom + 0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0, + // left + 0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0, + // right + 0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0, +}; - GLWidget::DoneCurrent(); -} +GLushort cube_elements[] = { + // front + 0, 1, 2, + 2, 3, 0, + // top + 4, 5, 6, + 6, 7, 4, + // back + 8, 9, 10, + 10, 11, 8, + // bottom + 12, 13, 14, + 14, 15, 12, + // left + 16, 17, 18, + 18, 19, 16, + // right + 20, 21, 22, + 22, 23, 20, +}; + +#pragma endregion Shapes -CUGLBuffer::CUGLBuffer(QString name, int capacity, std::pair target, void *data, std::pair usage, std::pair attribName, int attribCapacity, std::tuple type, bool norm) : bName(name), -bCap(capacity), -bTarget(target), -bData(data), -bUsage(usage), -aID(attribName), -aSize(attribCapacity), -bType(type), -norm(norm), -cuda(false), -paramID(-1) +CUGLBuffer::CUGLBuffer(QString name, int capacity, QString target, QString data, QString dataPath, QString usage, QString attribID, int attribCapacity, QString type, bool norm, bool perInst) { + GetGLTarget(target); + GetGLUsage(usage); + aID = std::make_pair(attribID, -1); //refactor? + GetGLType(type); + glFuncs = 0; + bName = name; + bCap = capacity; + bDataType = data; //e.g. SAQ/Custom etc (not var type!) + bDataPath = dataPath; + aSize = attribCapacity; + norm = norm; + cuda = false; + perInstance = perInst; + paramID = -1; + GLWidget::MakeCurrent(); glFuncs = QOpenGLContext::currentContext()->versionFunctions(); if(!glFuncs) @@ -63,6 +171,12 @@ paramID(-1) bSize = bCap * std::get<2>(bType); + if(!LoadData(data)) + { + qWarning() << "Buffer data could not be loaded"; + exit(1); + } + if(!InitVBO()) { qWarning() << "Buffer could not be initialised"; @@ -113,19 +227,13 @@ bool CUGLBuffer::InitVBO() { glFuncs->glGenBuffers(1, &bufID); glFuncs->glBindBuffer(bTarget.first, bufID); - glFuncs->glBufferData(bTarget.first, bSize, bData, bUsage.first); //bData? + glFuncs->glBufferData(bTarget.first, bSize, bData, bUsage.first); cudaBuf = RegisterBuffer(bufID); return true; } -void CUGLBuffer::Randomise(float *data, int n) { - for(int i = 0; i < n; i++) { - data[i] = 2.0f * (rand() / (float)RAND_MAX) - 1.0f; - } -} - std::vector &split(const std::string &s, char delim, std::vector &elems) { std::stringstream ss(s); std::string item; @@ -136,57 +244,185 @@ std::vector &split(const std::string &s, char delim, std::vector((int*)bData, bCap, 0.5, 1.5); + else + ParseFile((byte*)bData); + } + break; + } + case GL_ELEMENT_ARRAY_BUFFER: + { + if(dataType.contains("Cube")) + bData = cube_elements; + break; + } + + case GL_PIXEL_UNPACK_BUFFER: + { + bData = (void*)GLSettings::TextureList.at(bDataPath.toInt())->Data(); + break; + } + } + + return true; +} + +void CUGLBuffer::GetGLTarget(QString targetString) +{ + if(targetString == "GL_ARRAY_BUFFER") + { + bTarget.first = GL_ARRAY_BUFFER; + } + + if(targetString == "GL_ELEMENT_ARRAY_BUFFER") + { + bTarget.first = GL_ELEMENT_ARRAY_BUFFER; + } + + if(targetString == "GL_PIXEL_UNPACK_BUFFER") + { + bTarget.first = GL_PIXEL_UNPACK_BUFFER; + } + + bTarget.second = targetString; +} + +void CUGLBuffer::GetGLUsage(QString usageString) { - std::ifstream in(bDataPath.toStdString()); - std::string s = "|"; - std::vector elems; - int counter = 0; + if(usageString == "GL_DYNAMIC_DRAW") + { + bUsage.first = GL_DYNAMIC_DRAW; + } - getline(in, s); - while(s.size() != 0) - { - split(s, ' ', elems); - data[counter + 0] = elems.at(0).toFloat(); - data[counter + 1] = elems.at(1).toFloat(); - data[counter + 2] = elems.at(2).toFloat(); - data[counter + 3] = elems.at(3).toFloat(); - //sscanf(s.c_str(), "%f %f %f %f", , data[counter + 1], data[counter + 2], data[counter + 3]); //change format on type and aSize - counter += 4; - elems.clear(); - getline(in, s); + if(usageString == "GL_DYNAMIC_COPY") + { + bUsage.first = GL_DYNAMIC_COPY; } + + if(usageString == "GL_STATIC_DRAW") + { + bUsage.first = GL_STATIC_DRAW; + } + + if(usageString == "GL_STATIC_COPY") + { + bUsage.first = GL_STATIC_COPY; + } + + bUsage.second = usageString; } -bool CUGLBuffer::LoadData() +void CUGLBuffer::GetAttribID(QString attribString) { - switch(bTarget.first) + +} + +void CUGLBuffer::GetGLType(QString typeString) +{ + GLenum typeEnum; + int size; + + if(typeString == "GL_FLOAT") { - case GL_ARRAY_BUFFER: + typeEnum = GL_FLOAT; + size = sizeof(float); + } + + if(typeString == "GL_HALF_FLOAT") { - bData = malloc(bSize); - - if(bDataPath == "") - RandomData((int*)bData, bCap, 0.5, 1.5);//Randomise((float*)bData, bCap); - else - ParseFile((float*)bData); - break; + typeEnum = GL_HALF_FLOAT; + size = sizeof(float) / 2; } - /*use texture selector instead - case GL_PIXEL_UNPACK_BUFFER: + + if(typeString == "GL_DOUBLE") { - //change to texture selector or accept nullptr - img = QImage(bDataPath); - texSize = img.size(); - bSize = texSize.width() * texSize.height() * 4; - img = img.convertToFormat(QImage::Format_RGB32); - bData = (void*)img.constBits(); - InitTex(); - break; - }*/ + typeEnum = GL_DOUBLE; + size = sizeof(double); } - return true; + if(typeString == "GL_INT") + { + typeEnum = GL_INT; + size = sizeof(int); + } + + if(typeString == "GL_UNSIGNED_INT") + { + typeEnum = GL_UNSIGNED_INT; + size = sizeof(unsigned int); + } + + if(typeString == "GL_SHORT") + { + typeEnum = GL_SHORT; + size = sizeof(short); + } + + if(typeString == "GL_UNSIGNED_SHORT") + { + typeEnum = GL_UNSIGNED_SHORT; + size = sizeof(unsigned short); + } + + if(typeString == "GL_BYTE") + { + typeEnum = GL_BYTE; + size = sizeof(byte); + } + + if(typeString == "GL_UNSIGNED_BYTE") + { + typeEnum = GL_UNSIGNED_BYTE; + size = sizeof(byte); + } + + bType = std::make_tuple(typeEnum, typeString, size); +} + +void CUGLBuffer::Save(QTextStream *output, std::vector *varList) +{ + varList->push_back("b_"); + varList->push_back(bName); + varList->push_back(QString::number(bCap)); + varList->push_back(bTarget.second); + varList->push_back(bDataType); + varList->push_back(bDataPath); + varList->push_back(bUsage.second); + varList->push_back(aID.first); + varList->push_back(QString::number(aSize)); + varList->push_back(std::get<1>(bType)); + varList->push_back(QString::number(norm)); + varList->push_back(QString::number(perInstance)); + + Savable::Save(output, varList); } void CUGLBuffer::Bind() @@ -211,6 +447,7 @@ void CUGLBuffer::UnregisterBuffer(void* res) ERRORCHECK(cudaGraphicsUnregisterResource((cudaGraphicsResource *)res)); } +//Back off Open-GL void* CUGLBuffer::MapResource(void* res) { void* devPtr = 0; diff --git a/cuglbuffer.h b/cuglbuffer.h index 5f86cf7..a6b23fa 100644 --- a/cuglbuffer.h +++ b/cuglbuffer.h @@ -19,12 +19,12 @@ #include "glwidget.h" #include "utilities.h" +#include "savable.h" -class CUGLBuffer +class CUGLBuffer : public Savable { public: - CUGLBuffer(QString name, int capacity, std::pair target, QString data, std::pair usage, std::pair attribID, int attribCapacity, std::tuple type, bool norm); - CUGLBuffer(QString name, int capacity, std::pair target, void *data, std::pair usage, std::pair attribID, int attribCapacity, std::tuple type, bool norm); + CUGLBuffer(QString name, int capacity, QString target, QString data, QString dataPath, QString usage, QString attribID, int attribCapacity, QString type, bool norm, bool perInst); ~CUGLBuffer(); static void* RegisterBuffer(GLuint buf); @@ -41,9 +41,12 @@ class CUGLBuffer void Cuda(bool val) { cuda = val; } int ParamID() const { return paramID; } void ParamID(int val) { paramID = val; } + bool PerInstance() const { return perInstance; } + + virtual void Save(QTextStream *output, std::vector *varList) override; GLuint bufID; - QString bName, bDataPath; + QString bName, bDataType, bDataPath; void *bData; int bCap, bSize, aSize; @@ -55,14 +58,18 @@ class CUGLBuffer void InitTex(); void Randomise(float *data, int n); void ParseFile(float *data); - bool LoadData(); + bool LoadData(QString dataType); + void GetGLTarget(QString targetString); + void GetGLUsage(QString usageString); + void GetAttribID(QString attribString); + void GetGLType(QString typeString); QOpenGLFunctions_3_3_Core* glFuncs; GLuint tex; void *cudaBuf; QImage img; QSize texSize; - bool cuda; + bool cuda, perInstance; int paramID; template @@ -73,6 +80,30 @@ class CUGLBuffer data[i] = (max - min) * (rand() / (float)RAND_MAX) + min; } } + + //parse file of type T + //storing + template + inline void ParseFile(T *data, const char& delim = ' ') + { + std::ifstream in(bDataPath.toStdString()); + std::string s = "|"; + std::vector elems; + int counter = 0; + + getline(in, s); + while(s.size() != 0) + { + split(s, delim, elems); + for(int i = 0; i < s.size(); ++i) + { + data[counter + i] = elems.at(i).toDouble(); + } + counter += s.size(); + elems.clear(); + getline(in, s); + } + } }; #endif // CUGLBUFFER_H diff --git a/cusettings.cpp b/cusettings.cpp index 71784ca..d466fb6 100644 --- a/cusettings.cpp +++ b/cusettings.cpp @@ -1,5 +1,7 @@ #include "cusettings.h" +std::vector CUSettings::BufferList; + //param > buffer //param - select from objects properties, buffers - order @@ -27,10 +29,7 @@ CUSettings::CUSettings(QWidget* parent) : QWidget(parent) CUSettings::~CUSettings() { - delete tabs; - delete settingsLayout; - delete settingsGroup; - delete mainLayout; + delete mainLayout; } void CUSettings::CUInit() @@ -49,7 +48,6 @@ void CUSettings::CUInit() printf("Device %i: %s", d.handle, d.name); } - //change current device in cugeneral + save/load cudaSetDevice(0); } diff --git a/cusettings.h b/cusettings.h index 3961e75..97cebf6 100644 --- a/cusettings.h +++ b/cusettings.h @@ -29,6 +29,8 @@ class CUSettings : public QWidget virtual QSize minimumSizeHint() const override; virtual QSize sizeHint() const override; + static std::vector BufferList; + std::vector deviceList; private: @@ -42,10 +44,10 @@ class CUSettings : public QWidget signals: -public slots : + public slots : -private slots : - void TabChanged(int i); + private slots : + void TabChanged(int i); }; #endif // CUSETTINGS_H diff --git a/debug/obj/kernel_cuda.obj b/debug/obj/kernel_cuda.obj deleted file mode 100644 index 45839f7..0000000 Binary files a/debug/obj/kernel_cuda.obj and /dev/null differ diff --git a/glbuffertab.cpp b/glbuffertab.cpp index 316d4ca..82474cc 100644 --- a/glbuffertab.cpp +++ b/glbuffertab.cpp @@ -3,49 +3,7 @@ GLBufferTab::GLBufferTab(QWidget* parent) : QWidget(parent) { - mainLayout = new QGridLayout; - buttonLayout = new QHBoxLayout; - - add = new QPushButton("+"); - connect(add, &QPushButton::clicked, this, &GLBufferTab::Popup); - - remove = new QPushButton("-"); - connect(remove, &QPushButton::clicked, this, &GLBufferTab::RemoveBuffer); - - buttonLayout->addWidget(add); - buttonLayout->addWidget(remove); - - mainLayout->addLayout(buttonLayout, 0, 0); - - listModel = new QStringListModel(); - bufferStringList = QStringList(); - - for(int i = 0; i < GLSettings::TextureList.size(); ++i) - { - bufferStringList.push_back(QString(GLSettings::BufferList.at(i)->bName)); - } - - listModel->setStringList(bufferStringList); - - listView = new QListView; - listView->setModel(listModel); - connect(listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(BufferSelected(QItemSelection))); - connect(listView->itemDelegate(), SIGNAL(closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint)), this, SLOT(ListEditEnd(QWidget*, QAbstractItemDelegate::EndEditHint))); - mainLayout->addWidget(listView, 1, 0); - mainLayout->setColumnStretch(0, 1); - - BufferPopup *p = new BufferPopup(this); - - detailScroll = new QScrollArea; - detailScroll->setBackgroundRole(QPalette::Dark); - detailScroll->setWidget(p); - - mainLayout->addWidget(detailScroll, 1, 1); - mainLayout->setColumnStretch(1, 4); - - setLayout(mainLayout); - - /*mainLayout = new QVBoxLayout; + mainLayout = new QVBoxLayout; buttonLayout = new QHBoxLayout; add = new QPushButton("Add"); @@ -70,37 +28,12 @@ GLBufferTab::GLBufferTab(QWidget* parent) : QWidget(parent) table->setSelectionMode(QAbstractItemView::SingleSelection); connect(table, &QTableWidget::doubleClicked, this, &GLBufferTab::TableDoubleClicked); mainLayout->addWidget(table); - setLayout(mainLayout);*/ + setLayout(mainLayout); } GLBufferTab::~GLBufferTab() { - delete add; - delete remove; - delete buttonLayout; - //delete table; - delete mainLayout; -} - -void GLBufferTab::BufferSelected(const QItemSelection& selection) -{ - if(selection.indexes().isEmpty()) - { - //nothing selected - //unselect if white space is clicked in list - } - else - { - //texturePreview->setPixmap(QPixmap(QPixmap::fromImage(GLSettings::TextureList.at(selection.indexes().first().row())->Image()))); - } -} - -void GLBufferTab::ListEditEnd(QWidget *editor, QAbstractItemDelegate::EndEditHint) -{ - int id = listView->currentIndex().row(); - QString s = reinterpret_cast(editor)->text(); //new name - bufferStringList.replaceInStrings(bufferStringList.at(id), s); - GLSettings::BufferList.at(id)->bName = s; + delete mainLayout; } void GLBufferTab::Popup() @@ -175,4 +108,5 @@ void GLBufferTab::RemoveBuffer() table->insertRow(0); } } -} \ No newline at end of file +} + diff --git a/glbuffertab.h b/glbuffertab.h index cd99a76..ec82ae0 100644 --- a/glbuffertab.h +++ b/glbuffertab.h @@ -8,9 +8,6 @@ #include #include #include -#include -#include -#include #include "cuglbuffer.h" #include "bufferpopup.h" @@ -26,22 +23,17 @@ class GLBufferTab : public QWidget void AddToTable(CUGLBuffer* b); private: - QGridLayout *mainLayout; - QHBoxLayout *bufferLayout, *buttonLayout; + QVBoxLayout* mainLayout; + QHBoxLayout* buttonLayout; QPushButton* add; QPushButton* remove; QTableWidget* table; - QStringList bufferStringList; - QStringListModel *listModel; - QListView *listView; - QScrollArea *detailScroll; -signals: + + signals: public slots: private slots: - void BufferSelected(const QItemSelection& selection); - void ListEditEnd(QWidget *editor, QAbstractItemDelegate::EndEditHint); void TableDoubleClicked(); void RemoveBuffer(); void Popup(); diff --git a/glgeneraltab.cpp b/glgeneraltab.cpp index 9357050..451bf9f 100644 --- a/glgeneraltab.cpp +++ b/glgeneraltab.cpp @@ -106,21 +106,7 @@ GLGeneralTab::GLGeneralTab(QWidget* parent) : QWidget(parent) GLGeneralTab::~GLGeneralTab() { - delete mainLayout; - delete widthLabel; - delete heightLabel; - delete drawLabel; - delete colourLabel; - delete vsyncLabel; - delete msaaLabel; - delete fovLabel; - delete widthBox; - delete heightBox; - delete fovBox; - delete drawBox; - delete colourBox; - delete vsyncBox; - delete msaaBox; + delete mainLayout; } void GLGeneralTab::WidthChanged(int i) diff --git a/glsettings.cpp b/glsettings.cpp index c6d2da4..849711b 100644 --- a/glsettings.cpp +++ b/glsettings.cpp @@ -11,10 +11,10 @@ GLSettings::GLSettings(QWidget* parent) : QWidget(parent) settingsGroup = new QGroupBox("OpenGL Settings"); tabs = new QTabWidget(); - tabs->addTab(new GLGeneralTab(this), "General"); - tabs->addTab(new ObjectTab(this), "Objects"); - tabs->addTab(new GLBufferTab(this), "Buffers"); - tabs->addTab(new TextureTab(this), "Textures"); + tabs->addTab(genTab = new GLGeneralTab(this), "General"); + tabs->addTab(objTab = new ObjectTab(this), "Objects"); + tabs->addTab(bufTab = new GLBufferTab(this), "Buffers"); + tabs->addTab(texTab = new TextureTab(this), "Textures"); tabs->addTab(new ControlTab(this), "Controls"); settingsLayout->addWidget(tabs); settingsGroup->setLayout(settingsLayout); @@ -25,10 +25,6 @@ GLSettings::GLSettings(QWidget* parent) : QWidget(parent) GLSettings::~GLSettings() { - delete tabs; - delete settingsLayout; - delete settingsGroup; - for each (Object *o in ObjectList) { delete o; @@ -47,6 +43,51 @@ GLSettings::~GLSettings() delete mainLayout; } +void GLSettings::AddTexture(Texture *tex) +{ + TextureList.push_back(tex); + texTab->AddToList(tex); +} + +void GLSettings::AddBuffer(CUGLBuffer *buf) +{ + BufferList.push_back(buf); + bufTab->AddToTable(buf); +} + +void GLSettings::AddObject(Object *obj) +{ + ObjectList.push_back(obj); + objTab->AddToTable(obj); +} + +void GLSettings::AddTextures(std::vector *texList) +{ + for each (Texture* t in *texList) + { + TextureList.push_back(t); + texTab->AddToList(t); + } +} + +void GLSettings::AddBuffers(std::vector *bufList) +{ + for each (CUGLBuffer* b in *bufList) + { + BufferList.push_back(b); + bufTab->AddToTable(b); + } +} + +void GLSettings::AddObjects(std::vector *objList) +{ + for each (Object* o in *objList) + { + ObjectList.push_back(o); + objTab->AddToTable(o); + } +} + QSize GLSettings::minimumSizeHint() const { return QSize(500, 350); diff --git a/glsettings.h b/glsettings.h index 7831064..b2d71d5 100644 --- a/glsettings.h +++ b/glsettings.h @@ -23,6 +23,12 @@ class GLSettings : public QWidget explicit GLSettings(QWidget* parent = 0); ~GLSettings(); + void AddTexture(Texture *texList); + void AddBuffer(CUGLBuffer *bufList); + void AddObject(Object *objList); + void AddTextures(std::vector *texList); + void AddBuffers(std::vector *bufList); + void AddObjects(std::vector *objList); virtual QSize minimumSizeHint() const override; virtual QSize sizeHint() const override; @@ -34,6 +40,11 @@ class GLSettings : public QWidget QVBoxLayout *mainLayout, *settingsLayout; QGroupBox* settingsGroup; QTabWidget* tabs; + GLGeneralTab *genTab; + ObjectTab *objTab; + GLBufferTab *bufTab; + TextureTab *texTab; + //move control to bottom bar signals: diff --git a/glwidget.cpp b/glwidget.cpp index 526994d..c7c2b38 100644 --- a/glwidget.cpp +++ b/glwidget.cpp @@ -2,6 +2,7 @@ #include "glsettings.h" #include "cusettings.h" +void CUSetup(); void CUExecuteKernel(std::vector *params); //std::vector *params namespace @@ -24,6 +25,9 @@ GLWidget::GLWidget(QWidget* parent) : QOpenGLWidget(parent) QVector3D(0.0, 1.0, 0.0)); // Up vector drawMode = GL_TRIANGLES; play = false; + step = false; + paramWarning = false; + srand(time(NULL)); timer.start(); setFocusPolicy(Qt::StrongFocus); } @@ -35,7 +39,7 @@ GLWidget::~GLWidget() delete s; } - //delete glFuncs; + delete glFuncs; } void GLWidget::initializeGL() @@ -51,8 +55,8 @@ void GLWidget::initializeGL() width = QWidget::width(); height = QWidget::height(); - - //glEnable(GL_DEPTH_TEST); + + glEnable(GL_DEPTH_TEST); //glDepthFunc(GL_LESS); glEnable(GL_BLEND); @@ -64,23 +68,34 @@ void GLWidget::initializeGL() //glCullFace(GL_BACK); //configure working directory correctly (./ in VS, ../ otherwise) - //Shader *shader = new Shader("Textured Particle Shader", "./Shaders/t_bb_Particle_3_3.vert", "./Shaders/t_bb_Particle_3_3.frag"); - Shader *shader = new Shader("Textured Particle Shader", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/t_bb_Particle_3_3.vert", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/t_bb_Particle_3_3.frag"); + //Shader *shader = new Shader("Textured Particle Shader", "./Shaders/t_bb_Particle_3_3.vert", "./Shaders/t_bb_Particle_3_3.frag"); + Shader *shader = new Shader("Textured Particle Shader", "./Shaders/t_bb_Particle_3_3.vert", "./Shaders/t_bb_Particle_3_3.frag"); ShaderList.push_back(shader); - Shader *shader2 = new Shader("Particle Shader", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/bb_Particle_3_3.vert", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/bb_Particle_3_3.frag"); + Shader *shader2 = new Shader("Particle Shader", "./Shaders/bb_Particle_3_3.vert", "./Shaders/bb_Particle_3_3.frag"); ShaderList.push_back(shader2); - Shader *shader3 = new Shader("Simple Shader", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/simple_3_3.vert", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/simple_3_3.frag"); + Shader *shader3 = new Shader("Simple Shader", "./Shaders/simple_3_3.vert", "./Shaders/simple_3_3.frag"); ShaderList.push_back(shader3); - Shader *shader4 = new Shader("FBO Shader", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/fbo_3_3.vert", "C:/Users/Anth/Documents/GitHub/CUGL/Shaders/fbo_3_3.frag"); + Shader *shader4 = new Shader("Heightmap Shader", "./Shaders/heightmap.vert", "./Shaders/heightmap.frag"); ShaderList.push_back(shader4); + Shader *shader5 = new Shader("FBO Shader", "./Shaders/fbo_3_3.vert", "./Shaders/fbo_3_3.frag"); + ShaderList.push_back(shader5); + + Shader *shader6 = new Shader("Top Probability Shader", "./Shaders/top_prob_3_3.vert", "./Shaders/prob_3_3.frag"); + ShaderList.push_back(shader6); + + Shader *shader7 = new Shader("Bottom Probability Shader", "./Shaders/bottom_prob_3_3.vert", "./Shaders/prob_3_3.frag"); + ShaderList.push_back(shader7); + int r, g, b, a; QColor c("#6495ED"); c.getRgb(&r, &g, &b, &a); glClearColor(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f); + + CUSetup(); //setup rand } //context made current in init/paint/resizeGL @@ -94,9 +109,9 @@ void GLWidget::paintGL() //update //render FBO tex to screen //render other objs to screen - if(play) + if(GLSettings::ObjectList.size() > 0) { - if(GLSettings::ObjectList.size() > 0) + if(play || step) { if(FBOList.size() > 0) { @@ -138,16 +153,17 @@ void GLWidget::paintGL() CUGLBuffer::UnmapResource(GLSettings::BufferList.at(i)->CudaBuf()); } } + step = false; + } - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - for each (Object *o in GLSettings::ObjectList) - { - o->Draw(drawMode, false); - } + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - update(); + for each (Object *o in GLSettings::ObjectList) + { + o->Draw(drawMode, false); } + + update(); } } @@ -209,6 +225,17 @@ void GLWidget::Play(bool b) glPtr->play = b; } +void GLWidget::StepForward() +{ + glPtr->step = true; +} + +void GLWidget::StepBackward() +{ + //implement step back when saving/reversibility is enabled + //glPtr->play = b; +} + QMatrix4x4 *GLWidget::ProjMatrix() { return glPtr->projMatrix; @@ -274,7 +301,7 @@ int GLWidget::SetFBOTexture(GLuint id) glPtr->glBindFramebuffer(GL_FRAMEBUFFER, fbo); glPtr->glGenRenderbuffers(1, &rbo); glPtr->glBindRenderbuffer(GL_RENDERBUFFER, rbo); - glPtr->glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, Width(), Height()); //Width(), Height() + glPtr->glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, Width(), Height()); glPtr->glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rbo); glPtr->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0); @@ -285,7 +312,7 @@ int GLWidget::SetFBOTexture(GLuint id) CheckFBOStatus(); glPtr->FBOList.push_back(fbo); - + glPtr->glClearColor(0.0, 0.0, 0.0, 1.0); glPtr->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //first clear to ensure drawing @@ -304,7 +331,7 @@ void GLWidget::keyPressEvent(QKeyEvent* e) { makeCurrent(); //yRot += 3.0f; - viewMatrix->rotate(3.0f, QVector3D(0.0, 1.0, 0.0)); + viewMatrix->rotate(2.0f, QVector3D(0.0, 1.0, 0.0)); update(); doneCurrent(); } @@ -312,7 +339,7 @@ void GLWidget::keyPressEvent(QKeyEvent* e) { makeCurrent(); //yRot -= 3.0f; - viewMatrix->rotate(-3.0f, QVector3D(0.0, 1.0, 0.0)); + viewMatrix->rotate(-2.0f, QVector3D(0.0, 1.0, 0.0)); update(); doneCurrent(); } @@ -321,14 +348,14 @@ void GLWidget::keyPressEvent(QKeyEvent* e) { makeCurrent(); //GLSettings::ObjectList.at(0)->Move(QVector3D(0.0, 3.0, 0.0)); - viewMatrix->translate(QVector3D(0.0, 3.0, 0.0)); + viewMatrix->translate(QVector3D(0.0, 2.0, 0.0)); update(); doneCurrent(); } if(e->key() == Qt::Key_W) { makeCurrent(); - viewMatrix->translate(QVector3D(0.0, 0.0, 3.0)); + viewMatrix->translate(QVector3D(0.0, 0.0, 2.0)); //GLSettings::ObjectList.at(0)->Move(QVector3D(0.0, 0.0, 3.0)); update(); doneCurrent(); @@ -336,7 +363,7 @@ void GLWidget::keyPressEvent(QKeyEvent* e) if(e->key() == Qt::Key_E) { makeCurrent(); - viewMatrix->translate(QVector3D(0.0, -3.0, 0.0)); + viewMatrix->translate(QVector3D(0.0, -2.0, 0.0)); //GLSettings::ObjectList.at(0)->Move(QVector3D(0.0, -3.0, 0.0)); update(); doneCurrent(); @@ -344,7 +371,7 @@ void GLWidget::keyPressEvent(QKeyEvent* e) if(e->key() == Qt::Key_A) { makeCurrent(); - viewMatrix->translate(QVector3D(-3.0, 0.0, 0.0)); + viewMatrix->translate(QVector3D(-2.0, 0.0, 0.0)); //GLSettings::ObjectList.at(0)->Move(QVector3D(-3.0, 0.0, 0.0)); update(); doneCurrent(); @@ -352,7 +379,7 @@ void GLWidget::keyPressEvent(QKeyEvent* e) if(e->key() == Qt::Key_S) { makeCurrent(); - viewMatrix->translate(QVector3D(0.0, 0.0, -3.0)); + viewMatrix->translate(QVector3D(0.0, 0.0, -2.0)); //GLSettings::ObjectList.at(0)->Move(QVector3D(0.0, 0.0, -3.0)); update(); doneCurrent(); @@ -360,7 +387,7 @@ void GLWidget::keyPressEvent(QKeyEvent* e) if(e->key() == Qt::Key_D) { makeCurrent(); - viewMatrix->translate(QVector3D(3.0, 0.0, 0.0)); + viewMatrix->translate(QVector3D(2.0, 0.0, 0.0)); //GLSettings::ObjectList.at(0)->Move(QVector3D(3.0, 0.0, 0.0)); update(); doneCurrent(); @@ -418,3 +445,13 @@ QSize GLWidget::sizeHint() const return QSize(600, 600); } +void GLWidget::mousePressEvent(QMouseEvent *e) +{ + float xFactor = width / 256.0f; //256 = N_X + float yFactor = height / 256.0f; //256 = N_Y + int x = e->x() / xFactor; + int y = e->y() / yFactor; + QMessageBox::information(this, "Coords", QString("X: %1 Y: %2").arg(x).arg(y), QDialogButtonBox::Ok); +} + + diff --git a/glwidget.h b/glwidget.h index 2d7bcac..6b98f87 100644 --- a/glwidget.h +++ b/glwidget.h @@ -40,6 +40,8 @@ class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions static void VSync(bool b); static void MSAA(bool b); static void Play(bool b); + static void StepForward(); + static void StepBackward(); static QMatrix4x4 *ProjMatrix(); static QMatrix4x4 *ViewMatrix(); static void CheckFBOStatus(); @@ -60,7 +62,7 @@ class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions QTime timer; int width, height; QOpenGLFunctions_3_3_Core* glFuncs; - bool play; + bool play, step, paramWarning; signals: @@ -70,6 +72,8 @@ public slots: // QWidget interface protected: void keyPressEvent(QKeyEvent*); + virtual void mousePressEvent(QMouseEvent *e) override; + }; #endif // GLWIDGET_H diff --git a/mainwindow.cpp b/mainwindow.cpp index 25cfd2b..b0054ba 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,5 +1,7 @@ #include "mainwindow.h" #include "ui_mainwindow.h" +#include "cuda_profiler_api.h" +#include MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), @@ -10,10 +12,12 @@ ui(new Ui::MainWindow) mainLayout = new QVBoxLayout(); mainSplitter = new QSplitter(Qt::Orientation::Vertical); - settingsSplitter = new QSplitter(); + bottomSplitter = new QSplitter(); + sideSplitter = new QSplitter(); top = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); top.setVerticalStretch(3); + top.setHorizontalStretch(3); bottom = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); bottom.setVerticalStretch(1); bottom.setHorizontalStretch(1); @@ -21,7 +25,15 @@ ui(new Ui::MainWindow) InitOpenGLWidget(); InitSettings(); - mainLayout->addWidget(mainSplitter); + //output sidebar + outputSettings = new OutputSettings(this); + outputSettings->setSizePolicy(bottom); + mainSplitter->setSizePolicy(top); + + sideSplitter->addWidget(mainSplitter); + sideSplitter->addWidget(outputSettings); + + mainLayout->addWidget(sideSplitter); centralWidget()->setLayout(mainLayout); @@ -32,33 +44,12 @@ ui(new Ui::MainWindow) MainWindow::~MainWindow() { - /*if(openglTabs) - delete openglTabs; - if(cudaTabs) - delete cudaTabs; - if(cudaSettings) - delete cudaSettings; - if(openglSettings) - delete openglSettings; - if(openglLayout) - delete openglLayout; - if(cudaLayout) - delete cudaLayout; - if(gl) - delete gl; - if(settings) - delete settings; - if(mainSplitter) - delete mainSplitter; - if(mainLayout) - delete mainLayout; - if(ui) - delete ui;*/ + delete mainLayout; } QSize MainWindow::sizeHint() const { - return QSize(1200, 900); + return QSize(1200, 1200); } void MainWindow::InitOpenGLWidget() @@ -75,19 +66,17 @@ void MainWindow::InitSettings() openglSettings->setSizePolicy(bottom); cudaSettings = new CUSettings(this); cudaSettings->setSizePolicy(bottom); - outputSettings = new OutputSettings(this); - outputSettings->setSizePolicy(bottom); - settingsSplitter->addWidget(openglSettings); - settingsSplitter->addWidget(cudaSettings); - settingsSplitter->addWidget(outputSettings); - settingsSplitter->setSizePolicy(bottom); + bottomSplitter->addWidget(openglSettings); + bottomSplitter->addWidget(cudaSettings); + bottomSplitter->setSizePolicy(bottom); - mainSplitter->addWidget(settingsSplitter); + mainSplitter->addWidget(bottomSplitter); } void MainWindow::on_actionExit_triggered() { + cudaProfilerStop(); QCoreApplication::quit(); } @@ -111,3 +100,111 @@ void MainWindow::on_actionOutput_triggered(bool checked) outputSettings->setHidden(!checked); } +void MainWindow::on_actionSave_Project_triggered() +{ + //save seed + //loop through tex, then buffers, then objects + //make pure virtual and pass in stream + QString filePath = QFileDialog::getSaveFileName(this, "Save Project File", QDir::currentPath(), "Project Files (*.cuglproj)"); + QFile file(filePath); + + if(file.open(QIODevice::WriteOnly)) + { + QTextStream outStream(&file); + + for each (Texture *t in GLSettings::TextureList) + { + std::vector varList; //test perf vs single vector + clear + t->Save(&outStream, &varList); + } + + for each (CUGLBuffer *b in GLSettings::BufferList) + { + std::vector varList; + b->Save(&outStream, &varList); + } + + for each (Object *o in GLSettings::ObjectList) + { + std::vector varList; + o->Save(&outStream, &varList); + } + + file.close(); + } +} + +void MainWindow::on_actionLoad_Project_triggered() +{ + QString filePath = QFileDialog::getOpenFileName(this, "Open Project File", QDir::currentPath(), "Project Files (*.cuglproj)"); + QFile file(filePath); + + if(file.open(QIODevice::ReadOnly)) + { + QTextStream inStream(&file); + + QString line; + QStringList varList; + std::vector texList; + std::vector bufList; + std::vector objList; + + //index from 1 due to class id (t_/b_/o_) + while(inStream.readLineInto(&line)) + { + if(line.startsWith("t_")) + { + Texture *t; + + varList = line.split('|'); + + t = new Texture(varList.at(1), varList.at(2), varList.at(3).toInt(), varList.at(4).toInt(), (QImage::Format)varList.at(5).toInt(), varList.at(6), varList.at(7), varList.at(8), (bool)varList.at(9).toInt(), varList.at(10).toInt()); + texList.push_back(t); + openglSettings->AddTexture(t); + } + else if(line.startsWith("b_")) + { + CUGLBuffer *b; + + varList = line.split('|'); + + b = new CUGLBuffer(varList.at(1), varList.at(2).toInt(), varList.at(3), varList.at(4), varList.at(5), varList.at(6), varList.at(7), varList.at(8).toInt(), varList.at(9), (bool)varList.at(10).toInt(), (bool)varList.at(11).toInt()); + bufList.push_back(b); + openglSettings->AddBuffer(b); + } + else if(line.startsWith("o_")) + { + Object *o; + + varList = line.split('|'); + + std::vector bufIDs; //split third param into multiple ids (for multi-buffers) + for each (QString s in varList.at(3).split('~')) + { + bufIDs.push_back(s.toInt()); + } + + o = new Object(varList.at(1), varList.at(2).toInt(), &bufIDs, varList.at(4).toInt(), varList.at(5).toInt()); + objList.push_back(o); + openglSettings->AddObject(o); + } + } + + file.close(); + } +} + +void MainWindow::on_actionUser_Guide_triggered() +{ + +} + +void MainWindow::on_actionAbout_triggered() +{ + QMessageBox::information(this, "About", "Lorem ipsum dolor sit amet, consectetur adipiscing elit. \ +Mauris auctor mi nunc. Integer ut dapibus tortor. Nullam consectetur nec dui pulvinar gravida. \ +Sed dictum enim tortor, eu convallis dui imperdiet ut. Pellentesque habitant morbi tristique senectus \ +et netus et malesuada fames ac turpis egestas. Etiam congue vulputate est id fringilla. \ +Cras at cursus nisi, quis molestie ex. In sit amet suscipit risus. Quisque auctor risus lectus, \ +at consectetur dui blandit et.", QDialogButtonBox::Ok); +} diff --git a/mainwindow.h b/mainwindow.h index 4544fd3..c95612b 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -39,13 +39,12 @@ class MainWindow : public QMainWindow void InitSettings(); Ui::MainWindow* ui; - QSplitter* mainSplitter, *settingsSplitter; + QSplitter* mainSplitter, *bottomSplitter, *sideSplitter; QVBoxLayout *mainLayout, *openglLayout, *cudaLayout; GLSettings* openglSettings; CUSettings* cudaSettings; OutputSettings *outputSettings; GLWidget* gl; - QTabWidget *openglTabs, *cudaTabs; QSizePolicy top, bottom; private slots: @@ -54,6 +53,10 @@ class MainWindow : public QMainWindow void on_actionOpenGL_2_triggered(bool checked); void on_actionCUDA_triggered(bool checked); void on_actionOutput_triggered(bool checked); + void on_actionSave_Project_triggered(); + void on_actionLoad_Project_triggered(); + void on_actionUser_Guide_triggered(); + void on_actionAbout_triggered(); }; #endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui index 07ad64e..da0c1f9 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -19,14 +19,16 @@ 0 0 - 400 - 21 + 1200 + 26 File + + @@ -48,16 +50,12 @@ Help - - - - About - + + - @@ -134,7 +132,7 @@ true - false + true Output @@ -146,6 +144,32 @@ Shift+E + + + Save Project + + + Ctrl+S + + + + + Load Project + + + Ctrl+L + + + + + User Guide + + + + + About + + diff --git a/object.cpp b/object.cpp index 3bfede2..a693570 100644 --- a/object.cpp +++ b/object.cpp @@ -1,16 +1,20 @@ #include "object.h" #include "glsettings.h" -Object::Object(QString name, int instances, std::vector buffers, Texture *texture, Shader *shader) +Object::Object(QString name, int instances, std::vector *bufferIDs, int textureID, int shaderID) { + GetBuffers(bufferIDs); + GetTexture(textureID); + GetShader(shaderID); + glFuncs = 0; fbo = 0; this->name = name; this->instances = instances; - this->buffers = buffers; - this->texture = texture; - this->shader = shader; + this->bufferIDs = *bufferIDs; + this->textureID = textureID; + this->shaderID = shaderID; modelMatrix = QMatrix4x4(); //modelMatrix.translate(QVector3D(0.0f, 0.0f, 0.0f)); @@ -34,18 +38,25 @@ Object::Object(QString name, int instances, std::vector buffers, Te shader->Bind(); + int indexID = 0; + indexed = false; + for each (CUGLBuffer *b in buffers) { + if(b->bTarget.first == GL_ELEMENT_ARRAY_BUFFER && indexed == false) + { + indexed = true; + indicesID = indexID; + } + b->Bind(); - //FUTURE IMPROVEMENT - //Loop for each attrib per buffer - //b->aID.second = shader->GetAttribLoc(b->aID.first); //aID.second //FUCKED UP MULTIPLE SHADERS!!!!! glFuncs->glVertexAttribPointer((GLuint)shader->GetAttribLoc(b->aID.first), b->aSize, std::get<0>(b->bType), b->norm, 0, 0); glFuncs->glEnableVertexAttribArray((GLuint)shader->GetAttribLoc(b->aID.first)); - if(b->Cuda()) + if(b->PerInstance()) glFuncs->glVertexAttribDivisor((GLuint)shader->GetAttribLoc(b->aID.first), 1); b->Unbind(); + indexID++; } mLoc = shader->GetUniformLoc("uModelMatrix"); @@ -54,17 +65,19 @@ Object::Object(QString name, int instances, std::vector buffers, Te shader->Release(); + glFuncs->glBindVertexArray(0); + GLWidget::DoneCurrent(); } Object::~Object() { - if(vao) - { - //GLWidget::MakeCurrent(); - //glFuncs->glDeleteVertexArrays(1, &vao); - //GLWidget::DoneCurrent(); - } + if(vao) + { + GLWidget::MakeCurrent(); + glFuncs->glDeleteVertexArrays(1, &vao); + GLWidget::DoneCurrent(); + } } void Object::Draw(GLenum drawMode, bool wireframe) @@ -91,19 +104,22 @@ void Object::Draw(GLenum drawMode, bool wireframe) { glFuncs->glBindBuffer(GL_PIXEL_UNPACK_BUFFER, texture->PBO()); glFuncs->glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, texture->ImageSize().width(), texture->ImageSize().height(), - GL_BGRA, GL_UNSIGNED_BYTE, NULL); + texture->GLFmt().second, GL_UNSIGNED_BYTE, NULL); glFuncs->glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); } } //glFuncs->glDrawArrays(drawMode, 0, buffers.at(0)->bCap / buffers.at(0)->aSize); - glFuncs->glDrawArraysInstanced(drawMode, 0, buffers.at(0)->bCap / buffers.at(0)->aSize, instances); + if(indexed) + glFuncs->glDrawElementsInstanced(drawMode, buffers.at(indicesID)->bCap, GL_UNSIGNED_SHORT, buffers.at(indicesID)->bData, instances); + else + glFuncs->glDrawArraysInstanced(drawMode, 0, buffers.at(0)->bCap / buffers.at(0)->aSize, instances); if(texture != nullptr) texture->Unbind(); glFuncs->glBindVertexArray(0); - + shader->Release(); } @@ -111,3 +127,44 @@ void Object::Move(QVector3D v) { modelMatrix.translate(v); } + +void Object::Save(QTextStream *output, std::vector *varList) +{ + varList->push_back("o_"); + varList->push_back(name); + varList->push_back(QString::number(instances)); + + QString bufIDs; + for(int i = 0; i < bufferIDs.size() - 1; i++) + { + bufIDs += QString::number(bufferIDs.at(i)) + "~"; + } + bufIDs += QString::number(bufferIDs.at(bufferIDs.size() - 1)); + varList->push_back(bufIDs); + varList->push_back(QString::number(textureID)); + varList->push_back(QString::number(shaderID)); + //varList->push_back(bUsage.second); //fbo? + + Savable::Save(output, varList); +} + +void Object::GetBuffers(std::vector *bufferIDs) +{ + for each (int i in *bufferIDs) + { + buffers.push_back(GLSettings::BufferList.at(i)); + } +} + +void Object::GetTexture(int texID) +{ + if(texID != -1) + texture = GLSettings::TextureList.at(texID); + else + texture = nullptr; +} + +void Object::GetShader(int shaderID) +{ + shader = GLWidget::ShaderList.at(shaderID); +} diff --git a/object.h b/object.h index aacb218..715fadc 100644 --- a/object.h +++ b/object.h @@ -7,11 +7,12 @@ #include "glwidget.h" #include "cuglbuffer.h" #include "texture.h" +#include "savable.h" -class Object +class Object : public Savable { public: - Object(QString name, int instances, std::vector buffers, Texture *texture, Shader *shader); + Object(QString name, int instances, std::vector *bufferIDs, int textureID, int shaderID); ~Object(); void Draw(GLenum drawMode, bool wireframe); @@ -26,15 +27,20 @@ class Object int FBO() const { return fbo; } void FBO(int val) { fbo = val; } + virtual void Save(QTextStream *output, std::vector *varList) override; + private: + void GetBuffers(std::vector *bufferIDs); + void GetTexture(int texID); + void GetShader(int shaderID); + QOpenGLFunctions_3_3_Core* glFuncs; QMatrix4x4 modelMatrix; GLuint vao, mLoc, vLoc, pLoc; - int fbo; - bool instanced; + std::vector bufferIDs; //IDs = location within static vectors (not GL IDs) + int textureID, shaderID, indicesID, fbo; + bool instanced, indexed; }; -#endif // OBJECT_H - - +#endif // OBJECT_H \ No newline at end of file diff --git a/objectpopup.cpp b/objectpopup.cpp index 02da769..f0193e7 100644 --- a/objectpopup.cpp +++ b/objectpopup.cpp @@ -81,7 +81,7 @@ ObjectPopup::ObjectPopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHint ObjectPopup::ObjectPopup(QWidget* parent, Object *o) : ObjectPopup(parent) { - append = true; + /*append = true; appObj = o; nameBox->setText(o->name); @@ -101,32 +101,12 @@ ObjectPopup::ObjectPopup(QWidget* parent, Object *o) : ObjectPopup(parent) } } - fboBox->setCurrentIndex((o->FBO() != 0) ? fboBox->findText(QString::number(o->FBO())) : 0); + fboBox->setCurrentIndex((o->FBO() != 0) ? fboBox->findText(QString::number(o->FBO())) : 0);*/ } ObjectPopup::~ObjectPopup() { - delete nameLabel; - delete instancesLabel; - delete bufferLabel; - delete textureLabel; - delete shaderLabel; - delete fboLabel; - delete nameBox; - delete instancesBox; - - for each (QStandardItem *i in itemList) - { - delete i; - } - - delete bufferBoxModel; - delete bufferBox; - delete textureBox; - delete shaderBox; - delete fboBox; - delete buttons; - delete mainLayout; + delete mainLayout; } bool ObjectPopup::Validation() @@ -143,7 +123,7 @@ bool ObjectPopup::Validation() nameBox->setStyleSheet(""); } - if(buffers.empty()) + if(bufferIDs.empty()) { bufferBox->setStyleSheet("border: 2px solid red"); result = false; @@ -166,11 +146,11 @@ void ObjectPopup::BuffersChanged(const QModelIndex& topLeft, const QModelIndex& { std::cout << "Unchecked!" << std::endl; - for(int i = 0; i < buffers.size(); ++i) + for(int i = 0; i < bufferIDs.size(); ++i) { - if(buffers.at(i)->bName == item->text()) + if(bufferIDs.at(i) == item->row()) { - buffers.erase(buffers.begin() + i); + bufferIDs.erase(bufferIDs.begin() + i); --i; } } @@ -178,7 +158,7 @@ void ObjectPopup::BuffersChanged(const QModelIndex& topLeft, const QModelIndex& else if(item->checkState() == Qt::Checked) { std::cout << "Checked!" << std::endl; - for each(CUGLBuffer* b in GLSettings::BufferList) + /*for each(CUGLBuffer* b in GLSettings::BufferList) { if(b->bName == item->text()) { @@ -193,7 +173,8 @@ void ObjectPopup::BuffersChanged(const QModelIndex& topLeft, const QModelIndex& if(!dupe) buffers.push_back(b); } - } + }*/ + bufferIDs.push_back(item->row()); } } @@ -204,27 +185,26 @@ void ObjectPopup::Save() QString name = nameBox->text(); int instances = instancesBox->value(); - Texture *tex = nullptr; - if(textureBox->currentIndex() != 0) - tex = GLSettings::TextureList.at(textureBox->currentIndex() - 1); + int texID = textureBox->currentIndex() - 1; if(!append) { - Object* o = new Object(name, instances, buffers, tex, GLWidget::ShaderList.at(shaderBox->currentIndex())); + //change buffers to bufIDs + Object* o = new Object(name, instances, &bufferIDs, texID, shaderBox->currentIndex()); if(fboBox->currentIndex() != 0) - o->FBO(GLWidget::FBOList.at(fboBox->currentIndex() - 1)); + o->FBO(GLWidget::FBOList.at(fboBox->currentIndex() - 1)); //move to constructor GLSettings::ObjectList.push_back(o); static_cast(parent())->AddToTable(o); } else { - appObj->name = name; + /*appObj->name = name; appObj->instances = instances; appObj->buffers = buffers; appObj->texture = tex; appObj->shader = GLWidget::ShaderList.at(shaderBox->currentIndex()); if(fboBox->currentIndex() != 0) - appObj->FBO(GLWidget::FBOList.at(fboBox->currentIndex() - 1)); + appObj->FBO(GLWidget::FBOList.at(fboBox->currentIndex() - 1));*/ } close(); diff --git a/objectpopup.h b/objectpopup.h index 6bae12a..92d7266 100644 --- a/objectpopup.h +++ b/objectpopup.h @@ -42,7 +42,8 @@ class ObjectPopup : public QDialog QDialogButtonBox* buttons; QStandardItemModel* bufferBoxModel; std::vector itemList; - std::vector buffers; + + std::vector bufferIDs; bool append; Object *appObj; diff --git a/objecttab.cpp b/objecttab.cpp index 753585a..a148113 100644 --- a/objecttab.cpp +++ b/objecttab.cpp @@ -3,76 +3,37 @@ ObjectTab::ObjectTab(QWidget* parent) : QWidget(parent) { - mainLayout = new QGridLayout; + mainLayout = new QVBoxLayout; buttonLayout = new QHBoxLayout; - add = new QPushButton("+"); + add = new QPushButton("Add"); connect(add, &QPushButton::clicked, this, &ObjectTab::Popup); - remove = new QPushButton("-"); + remove = new QPushButton("Remove"); connect(remove, &QPushButton::clicked, this, &ObjectTab::RemoveObject); buttonLayout->addWidget(add); buttonLayout->addWidget(remove); - mainLayout->addLayout(buttonLayout, 0, 0); - - listModel = new QStringListModel(); - objectStringList = QStringList(); - - for(int i = 0; i < GLSettings::TextureList.size(); ++i) - { - objectStringList.push_back(QString(GLSettings::ObjectList.at(i)->name)); - } - - listModel->setStringList(objectStringList); - - listView = new QListView; - listView->setModel(listModel); - connect(listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(ObjectSelected(QItemSelection))); - connect(listView->itemDelegate(), SIGNAL(closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint)), this, SLOT(ListEditEnd(QWidget*, QAbstractItemDelegate::EndEditHint))); - mainLayout->addWidget(listView, 1, 0); - mainLayout->setColumnStretch(0, 1); - - ObjectPopup *o = new ObjectPopup(this); - - detailScroll = new QScrollArea; - detailScroll->setBackgroundRole(QPalette::Dark); - detailScroll->setWidget(o); - - mainLayout->addWidget(detailScroll, 1, 1); - mainLayout->setColumnStretch(1, 4); - + mainLayout->addLayout(buttonLayout); + + table = new QTableWidget(1, 5); + QStringList headers; + headers << "Name" << "Instances" << "Buffers" << "Texture" << "Shader"; + table->setHorizontalHeaderLabels(headers); + table->horizontalHeader()->setHighlightSections(false); + table->verticalHeader()->setVisible(false); + table->setEditTriggers(QAbstractItemView::NoEditTriggers); + table->setSelectionBehavior(QAbstractItemView::SelectRows); + table->setSelectionMode(QAbstractItemView::SingleSelection); + connect(table, &QTableWidget::doubleClicked, this, &ObjectTab::TableDoubleClicked); + mainLayout->addWidget(table); setLayout(mainLayout); } ObjectTab::~ObjectTab() { - delete add; - delete remove; - delete buttonLayout; - delete mainLayout; -} - -void ObjectTab::ObjectSelected(const QItemSelection& selection) -{ - if(selection.indexes().isEmpty()) - { - //nothing selected - //unselect if white space is clicked in list - } - else - { - //texturePreview->setPixmap(QPixmap(QPixmap::fromImage(GLSettings::TextureList.at(selection.indexes().first().row())->Image()))); - } -} - -void ObjectTab::ListEditEnd(QWidget *editor, QAbstractItemDelegate::EndEditHint) -{ - int id = listView->currentIndex().row(); - QString s = reinterpret_cast(editor)->text(); //new name - objectStringList.replaceInStrings(objectStringList.at(id), s); - GLSettings::ObjectList.at(id)->name = s; + delete mainLayout; } void ObjectTab::Popup() diff --git a/objecttab.h b/objecttab.h index 058e100..7d562f1 100644 --- a/objecttab.h +++ b/objecttab.h @@ -8,9 +8,6 @@ #include #include #include -#include -#include -#include #include "object.h" #include "cuglbuffer.h" @@ -29,23 +26,17 @@ class ObjectTab : public QWidget private: QString BuffersToString(std::vector *buffers); - QGridLayout* mainLayout; + QVBoxLayout* mainLayout; QHBoxLayout* buttonLayout; QPushButton* add; QPushButton* remove; QTableWidget* table; - QStringList objectStringList; - QStringListModel *listModel; - QListView *listView; - QScrollArea *detailScroll; signals: public slots: private slots: - void ObjectSelected(const QItemSelection& selection); - void ListEditEnd(QWidget *editor, QAbstractItemDelegate::EndEditHint); void TableDoubleClicked(); void RemoveObject(); void Popup(); diff --git a/outputsettings.cpp b/outputsettings.cpp index faeaafb..edf702b 100644 --- a/outputsettings.cpp +++ b/outputsettings.cpp @@ -15,9 +15,7 @@ OutputSettings::OutputSettings(QWidget* parent) : QWidget(parent) OutputSettings::~OutputSettings() { - delete settingsLayout; - delete settingsGroup; - delete mainLayout; + delete mainLayout; } QSize OutputSettings::minimumSizeHint() const diff --git a/paramtab.cpp b/paramtab.cpp index c1e364b..0d33213 100644 --- a/paramtab.cpp +++ b/paramtab.cpp @@ -27,11 +27,7 @@ ParamTab::ParamTab(QWidget* parent) : QWidget(parent) ParamTab::~ParamTab() { - delete buttonLayout; - delete add; - delete remove; - delete table; - delete mainLayout; + delete mainLayout; } void ParamTab::AddClicked() diff --git a/particletexture.jpg b/particletexture.jpg deleted file mode 100644 index 8f14189..0000000 Binary files a/particletexture.jpg and /dev/null differ diff --git a/particletexture2.jpg b/particletexture2.jpg deleted file mode 100644 index 35b550e..0000000 Binary files a/particletexture2.jpg and /dev/null differ diff --git a/release/CUGL.exe b/release/CUGL.exe deleted file mode 100644 index 3c6f600..0000000 Binary files a/release/CUGL.exe and /dev/null differ diff --git a/savable.cpp b/savable.cpp new file mode 100644 index 0000000..95c8b47 --- /dev/null +++ b/savable.cpp @@ -0,0 +1,21 @@ +#include "savable.h" + +Savable::~Savable() +{ +} + +void Savable::Save(QTextStream *output, std::vector *varList) +{ + //collect certain variables from derived class + //call base class at the end, with name of class and variables + //save to file + + *output << varList->at(0); //0 is the class id + + for(int i = 1; i < varList->size(); i++) + { + *output << "|" << varList->at(i); + } + + endl(*output); //end line char + flush +} diff --git a/serializable.h b/serializable.h deleted file mode 100644 index aadd401..0000000 --- a/serializable.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once -class Serializable -{ -public: - virtual ~Serializable() { } - virtual void SaveClass() = 0; - virtual void LoadClass() = 0; -}; - diff --git a/shader.cpp b/shader.cpp index 2d9ca86..2c25ab2 100644 --- a/shader.cpp +++ b/shader.cpp @@ -24,19 +24,19 @@ Shader::Shader(QString name, QString vertPath, QString fragPath) { this->name = name; - bool result; + bool result, result2, result3; program = new QOpenGLShaderProgram(); result = program->addShaderFromSourceFile(QOpenGLShader::Vertex, vertPath); if(!result) Logger::Log(program->log().toStdString()); - result = program->addShaderFromSourceFile(QOpenGLShader::Fragment, fragPath); - if(!result) + result2 = program->addShaderFromSourceFile(QOpenGLShader::Fragment, fragPath); + if(!result2) Logger::Log(program->log().toStdString()); //result = program->addShaderFromSourceCode(QOpenGLShader::Vertex, vertexShaderSource); //result = program->addShaderFromSourceCode(QOpenGLShader::Fragment, fragmentShaderSource); - result = program->link(); + result3 = program->link(); - if(!result) + if(!result || !result2 || !result3) //fix { qWarning() << "Shader could not be initialised"; exit(1); diff --git a/texture.cpp b/texture.cpp index 4a7d60f..6660af3 100644 --- a/texture.cpp +++ b/texture.cpp @@ -1,28 +1,35 @@ #include "texture.h" +#include "glsettings.h" -//default parameters GLenum target, GLint internalFormat, -Texture::Texture(QString name, QString path, QImage image, int width, int height, std::pair target, std::pair minMagFilter, std::pair wrapMode, bool fbo) +Texture::Texture(QString name, QString path, int width, int height, QImage::Format fmt, QString targetString, QString filterString, QString wrapString, bool fbo, int pbo) { + GetGLTarget(targetString); + GetGLMinMagFilter(filterString); + GetGLWrapMode(wrapString); + glFuncs = 0; fboID = 0; - pbo = -1; - //QImageReader reader(path); - //reader.setAutoTransform(true); - this->image = image; - //if(image.isNull()) { - // qWarning() << QString("Failed to load image file %1").arg(path); - // return; - //} - - imageSize = QSize(width, height); - image = image.convertToFormat(QImage::Format_RGB32); + + if(path != "") + { + image = QImage(path); + image = image.convertToFormat(fmt); + } + else + { + image = QImage(width, height, fmt); + } data = image.constBits(); this->name = name; + this->imageSize = QSize(width, height); + this->dataPath = path; this->target = target; this->minMagFilter = minMagFilter; this->wrapMode = wrapMode; this->fbo = fbo; + this->pbo = pbo; + GetGLFormat(); //after image has been converted GLWidget::MakeCurrent(); glFuncs = QOpenGLContext::currentContext()->versionFunctions(); @@ -31,7 +38,7 @@ Texture::Texture(QString name, QString path, QImage image, int width, int height qWarning() << "Could not obtain required OpenGL context version"; exit(1); } - + glFuncs->glGenTextures(1, &texID); glFuncs->glBindTexture(target.first, texID); @@ -39,7 +46,9 @@ Texture::Texture(QString name, QString path, QImage image, int width, int height glFuncs->glTexParameteri(target.first, GL_TEXTURE_WRAP_T, wrapMode.first); glFuncs->glTexParameteri(target.first, GL_TEXTURE_MIN_FILTER, minMagFilter.first); glFuncs->glTexParameteri(target.first, GL_TEXTURE_MAG_FILTER, minMagFilter.first); - glFuncs->glTexImage2D(target.first, 0, GL_RGBA8, imageSize.width(), imageSize.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, data); + glFuncs->glGenerateMipmap(target.first); + + glFuncs->glTexImage2D(target.first, 0, glFmt.first, imageSize.width(), imageSize.height(), 0, glFmt.second, GL_UNSIGNED_BYTE, data); if(fbo) { @@ -51,61 +60,132 @@ Texture::Texture(QString name, QString path, QImage image, int width, int height GLWidget::DoneCurrent(); } -Texture::Texture(QString name, int width, int height, std::pair target, std::pair minMagFilter, std::pair wrapMode, bool fbo) +Texture::~Texture() { - glFuncs = 0; - fboID = 0; - pbo = -1; + glFuncs->glDeleteTextures(1, &texID); +} -// image = QImage(); -// data = image.constBits(); +void Texture::Bind() +{ + glFuncs->glBindTexture(target.first, texID); +} - this->name = name; - this->imageSize = QSize(width, height); - this->target = target; - this->minMagFilter = minMagFilter; - this->wrapMode = wrapMode; - this->fbo = fbo; +void Texture::Unbind() +{ + glFuncs->glBindTexture(target.first, 0); +} - GLWidget::MakeCurrent(); - glFuncs = QOpenGLContext::currentContext()->versionFunctions(); - if(!glFuncs) +unsigned int Texture::FormatCount() +{ + switch(image.format()) { - qWarning() << "Could not obtain required OpenGL context version"; - exit(1); + case QImage::Format_ARGB32: + return 4; + break; + case QImage::Format_RGB888: + return 3; + break; + case QImage::Format_Grayscale8: + return 1; + break; + } +} + +void Texture::GetGLFormat() +{ + switch(image.format()) + { + case QImage::Format_ARGB32: + glFmt.first = GL_RGBA8; + glFmt.second = GL_BGRA; + break; + case QImage::Format_RGB888: + glFmt.first = GL_RGB8; + glFmt.second = GL_BGRA; //use over GL_RGB? + break; + case QImage::Format_Grayscale8: + glFmt.first = GL_RED; + glFmt.second = GL_RED; + break; } +} - glFuncs->glGenTextures(1, &texID); - glFuncs->glBindTexture(target.first, texID); +void Texture::GetGLTarget(QString targetString) +{ + if(targetString.contains("1D")) + target.first = GL_TEXTURE_1D; - glFuncs->glTexParameteri(target.first, GL_TEXTURE_WRAP_S, wrapMode.first); - glFuncs->glTexParameteri(target.first, GL_TEXTURE_WRAP_T, wrapMode.first); - glFuncs->glTexParameteri(target.first, GL_TEXTURE_MIN_FILTER, minMagFilter.first); - glFuncs->glTexParameteri(target.first, GL_TEXTURE_MAG_FILTER, minMagFilter.first); + else if(targetString.contains("2D")) + target.first = GL_TEXTURE_2D; - glFuncs->glTexImage2D(target.first, 0, GL_RGBA8, imageSize.width(), imageSize.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, 0); + else if(targetString.contains("3D")) + target.first = GL_TEXTURE_3D; - if(fbo) - { - fboID = GLWidget::SetFBOTexture(texID); - } + else if(targetString.contains("RECTANGLE")) + target.first = GL_TEXTURE_RECTANGLE; - glFuncs->glBindTexture(target.first, 0); + else if(targetString.contains("CUBE_MAP")) + target.first = GL_TEXTURE_CUBE_MAP; - GLWidget::DoneCurrent(); + target.second = targetString; } -Texture::~Texture() +void Texture::GetGLMinMagFilter(QString filterString) { - + if(filterString == "GL_NEAREST") + minMagFilter.first = GL_NEAREST; + + else if(filterString == "GL_LINEAR") + minMagFilter.first = GL_LINEAR; + + else if(filterString == "GL_NEAREST_MIPMAP_NEAREST") + minMagFilter.first = GL_NEAREST_MIPMAP_NEAREST; + + else if(filterString == "GL_LINEAR_MIPMAP_NEAREST") + minMagFilter.first = GL_LINEAR_MIPMAP_NEAREST; + + else if(filterString == "GL_NEAREST_MIPMAP_LINEAR") + minMagFilter.first = GL_NEAREST_MIPMAP_LINEAR; + + else if(filterString == "GL_LINEAR_MIPMAP_LINEAR") + minMagFilter.first = GL_LINEAR_MIPMAP_LINEAR; + + minMagFilter.second = filterString; } -void Texture::Bind() +void Texture::GetGLWrapMode(QString wrapString) { - glFuncs->glBindTexture(target.first, texID); + if(wrapString == "GL_REPEAT") + wrapMode.first = GL_REPEAT; + + else if(wrapString == "GL_MIRRORED_REPEAT") + wrapMode.first = GL_MIRRORED_REPEAT; + + else if(wrapString == "GL_CLAMP_TO_EDGE") + wrapMode.first = GL_CLAMP_TO_EDGE; + + else if(wrapString == "GL_CLAMP_TO_BORDER") + wrapMode.first = GL_CLAMP_TO_BORDER; + + else if(wrapString == "GL_MIRROR_CLAMP_TO_EDGE") + wrapMode.first = GL_MIRROR_CLAMP_TO_EDGE; + + wrapMode.second = wrapString; } -void Texture::Unbind() +void Texture::Save(QTextStream *output, std::vector *varList) { - glFuncs->glBindTexture(target.first, 0); + varList->push_back("t_"); + varList->push_back(name); + varList->push_back(dataPath); + varList->push_back(QString::number(imageSize.width())); + varList->push_back(QString::number(imageSize.height())); + varList->push_back(QString::number(image.format())); + varList->push_back(target.second); + varList->push_back(minMagFilter.second); + varList->push_back(wrapMode.second); + varList->push_back(QString::number(fbo)); + varList->push_back(QString::number(pbo)); + + Savable::Save(output, varList); } diff --git a/texture.h b/texture.h index e3c1c06..53137d6 100644 --- a/texture.h +++ b/texture.h @@ -7,12 +7,12 @@ #include #include "glwidget.h" +#include "savable.h" -class Texture +class Texture : public Savable { public: - Texture(QString name, QString path, QImage image, int width, int height, std::pair target, std::pair minMagFilter, std::pair wrapMode, bool fbo); - Texture(QString name, int width, int height, std::pair target, std::pair minMagFilter, std::pair wrapMode, bool fbo); + Texture(QString name, QString path, int width, int height, QImage::Format fmt, QString targetString, QString filterString, QString wrapString, bool fbo, int pbo = -1); ~Texture(); void Bind(); @@ -23,31 +23,43 @@ class Texture QImage Image() const { return image; } //pass ref QSize ImageSize() const { return imageSize; } std::pair Target() const { return target; } - std::pair MinMagFilter() const { return minMagFilter; } - std::pair WrapMode() const { return wrapMode; } + std::pair MinMagFilter() const { return minMagFilter; } + std::pair WrapMode() const { return wrapMode; } + std::pair GLFmt() const { return glFmt; } bool FBO() const { return fbo; } int FBOID() const { return fboID; } int PBO() const { return pbo; } const void *Data() const { return data; } - + unsigned int FormatCount(); void Name(QString val) { name = val; } void DataPath(QString val) { dataPath = val; } void Image(QImage val) { image = val; } void ImageSize(QSize val) { imageSize = val; } void Target(std::pair val) { target = val; } - void MinMagFilter(std::pair val) { minMagFilter = val; } - void WrapMode(std::pair val) { wrapMode = val; } - void FBO(int val) { fbo = val; } + void MinMagFilter(std::pair val) { minMagFilter = val; } + void WrapMode(std::pair val) { wrapMode = val; } + void GLFmt(std::pair val) { glFmt = val; } + void FBO(int val) { fbo = val; } void PBO(int val) { pbo = val; } + + virtual void Save(QTextStream *output, std::vector *varList) override; //seperate save/load funcs or override base savable method? could use vector or delimed string, then same param + //static void Load(QTextStream *input, std::vector *outList); + private: + void GetGLFormat(); + void GetGLTarget(QString targetString); + void GetGLMinMagFilter(QString filterString); + void GetGLWrapMode(QString wrapString); + QString name, dataPath; GLuint texID; QImage image; QSize imageSize; const void *data; std::pair target; - std::pair minMagFilter, wrapMode; + std::pair minMagFilter, wrapMode; + std::pair glFmt; bool fbo; int fboID; int pbo; diff --git a/texturepopup.cpp b/texturepopup.cpp index 3bc847e..2b15bcb 100644 --- a/texturepopup.cpp +++ b/texturepopup.cpp @@ -14,6 +14,7 @@ TexturePopup::TexturePopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHin widthLabel = new QLabel("Width:"); heightLabel = new QLabel("Height:"); depthLabel = new QLabel("Depth:"); + formatLabel = new QLabel("Format:"); minMagLabel = new QLabel("Min/Mag Filter:"); wrapLabel = new QLabel("Wrap Mode:"); fboLabel = new QLabel("FBO:"); @@ -48,6 +49,11 @@ TexturePopup::TexturePopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHin depthBox->setMaximum(9999); depthBox->setKeyboardTracking(false); + formatBox = new QComboBox; + formatBox->addItem("RGBA"); + formatBox->addItem("RGB"); + formatBox->addItem("8-bit"); + minMagBox = new QComboBox; minMagBox->addItem("GL_NEAREST"); minMagBox->addItem("GL_LINEAR"); @@ -82,13 +88,15 @@ TexturePopup::TexturePopup(QWidget* parent) : QDialog(parent, Qt::WindowTitleHin mainLayout->addWidget(heightBox, 4, 1); mainLayout->addWidget(depthLabel, 5, 0); mainLayout->addWidget(depthBox, 5, 1); - mainLayout->addWidget(minMagLabel, 6, 0); - mainLayout->addWidget(minMagBox, 6, 1); - mainLayout->addWidget(wrapLabel, 7, 0); - mainLayout->addWidget(wrapBox, 7, 1); - mainLayout->addWidget(fboLabel, 8, 0); - mainLayout->addWidget(fboBox, 8, 1); - mainLayout->addWidget(buttons, 9, 1); + mainLayout->addWidget(formatLabel, 6, 0); + mainLayout->addWidget(formatBox, 6, 1); + mainLayout->addWidget(minMagLabel, 7, 0); + mainLayout->addWidget(minMagBox, 7, 1); + mainLayout->addWidget(wrapLabel, 8, 0); + mainLayout->addWidget(wrapBox, 8, 1); + mainLayout->addWidget(fboLabel, 9, 0); + mainLayout->addWidget(fboBox, 9, 1); + mainLayout->addWidget(buttons, 10, 1); setLayout(mainLayout); @@ -106,6 +114,9 @@ TexturePopup::TexturePopup(QWidget* parent, Texture *t) : TexturePopup(parent) widthBox->setValue(t->ImageSize().width()); heightBox->setValue(t->ImageSize().height()); //depthBox + + UpdateFormatBox(t->Image().format()); + minMagBox->setCurrentIndex(minMagBox->findText(t->MinMagFilter().second)); wrapBox->setCurrentIndex(wrapBox->findText(t->WrapMode().second)); fboBox->setChecked(t->FBO()); @@ -113,29 +124,7 @@ TexturePopup::TexturePopup(QWidget* parent, Texture *t) : TexturePopup(parent) TexturePopup::~TexturePopup() { - delete nameLabel; - delete targetLabel; - delete dataLabel; - delete widthLabel; - delete heightLabel; - delete depthLabel; - delete minMagLabel; - delete wrapLabel; - delete fboLabel; - - delete nameBox; - delete dataBox; - delete widthBox; - delete heightBox; - delete depthBox; - delete targetBox; - delete minMagBox; - delete wrapBox; - delete fboBox; - - delete buttons; - - delete mainLayout; + delete mainLayout; } bool TexturePopup::Validation() @@ -152,7 +141,7 @@ bool TexturePopup::Validation() nameBox->setStyleSheet(""); } - if(!dataBox->text().isEmpty() && img.isNull()) + /*if(!dataBox->text().isEmpty()) { nameBox->setStyleSheet("border: 2px solid red"); result = false; @@ -160,7 +149,7 @@ bool TexturePopup::Validation() else { nameBox->setStyleSheet(""); - } + }*/ return result; } @@ -205,140 +194,69 @@ void TexturePopup::TargetChanged(int i) } } -void TexturePopup::SetTarget() +void TexturePopup::UpdateFormatBox(QImage::Format fmt) { - switch(targetBox->currentIndex()) + switch(fmt) { - case 0: - { - target.first = GL_TEXTURE_1D; - break; - } - case 1: - { - target.first = GL_TEXTURE_2D; - break; - } - case 2: - { - target.first = GL_TEXTURE_3D; - break; - } - case 3: - { - target.first = GL_TEXTURE_RECTANGLE; - break; - } - case 4: - { - target.first = GL_TEXTURE_CUBE_MAP; - break; - } + case QImage::Format_ARGB32: + formatBox->setCurrentIndex(0); + break; + case QImage::Format_RGB888: + formatBox->setCurrentIndex(1); + break; + case QImage::Format_Grayscale8: + formatBox->setCurrentIndex(2); + break; } - - target.second = targetBox->currentText(); } -void TexturePopup::SetMinMagFilter() +QImage::Format TexturePopup::GetFormat() { - switch(minMagBox->currentIndex()) - { - case 0: - { - minMagFilter.first = GL_NEAREST; - break; - } - case 1: - { - minMagFilter.first = GL_LINEAR; - break; - } - case 2: - { - minMagFilter.first = GL_NEAREST_MIPMAP_NEAREST; - break; - } - case 3: - { - minMagFilter.first = GL_LINEAR_MIPMAP_NEAREST; - break; - } - case 4: - { - minMagFilter.first = GL_NEAREST_MIPMAP_LINEAR; - break; - } - case 5: - { - minMagFilter.first = GL_LINEAR_MIPMAP_LINEAR; - break; - } - } - - minMagFilter.second = minMagBox->currentText(); -} + QImage::Format fmt; -void TexturePopup::SetWrapMode() -{ - switch(wrapBox->currentIndex()) + switch(formatBox->currentIndex()) { - case 0: - { - wrapMode.first = GL_REPEAT; - break; - } - case 1: - { - wrapMode.first = GL_MIRRORED_REPEAT; - break; - } - case 2: - { - wrapMode.first = GL_CLAMP_TO_EDGE; - break; - } - case 3: - { - wrapMode.first = GL_CLAMP_TO_BORDER; - break; - } - case 4: - { - wrapMode.first = GL_MIRROR_CLAMP_TO_EDGE; - break; - } + case 0: + fmt = QImage::Format_ARGB32; + break; + case 1: + fmt = QImage::Format_RGB888; + break; + case 2: + fmt = QImage::Format_Grayscale8; + break; } - wrapMode.second = wrapBox->currentText(); + return fmt; } void TexturePopup::CustomDataClicked() { - QString s; QString title = "Open Image File"; QString filter = "Image Files (*.png *.jpg *.bmp)"; - s = QFileDialog::getOpenFileName(this, title, QDir::currentPath(), filter); - if(s.size() == 0) + path = QFileDialog::getOpenFileName(this, title, QDir::currentPath(), filter); + if(path.size() == 0) return; //cancelled - dataBox->setText(s); - dataBox->setCursorPosition(s.size()); + dataBox->setText(path); + dataBox->setCursorPosition(path.size()); - int nameBegin = s.lastIndexOf("/") + 1; + int nameBegin = path.lastIndexOf("/") + 1; //int nameEnd = s.lastIndexOf(".") + 1; //to remove extension - QString name = s.right(s.length() - nameBegin); + QString name = path.right(path.length() - nameBegin); //only used for error message - img = QImage(s); + QImage img = QImage(path); //temp image instead of passing it through (makes saving easier) if(!img.isNull()) { widthBox->setValue(img.size().width()); heightBox->setValue(img.size().height()); + UpdateFormatBox(img.format()); } else { - Logger::Log("Faied to load texture " + name.toStdString()); + Logger::Log("Failed to load texture " + name.toStdString()); } } @@ -346,10 +264,6 @@ void TexturePopup::Save() { if(Validation()) { - SetTarget(); - SetMinMagFilter(); - SetWrapMode(); - QString name = nameBox->text(); QString dataPath = dataBox->text(); @@ -362,24 +276,26 @@ void TexturePopup::Save() if(height == 0) height = GLWidget::Height(); + target = targetBox->currentText(); + minMagFilter = minMagBox->currentText(); + wrapMode = wrapBox->currentText(); + QImage::Format fmt = GetFormat(); + bool fbo = fboBox->isChecked(); if(!append) { Texture *t; - if(!img.isNull()) - t = new Texture(name, dataPath, img, width, height, target, minMagFilter, wrapMode, fbo); - else - t = new Texture(name, width, height, target, minMagFilter, wrapMode, fbo); - + t = new Texture(name, dataPath, width, height, fmt, target, minMagFilter, wrapMode, fbo); GLSettings::TextureList.push_back(t); static_cast(parent())->AddToList(t); } else { - appBuf->Name(name); + /*appBuf->Name(name); appBuf->Target(target); + appBuf->Image = appBuf->Image.convertToFormat(fmt); if(dataPath != "") { appBuf->DataPath(dataPath); @@ -388,7 +304,7 @@ void TexturePopup::Save() appBuf->ImageSize(QSize(width, height)); appBuf->MinMagFilter(minMagFilter); appBuf->WrapMode(wrapMode); - appBuf->FBO(fbo); + appBuf->FBO(fbo);*/ } close(); diff --git a/texturepopup.h b/texturepopup.h index 7ea5933..e3454b6 100644 --- a/texturepopup.h +++ b/texturepopup.h @@ -29,32 +29,28 @@ class TexturePopup : public QDialog private: void CustomDataClicked(); bool Validation(); - void SetTarget(); - void SetMinMagFilter(); - void SetWrapMode(); + void UpdateFormatBox(QImage::Format fmt); + QImage::Format GetFormat(); QWidget* parentWidget; QGridLayout* mainLayout; QLabel *nameLabel, *targetLabel, *dataLabel, *widthLabel, *heightLabel, *depthLabel, - *minMagLabel, *wrapLabel, - *fboLabel; + *formatLabel, *minMagLabel, + *wrapLabel, *fboLabel; QLineEdit *nameBox, *dataBox; QSpinBox *widthBox, *heightBox, *depthBox; - QComboBox *targetBox, *minMagBox, *wrapBox; + QComboBox *targetBox, *formatBox, *minMagBox, *wrapBox; QCheckBox *fboBox; QDialogButtonBox* buttons; - - QImage img; - std::pair target; - std::pair minMagFilter, wrapMode; + QString target, minMagFilter, wrapMode, path; bool append; Texture *appBuf; -private slots: + private slots: bool eventFilter(QObject* object, QEvent* event); void TargetChanged(int i); void Save(); diff --git a/texturetab.cpp b/texturetab.cpp index d2d65c8..f409de3 100644 --- a/texturetab.cpp +++ b/texturetab.cpp @@ -3,19 +3,20 @@ TextureTab::TextureTab(QWidget* parent /*= 0*/) { - mainLayout = new QGridLayout; + mainLayout = new QVBoxLayout; buttonLayout = new QHBoxLayout; + textureLayout = new QHBoxLayout; - add = new QPushButton("+"); + add = new QPushButton("Add"); connect(add, &QPushButton::clicked, this, &TextureTab::Popup); - remove = new QPushButton("-"); + remove = new QPushButton("Remove"); connect(remove, &QPushButton::clicked, this, &TextureTab::RemoveTexture); buttonLayout->addWidget(add); buttonLayout->addWidget(remove); - mainLayout->addLayout(buttonLayout, 0, 0); + mainLayout->addLayout(buttonLayout); listModel = new QStringListModel(); textureStringList = QStringList(); @@ -29,11 +30,11 @@ TextureTab::TextureTab(QWidget* parent /*= 0*/) listView = new QListView; listView->setModel(listModel); + listView->setSelectionMode(QAbstractItemView::ContiguousSelection); connect(listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(TextureSelected(QItemSelection))); connect(listView->itemDelegate(), SIGNAL(closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint)), this, SLOT(ListEditEnd(QWidget*, QAbstractItemDelegate::EndEditHint))); - mainLayout->addWidget(listView, 1, 0); - mainLayout->setColumnStretch(0, 1); + textureLayout->addWidget(listView); texturePreview = new QLabel; texturePreview->setBackgroundRole(QPalette::Base); @@ -43,16 +44,16 @@ TextureTab::TextureTab(QWidget* parent /*= 0*/) textureScroll = new QScrollArea; textureScroll->setBackgroundRole(QPalette::Dark); textureScroll->setWidget(texturePreview); - - mainLayout->addWidget(textureScroll, 1, 1); - mainLayout->setColumnStretch(1, 4); + + textureLayout->addWidget(textureScroll); + mainLayout->addLayout(textureLayout); setLayout(mainLayout); } TextureTab::~TextureTab() { - + delete mainLayout; } void TextureTab::AddToList(Texture *t) @@ -125,35 +126,3 @@ void TextureTab::Popup() TexturePopup p(this); p.exec(); } - -/*bool ImageViewer::loadFile(const QString &fileName) -{ - QImageReader reader(fileName); - reader.setAutoTransform(true); - const QImage image = reader.read(); - if (image.isNull()) { - QMessageBox::information(this, QGuiApplication::applicationDisplayName(), - tr("Cannot load %1.").arg(QDir::toNativeSeparators(fileName))); - setWindowFilePath(QString()); - imageLabel->setPixmap(QPixmap()); - imageLabel->adjustSize(); - return false; - } -//! [2] //! [3] - imageLabel->setPixmap(QPixmap::fromImage(image)); -//! [3] //! [4] - scaleFactor = 1.0; - - printAct->setEnabled(true); - fitToWindowAct->setEnabled(true); - updateActions(); - - if (!fitToWindowAct->isChecked()) - imageLabel->adjustSize(); - - setWindowFilePath(fileName); - return true; -} - -!loadFile(dialog.selectedFiles() //loop over selectedFiles -*/ diff --git a/texturetab.h b/texturetab.h index 81f6d47..08a5443 100644 --- a/texturetab.h +++ b/texturetab.h @@ -25,8 +25,7 @@ class TextureTab : public QWidget void AddToList(Texture *t); private: - QGridLayout* mainLayout; - //QVBoxLayout* mainLayout; + QVBoxLayout* mainLayout; QHBoxLayout* buttonLayout; QHBoxLayout* textureLayout; QPushButton* add; diff --git a/utilities.cpp b/utilities.cpp index 89edbad..78a128a 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -4,10 +4,22 @@ float CUTimer::ElapsedTime() { float ms = 0; cudaEventElapsedTime(&ms, start, stop); - Logger::Log("Kernel Time: " + std::to_string(ms) + "ms"); + Logger::BasicLog("Kernel Time: " + std::to_string(ms) + "ms", filePath); return ms; } +double Timer::ElapsedTime() +{ + double ms = elapsedTime = (t2.QuadPart - t1.QuadPart) * 1000.0 / frequency.QuadPart; + Logger::BasicLog(std::to_string(ms), filePath); + return ms; +} + +Timer::~Timer() +{ + +} + namespace Logger { std::string path = ""; @@ -84,4 +96,22 @@ namespace Logger printf(msg.c_str()); } } -} \ No newline at end of file + + //no init required + //seperate file location (FULL e.g. path+name+extension) + //no fancy formatting + void BasicLog(const std::string &msg, std::string fullFilePath) + { + std::size_t found = fullFilePath.find_last_of("/\\"); + if(CreateDirectoryA(fullFilePath.substr(0, found).c_str(), NULL) || ERROR_ALREADY_EXISTS == GetLastError()) + { + fileStream.open(fullFilePath, std::ofstream::out | std::ofstream::app); + if(fileStream.is_open()) + { + fileStream << msg << "\n"; + fileStream.close(); + } + } + } +} + diff --git a/utilities.h b/utilities.h index e2a0fde..22fb174 100644 --- a/utilities.h +++ b/utilities.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include #include #include #include @@ -14,6 +15,7 @@ namespace Logger { void InitLogger(const std::string &folderPath = "Logs"); void Log(const std::string &msg); + void BasicLog(const std::string &msg, std::string path); } static bool ErrCheck(cudaError_t e, const char *file, int line) @@ -34,7 +36,7 @@ static bool ErrCheck(cudaError_t e, const char *file, int line) class CUTimer { public: - CUTimer() { cudaEventCreate(&start); cudaEventCreate(&stop); } + CUTimer(std::string path) { filePath = path; cudaEventCreate(&start); cudaEventCreate(&stop); } ~CUTimer() { cudaEventDestroy(start); cudaEventDestroy(stop); } inline void Begin() { cudaEventRecord(start); } @@ -43,4 +45,47 @@ class CUTimer private: cudaEvent_t start, stop; + std::string filePath; }; + +class Timer +{ +public: + Timer(std::string path) { filePath = path; QueryPerformanceFrequency(&frequency); } + ~Timer(); + + inline void Begin() { QueryPerformanceCounter(&t1); } + inline void End() { QueryPerformanceCounter(&t2); ElapsedTime(); } + double ElapsedTime(); + +private: + LARGE_INTEGER frequency; // ticks per second + LARGE_INTEGER t1, t2; // ticks + double elapsedTime; + std::string filePath; +}; + +namespace CUMath +{ + class SimpleComplex + { + public: + __host__ __device__ SimpleComplex(); + __host__ __device__ SimpleComplex(float real, float imag); + + __host__ __device__ static SimpleComplex Polar(float amp, float theta); + + __host__ __device__ float abs(); + __host__ __device__ float absSq(); + __host__ __device__ float Angle(); + __host__ __device__ void Normalise(); + __host__ __device__ int Measure(); + + __host__ __device__ SimpleComplex operator*(const float& f) const; + __host__ __device__ SimpleComplex operator*(const int& i) const; + __host__ __device__ SimpleComplex operator/(const float& f) const; + __host__ __device__ SimpleComplex operator+(const SimpleComplex& c) const; + private: + float real, imag; + }; +} diff --git a/vc120.pdb b/vc120.pdb deleted file mode 100644 index e21a8f8..0000000 Binary files a/vc120.pdb and /dev/null differ diff --git a/x64/Debug/CUGL.log b/x64/Debug/CUGL.log deleted file mode 100644 index 723c387..0000000 --- a/x64/Debug/CUGL.log +++ /dev/null @@ -1,40 +0,0 @@ - Moc'ing bufferpopup.h... - Moc'ing controltab.h... - Moc'ing cubuffertab.h... - Moc'ing cugeneraltab.h... - Moc'ing cusettings.h... - Moc'ing glbuffertab.h... - Moc'ing glgeneraltab.h... - Moc'ing glsettings.h... - Moc'ing glwidget.h... - Moc'ing mainwindow.h... - Moc'ing objectpopup.h... - Moc'ing objecttab.h... - Moc'ing outputsettings.h... - Moc'ing paramtab.h... - Moc'ing texturepopup.h... - Moc'ing texturetab.h... - moc_bufferpopup.cpp - moc_controltab.cpp - moc_cubuffertab.cpp - moc_cugeneraltab.cpp - moc_cusettings.cpp - moc_glbuffertab.cpp - moc_glgeneraltab.cpp - moc_glsettings.cpp - moc_glwidget.cpp - moc_mainwindow.cpp - moc_objectpopup.cpp - moc_objecttab.cpp - moc_outputsettings.cpp - moc_paramtab.cpp - moc_texturepopup.cpp - moc_texturetab.cpp - glwidget.cpp -glwidget.cpp(174): warning C4100: 'i' : unreferenced formal parameter -glwidget.cpp(194): warning C4100: 'b' : unreferenced formal parameter -glwidget.cpp(198): warning C4100: 'b' : unreferenced formal parameter -glwidget.cpp(376): warning C4305: 'argument' : truncation from 'double' to 'float' -glwidget.cpp(370): warning C4189: 'retinaScale' : local variable is initialized but not referenced - Generating Code... - CUGL.vcxproj -> D:\GitHub\CUGL\debug\CUGL.exe diff --git a/x64/Debug/CUGL.tlog/CL.read.1.tlog b/x64/Debug/CUGL.tlog/CL.read.1.tlog deleted file mode 100644 index fea5257..0000000 Binary files a/x64/Debug/CUGL.tlog/CL.read.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/CL.write.1.tlog b/x64/Debug/CUGL.tlog/CL.write.1.tlog deleted file mode 100644 index 1f56483..0000000 Binary files a/x64/Debug/CUGL.tlog/CL.write.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/CUGL.lastbuildstate b/x64/Debug/CUGL.tlog/CUGL.lastbuildstate deleted file mode 100644 index 73a8512..0000000 --- a/x64/Debug/CUGL.tlog/CUGL.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit -Debug|x64|D:\GitHub\CUGL\| diff --git a/x64/Debug/CUGL.tlog/cl.command.1.tlog b/x64/Debug/CUGL.tlog/cl.command.1.tlog deleted file mode 100644 index ecf16df..0000000 Binary files a/x64/Debug/CUGL.tlog/cl.command.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/custombuild.command.1.tlog b/x64/Debug/CUGL.tlog/custombuild.command.1.tlog deleted file mode 100644 index 4929013..0000000 Binary files a/x64/Debug/CUGL.tlog/custombuild.command.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/custombuild.read.1.tlog b/x64/Debug/CUGL.tlog/custombuild.read.1.tlog deleted file mode 100644 index 49dfd70..0000000 Binary files a/x64/Debug/CUGL.tlog/custombuild.read.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/custombuild.write.1.tlog b/x64/Debug/CUGL.tlog/custombuild.write.1.tlog deleted file mode 100644 index 8b772f6..0000000 Binary files a/x64/Debug/CUGL.tlog/custombuild.write.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/link.command.1.tlog b/x64/Debug/CUGL.tlog/link.command.1.tlog deleted file mode 100644 index 5cd4e21..0000000 Binary files a/x64/Debug/CUGL.tlog/link.command.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/link.read.1.tlog b/x64/Debug/CUGL.tlog/link.read.1.tlog deleted file mode 100644 index cc89317..0000000 Binary files a/x64/Debug/CUGL.tlog/link.read.1.tlog and /dev/null differ diff --git a/x64/Debug/CUGL.tlog/link.write.1.tlog b/x64/Debug/CUGL.tlog/link.write.1.tlog deleted file mode 100644 index 72cb3f1..0000000 Binary files a/x64/Debug/CUGL.tlog/link.write.1.tlog and /dev/null differ diff --git a/x64/Debug/bufferpopup.obj b/x64/Debug/bufferpopup.obj deleted file mode 100644 index 14f32e7..0000000 Binary files a/x64/Debug/bufferpopup.obj and /dev/null differ diff --git a/x64/Debug/colourtextbox.obj b/x64/Debug/colourtextbox.obj deleted file mode 100644 index 72afc1a..0000000 Binary files a/x64/Debug/colourtextbox.obj and /dev/null differ diff --git a/x64/Debug/controltab.obj b/x64/Debug/controltab.obj deleted file mode 100644 index ec9ba80..0000000 Binary files a/x64/Debug/controltab.obj and /dev/null differ diff --git a/x64/Debug/cubuffertab.obj b/x64/Debug/cubuffertab.obj deleted file mode 100644 index e0d6919..0000000 Binary files a/x64/Debug/cubuffertab.obj and /dev/null differ diff --git a/x64/Debug/cugeneraltab.obj b/x64/Debug/cugeneraltab.obj deleted file mode 100644 index 702d155..0000000 Binary files a/x64/Debug/cugeneraltab.obj and /dev/null differ diff --git a/x64/Debug/cuglbuffer.obj b/x64/Debug/cuglbuffer.obj deleted file mode 100644 index a42d5ec..0000000 Binary files a/x64/Debug/cuglbuffer.obj and /dev/null differ diff --git a/x64/Debug/cusettings.obj b/x64/Debug/cusettings.obj deleted file mode 100644 index caed598..0000000 Binary files a/x64/Debug/cusettings.obj and /dev/null differ diff --git a/x64/Debug/glbuffertab.obj b/x64/Debug/glbuffertab.obj deleted file mode 100644 index cf970c8..0000000 Binary files a/x64/Debug/glbuffertab.obj and /dev/null differ diff --git a/x64/Debug/glgeneraltab.obj b/x64/Debug/glgeneraltab.obj deleted file mode 100644 index daab10d..0000000 Binary files a/x64/Debug/glgeneraltab.obj and /dev/null differ diff --git a/x64/Debug/glsettings.obj b/x64/Debug/glsettings.obj deleted file mode 100644 index 6f4e452..0000000 Binary files a/x64/Debug/glsettings.obj and /dev/null differ diff --git a/x64/Debug/glwidget.obj b/x64/Debug/glwidget.obj deleted file mode 100644 index f8b53d2..0000000 Binary files a/x64/Debug/glwidget.obj and /dev/null differ diff --git a/x64/Debug/kerneltab.obj b/x64/Debug/kerneltab.obj deleted file mode 100644 index 6f4d563..0000000 Binary files a/x64/Debug/kerneltab.obj and /dev/null differ diff --git a/x64/Debug/main.obj b/x64/Debug/main.obj deleted file mode 100644 index b12240e..0000000 Binary files a/x64/Debug/main.obj and /dev/null differ diff --git a/x64/Debug/mainwindow.obj b/x64/Debug/mainwindow.obj deleted file mode 100644 index d970a9e..0000000 Binary files a/x64/Debug/mainwindow.obj and /dev/null differ diff --git a/x64/Debug/moc_bufferpopup.obj b/x64/Debug/moc_bufferpopup.obj deleted file mode 100644 index 608e282..0000000 Binary files a/x64/Debug/moc_bufferpopup.obj and /dev/null differ diff --git a/x64/Debug/moc_controltab.obj b/x64/Debug/moc_controltab.obj deleted file mode 100644 index 29afc4e..0000000 Binary files a/x64/Debug/moc_controltab.obj and /dev/null differ diff --git a/x64/Debug/moc_cubuffertab.obj b/x64/Debug/moc_cubuffertab.obj deleted file mode 100644 index fb97e69..0000000 Binary files a/x64/Debug/moc_cubuffertab.obj and /dev/null differ diff --git a/x64/Debug/moc_cugeneraltab.obj b/x64/Debug/moc_cugeneraltab.obj deleted file mode 100644 index d726025..0000000 Binary files a/x64/Debug/moc_cugeneraltab.obj and /dev/null differ diff --git a/x64/Debug/moc_cusettings.obj b/x64/Debug/moc_cusettings.obj deleted file mode 100644 index a6e78a4..0000000 Binary files a/x64/Debug/moc_cusettings.obj and /dev/null differ diff --git a/x64/Debug/moc_glbuffertab.obj b/x64/Debug/moc_glbuffertab.obj deleted file mode 100644 index 2621328..0000000 Binary files a/x64/Debug/moc_glbuffertab.obj and /dev/null differ diff --git a/x64/Debug/moc_glgeneraltab.obj b/x64/Debug/moc_glgeneraltab.obj deleted file mode 100644 index 1859968..0000000 Binary files a/x64/Debug/moc_glgeneraltab.obj and /dev/null differ diff --git a/x64/Debug/moc_glsettings.obj b/x64/Debug/moc_glsettings.obj deleted file mode 100644 index cc0cca2..0000000 Binary files a/x64/Debug/moc_glsettings.obj and /dev/null differ diff --git a/x64/Debug/moc_glwidget.obj b/x64/Debug/moc_glwidget.obj deleted file mode 100644 index 5a9975c..0000000 Binary files a/x64/Debug/moc_glwidget.obj and /dev/null differ diff --git a/x64/Debug/moc_mainwindow.obj b/x64/Debug/moc_mainwindow.obj deleted file mode 100644 index af1bb70..0000000 Binary files a/x64/Debug/moc_mainwindow.obj and /dev/null differ diff --git a/x64/Debug/moc_objectpopup.obj b/x64/Debug/moc_objectpopup.obj deleted file mode 100644 index 575f688..0000000 Binary files a/x64/Debug/moc_objectpopup.obj and /dev/null differ diff --git a/x64/Debug/moc_objecttab.obj b/x64/Debug/moc_objecttab.obj deleted file mode 100644 index beacbcd..0000000 Binary files a/x64/Debug/moc_objecttab.obj and /dev/null differ diff --git a/x64/Debug/moc_outputsettings.obj b/x64/Debug/moc_outputsettings.obj deleted file mode 100644 index 671acb8..0000000 Binary files a/x64/Debug/moc_outputsettings.obj and /dev/null differ diff --git a/x64/Debug/moc_paramtab.obj b/x64/Debug/moc_paramtab.obj deleted file mode 100644 index 2d0483b..0000000 Binary files a/x64/Debug/moc_paramtab.obj and /dev/null differ diff --git a/x64/Debug/moc_texturetab.obj b/x64/Debug/moc_texturetab.obj deleted file mode 100644 index 552ba32..0000000 Binary files a/x64/Debug/moc_texturetab.obj and /dev/null differ diff --git a/x64/Debug/object.obj b/x64/Debug/object.obj deleted file mode 100644 index a47de0a..0000000 Binary files a/x64/Debug/object.obj and /dev/null differ diff --git a/x64/Debug/objectpopup.obj b/x64/Debug/objectpopup.obj deleted file mode 100644 index 0a1d4e0..0000000 Binary files a/x64/Debug/objectpopup.obj and /dev/null differ diff --git a/x64/Debug/objecttab.obj b/x64/Debug/objecttab.obj deleted file mode 100644 index e5f8289..0000000 Binary files a/x64/Debug/objecttab.obj and /dev/null differ diff --git a/x64/Debug/outputsettings.obj b/x64/Debug/outputsettings.obj deleted file mode 100644 index 3c40fcd..0000000 Binary files a/x64/Debug/outputsettings.obj and /dev/null differ diff --git a/x64/Debug/paramtab.obj b/x64/Debug/paramtab.obj deleted file mode 100644 index 5939706..0000000 Binary files a/x64/Debug/paramtab.obj and /dev/null differ diff --git a/x64/Debug/shader.obj b/x64/Debug/shader.obj deleted file mode 100644 index 3b718f4..0000000 Binary files a/x64/Debug/shader.obj and /dev/null differ diff --git a/x64/Debug/texture.obj b/x64/Debug/texture.obj deleted file mode 100644 index 7dada7d..0000000 Binary files a/x64/Debug/texture.obj and /dev/null differ diff --git a/x64/Debug/texturetab.obj b/x64/Debug/texturetab.obj deleted file mode 100644 index 148bcc5..0000000 Binary files a/x64/Debug/texturetab.obj and /dev/null differ diff --git a/x64/Debug/vc120.pdb b/x64/Debug/vc120.pdb deleted file mode 100644 index 78d9326..0000000 Binary files a/x64/Debug/vc120.pdb and /dev/null differ diff --git a/x64/Release/CUGL.log b/x64/Release/CUGL.log deleted file mode 100644 index 7292d53..0000000 --- a/x64/Release/CUGL.log +++ /dev/null @@ -1,84 +0,0 @@ -Build started 22/11/2015 22:02:07. - 1>Project "C:\Users\Anth\Documents\GitHub\CUGL\CUGL.vcxproj" on node 2 (Build target(s)). - 1>CustomBuild: - Moc'ing bufferpopup.h... - Moc'ing controltab.h... - Moc'ing cubuffertab.h... - Moc'ing cugeneraltab.h... - Moc'ing cusettings.h... - Moc'ing glbuffertab.h... - Moc'ing glgeneraltab.h... - Moc'ing glsettings.h... - Moc'ing glwidget.h... - Moc'ing mainwindow.h... - Moc'ing objectpopup.h... - Moc'ing objecttab.h... - Moc'ing outputsettings.h... - Moc'ing paramtab.h... - Moc'ing texturetab.h... - "C:/Program - 1>Kernels/kernel.cu(25): warning : variable "init" was declared but never referenced - - 1>Kernels/kernel.cu(25): warning : variable "init" was declared but never referenced - - kernel.cu - ClCompile: - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /I. /I. /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" /IC:\Qt\5.5\msvc2013_64\include /IC:\Qt\5.5\msvc2013_64\include\QtWidgets /IC:\Qt\5.5\msvc2013_64\include\QtGui /IC:\Qt\5.5\msvc2013_64\include\QtANGLE /IC:\Qt\5.5\msvc2013_64\include\QtCore /Irelease /I. /I"C:\Qt\5.5\msvc2013_64\mkspecs\win32-msvc2013" /nologo /W3 /WX- /O2 /D _WINDOWS /D UNICODE /D WIN32 /D WIN64 /D QT_NO_DEBUG /D QT_WIDGETS_LIB /D QT_GUI_LIB /D QT_CORE_LIB /D NDEBUG /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"x64\Release\\" /Fd"x64\Release\vc120.pdb" /Gd /TP /errorReport:prompt -Zc:strictStrings -w34100 -w34189 -w44996 addbutton.cpp bufferpopup.cpp colourtextbox.cpp controltab.cpp cubuffertab.cpp cugeneraltab.cpp cuglbuffer.cpp cusettings.cpp glbuffertab.cpp glgeneraltab.cpp glsettings.cpp glwidget.cpp kerneltab.cpp main.cpp mainwindow.cpp Release\moc_bufferpopup.cpp Release\moc_controltab.cpp Release\moc_cubuffertab.cpp Release\moc_cugeneraltab.cpp Release\moc_cusettings.cpp Release\moc_glbuffertab.cpp Release\moc_glgeneraltab.cpp Release\moc_glsettings.cpp Release\moc_glwidget.cpp Release\moc_mainwindow.cpp Release\moc_objectpopup.cpp Release\moc_objecttab.cpp Release\moc_outputsettings.cpp Release\moc_paramtab.cpp object.cpp objectpopup.cpp objecttab.cpp outputsettings.cpp paramtab.cpp Release\moc_texturetab.cpp removebutton.cpp shader.cpp texture.cpp texturetab.cpp - addbutton.cpp - 1>addbutton.cpp(1): fatal error C1083: Cannot open include file: 'addbutton.h': No such file or directory - bufferpopup.cpp - colourtextbox.cpp - controltab.cpp - cubuffertab.cpp - 1>cubuffertab.cpp(72): warning C4189: 'j' : local variable is initialized but not referenced - cugeneraltab.cpp - 1>cugeneraltab.cpp(83): warning C4100: 'i' : unreferenced formal parameter - cuglbuffer.cpp - cusettings.cpp - glbuffertab.cpp - glgeneraltab.cpp - 1>glgeneraltab.cpp(108): warning C4100: 'i' : unreferenced formal parameter - glsettings.cpp - glwidget.cpp - 1>glwidget.cpp(148): warning C4100: 'i' : unreferenced formal parameter - 1>glwidget.cpp(168): warning C4100: 'b' : unreferenced formal parameter - 1>glwidget.cpp(172): warning C4100: 'b' : unreferenced formal parameter - kerneltab.cpp - main.cpp - mainwindow.cpp - 1>mainwindow.cpp(2): fatal error C1083: Cannot open include file: 'ui_mainwindow.h': No such file or directory - moc_bufferpopup.cpp - moc_controltab.cpp - moc_cubuffertab.cpp - moc_cugeneraltab.cpp - moc_cusettings.cpp - Generating Code... - Compiling... - moc_glbuffertab.cpp - moc_glgeneraltab.cpp - moc_glsettings.cpp - moc_glwidget.cpp - moc_mainwindow.cpp - moc_objectpopup.cpp - moc_objecttab.cpp - moc_outputsettings.cpp - moc_paramtab.cpp - object.cpp - objectpopup.cpp - 1>objectpopup.cpp(150): warning C4100: 'bottomRight' : unreferenced formal parameter - objecttab.cpp - outputsettings.cpp - paramtab.cpp - moc_texturetab.cpp - removebutton.cpp - 1>removebutton.cpp(1): fatal error C1083: Cannot open include file: 'removebutton.h': No such file or directory - shader.cpp - texture.cpp - texturetab.cpp - 1>texturetab.cpp(4): warning C4100: 'parent' : unreferenced formal parameter - Generating Code... - 1>Done Building Project "C:\Users\Anth\Documents\GitHub\CUGL\CUGL.vcxproj" (Build target(s)) -- FAILED. - -Build FAILED. - -Time Elapsed 00:00:51.37 diff --git a/x64/Release/CUGL.tlog/CL.read.1.tlog b/x64/Release/CUGL.tlog/CL.read.1.tlog deleted file mode 100644 index d03c784..0000000 Binary files a/x64/Release/CUGL.tlog/CL.read.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/CL.write.1.tlog b/x64/Release/CUGL.tlog/CL.write.1.tlog deleted file mode 100644 index 1fa19f8..0000000 Binary files a/x64/Release/CUGL.tlog/CL.write.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/CUGL.lastbuildstate b/x64/Release/CUGL.tlog/CUGL.lastbuildstate deleted file mode 100644 index 3c32cd8..0000000 --- a/x64/Release/CUGL.tlog/CUGL.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit -Release|x64|C:\Users\Anth\Documents\GitHub\CUGL\| diff --git a/x64/Release/CUGL.tlog/cl.command.1.tlog b/x64/Release/CUGL.tlog/cl.command.1.tlog deleted file mode 100644 index b1c233b..0000000 Binary files a/x64/Release/CUGL.tlog/cl.command.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/custombuild.command.1.tlog b/x64/Release/CUGL.tlog/custombuild.command.1.tlog deleted file mode 100644 index f0bd783..0000000 Binary files a/x64/Release/CUGL.tlog/custombuild.command.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/custombuild.read.1.tlog b/x64/Release/CUGL.tlog/custombuild.read.1.tlog deleted file mode 100644 index 72274e5..0000000 Binary files a/x64/Release/CUGL.tlog/custombuild.read.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/custombuild.write.1.tlog b/x64/Release/CUGL.tlog/custombuild.write.1.tlog deleted file mode 100644 index c9f7298..0000000 Binary files a/x64/Release/CUGL.tlog/custombuild.write.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/link.command.1.tlog b/x64/Release/CUGL.tlog/link.command.1.tlog deleted file mode 100644 index b21a39c..0000000 Binary files a/x64/Release/CUGL.tlog/link.command.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/link.read.1.tlog b/x64/Release/CUGL.tlog/link.read.1.tlog deleted file mode 100644 index 231283f..0000000 Binary files a/x64/Release/CUGL.tlog/link.read.1.tlog and /dev/null differ diff --git a/x64/Release/CUGL.tlog/link.write.1.tlog b/x64/Release/CUGL.tlog/link.write.1.tlog deleted file mode 100644 index e2419a7..0000000 Binary files a/x64/Release/CUGL.tlog/link.write.1.tlog and /dev/null differ diff --git a/x64/Release/colourtextbox.obj b/x64/Release/colourtextbox.obj deleted file mode 100644 index 9c22f43..0000000 Binary files a/x64/Release/colourtextbox.obj and /dev/null differ diff --git a/x64/Release/controltab.obj b/x64/Release/controltab.obj deleted file mode 100644 index 799be7b..0000000 Binary files a/x64/Release/controltab.obj and /dev/null differ diff --git a/x64/Release/cugeneraltab.obj b/x64/Release/cugeneraltab.obj deleted file mode 100644 index 265c6b2..0000000 Binary files a/x64/Release/cugeneraltab.obj and /dev/null differ diff --git a/x64/Release/cuglbuffer.obj b/x64/Release/cuglbuffer.obj deleted file mode 100644 index 50d2cd4..0000000 Binary files a/x64/Release/cuglbuffer.obj and /dev/null differ diff --git a/x64/Release/cusettings.obj b/x64/Release/cusettings.obj deleted file mode 100644 index 2a92d54..0000000 Binary files a/x64/Release/cusettings.obj and /dev/null differ diff --git a/x64/Release/glgeneraltab.obj b/x64/Release/glgeneraltab.obj deleted file mode 100644 index e4def6e..0000000 Binary files a/x64/Release/glgeneraltab.obj and /dev/null differ diff --git a/x64/Release/glsettings.obj b/x64/Release/glsettings.obj deleted file mode 100644 index 04c593e..0000000 Binary files a/x64/Release/glsettings.obj and /dev/null differ diff --git a/x64/Release/glwidget.obj b/x64/Release/glwidget.obj deleted file mode 100644 index ef92995..0000000 Binary files a/x64/Release/glwidget.obj and /dev/null differ diff --git a/x64/Release/main.obj b/x64/Release/main.obj deleted file mode 100644 index f0e517d..0000000 Binary files a/x64/Release/main.obj and /dev/null differ diff --git a/x64/Release/mainwindow.obj b/x64/Release/mainwindow.obj deleted file mode 100644 index 0e957ba..0000000 Binary files a/x64/Release/mainwindow.obj and /dev/null differ diff --git a/x64/Release/moc_controltab.obj b/x64/Release/moc_controltab.obj deleted file mode 100644 index 7da9c23..0000000 Binary files a/x64/Release/moc_controltab.obj and /dev/null differ diff --git a/x64/Release/moc_cugeneraltab.obj b/x64/Release/moc_cugeneraltab.obj deleted file mode 100644 index 67431cd..0000000 Binary files a/x64/Release/moc_cugeneraltab.obj and /dev/null differ diff --git a/x64/Release/moc_cusettings.obj b/x64/Release/moc_cusettings.obj deleted file mode 100644 index 195d3dc..0000000 Binary files a/x64/Release/moc_cusettings.obj and /dev/null differ diff --git a/x64/Release/moc_glgeneraltab.obj b/x64/Release/moc_glgeneraltab.obj deleted file mode 100644 index a923b9e..0000000 Binary files a/x64/Release/moc_glgeneraltab.obj and /dev/null differ diff --git a/x64/Release/moc_glsettings.obj b/x64/Release/moc_glsettings.obj deleted file mode 100644 index a84c839..0000000 Binary files a/x64/Release/moc_glsettings.obj and /dev/null differ diff --git a/x64/Release/moc_glwidget.obj b/x64/Release/moc_glwidget.obj deleted file mode 100644 index e3f62e4..0000000 Binary files a/x64/Release/moc_glwidget.obj and /dev/null differ diff --git a/x64/Release/moc_mainwindow.obj b/x64/Release/moc_mainwindow.obj deleted file mode 100644 index ebb49a3..0000000 Binary files a/x64/Release/moc_mainwindow.obj and /dev/null differ diff --git a/x64/Release/moc_objectpopup.obj b/x64/Release/moc_objectpopup.obj deleted file mode 100644 index c8529bb..0000000 Binary files a/x64/Release/moc_objectpopup.obj and /dev/null differ diff --git a/x64/Release/moc_objecttab.obj b/x64/Release/moc_objecttab.obj deleted file mode 100644 index 4277ed7..0000000 Binary files a/x64/Release/moc_objecttab.obj and /dev/null differ diff --git a/x64/Release/moc_outputsettings.obj b/x64/Release/moc_outputsettings.obj deleted file mode 100644 index 4b999bc..0000000 Binary files a/x64/Release/moc_outputsettings.obj and /dev/null differ diff --git a/x64/Release/moc_paramtab.obj b/x64/Release/moc_paramtab.obj deleted file mode 100644 index 79f90de..0000000 Binary files a/x64/Release/moc_paramtab.obj and /dev/null differ diff --git a/x64/Release/object.obj b/x64/Release/object.obj deleted file mode 100644 index ba426d3..0000000 Binary files a/x64/Release/object.obj and /dev/null differ diff --git a/x64/Release/objectpopup.obj b/x64/Release/objectpopup.obj deleted file mode 100644 index 9eae9e9..0000000 Binary files a/x64/Release/objectpopup.obj and /dev/null differ diff --git a/x64/Release/objecttab.obj b/x64/Release/objecttab.obj deleted file mode 100644 index a17ffb6..0000000 Binary files a/x64/Release/objecttab.obj and /dev/null differ diff --git a/x64/Release/outputsettings.obj b/x64/Release/outputsettings.obj deleted file mode 100644 index c5d7360..0000000 Binary files a/x64/Release/outputsettings.obj and /dev/null differ diff --git a/x64/Release/paramtab.obj b/x64/Release/paramtab.obj deleted file mode 100644 index b9e61d1..0000000 Binary files a/x64/Release/paramtab.obj and /dev/null differ diff --git a/x64/Release/shader.obj b/x64/Release/shader.obj deleted file mode 100644 index dfe8746..0000000 Binary files a/x64/Release/shader.obj and /dev/null differ