├── .editorconfig
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Kuplung.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── Kuplung
├── .clang-format
├── .editorconfig
├── CMakeLists.txt
├── CMakeLists_APPLE.cmake
├── CMakeLists_UNIX.cmake
├── CMakeLists_WIN32.cmake
├── Info.plist
├── Kuplung.pro
├── cmake
│ ├── FindGLM.cmake
│ ├── FindMinizip.cmake
│ ├── Findassimp.cmake
│ └── Findbenchmark.cmake
├── cppcheck.cmake
├── cppcheck_results.log
├── kuplung
│ ├── Kuplung.cpp
│ ├── Kuplung.hpp
│ ├── cuda
│ │ ├── CudaExamples.cpp
│ │ ├── CudaExamples.hpp
│ │ ├── cu
│ │ │ ├── cuda_OBJParser.cu
│ │ │ ├── cuda_oceanFFT_kernel.cu
│ │ │ └── cuda_vectorAddition.cu
│ │ └── examples
│ │ │ ├── VectorAddition.cpp
│ │ │ ├── VectorAddition.hpp
│ │ │ ├── oceanFFT.cpp
│ │ │ ├── oceanFFT.hpp
│ │ │ ├── oceanFFT0.cpp
│ │ │ └── oceanFFT0.hpp
│ ├── meshes
│ │ ├── artefacts
│ │ │ ├── Shadertoy.cpp
│ │ │ ├── Shadertoy.hpp
│ │ │ ├── Spaceship.cpp
│ │ │ ├── Spaceship.hpp
│ │ │ ├── StructuredVolumetricSampling.cpp
│ │ │ ├── StructuredVolumetricSampling.hpp
│ │ │ ├── Terrain.cpp
│ │ │ └── Terrain.hpp
│ │ ├── helpers
│ │ │ ├── AxisHelpers.cpp
│ │ │ ├── AxisHelpers.hpp
│ │ │ ├── AxisLabels.cpp
│ │ │ ├── AxisLabels.hpp
│ │ │ ├── BoundingBox.cpp
│ │ │ ├── BoundingBox.hpp
│ │ │ ├── Camera.cpp
│ │ │ ├── Camera.hpp
│ │ │ ├── CameraModel.cpp
│ │ │ ├── CameraModel.hpp
│ │ │ ├── Grid2D.cpp
│ │ │ ├── Grid2D.hpp
│ │ │ ├── Light.cpp
│ │ │ ├── Light.hpp
│ │ │ ├── LightRay.cpp
│ │ │ ├── LightRay.hpp
│ │ │ ├── MiniAxis.cpp
│ │ │ ├── MiniAxis.hpp
│ │ │ ├── RayLine.cpp
│ │ │ ├── RayLine.hpp
│ │ │ ├── Skybox.cpp
│ │ │ ├── Skybox.hpp
│ │ │ ├── VertexSphere.cpp
│ │ │ ├── VertexSphere.hpp
│ │ │ ├── WorldGrid.cpp
│ │ │ └── WorldGrid.hpp
│ │ └── scene
│ │ │ ├── ModelFaceBase.cpp
│ │ │ ├── ModelFaceBase.hpp
│ │ │ ├── ModelFaceData.cpp
│ │ │ └── ModelFaceData.hpp
│ ├── objects
│ │ ├── ObjectDefinitions.h
│ │ ├── Objects.h
│ │ ├── ObjectsManager.cpp
│ │ ├── ObjectsManager.hpp
│ │ ├── RayPicking.cpp
│ │ └── RayPicking.hpp
│ ├── pcg
│ │ ├── HeightmapGenerator.cpp
│ │ ├── HeightmapGenerator.hpp
│ │ ├── SpaceshipMeshGenerator.cpp
│ │ ├── SpaceshipMeshGenerator.hpp
│ │ ├── VoronoiGenerator.cpp
│ │ └── VoronoiGenerator.hpp
│ ├── rendering
│ │ ├── RenderingManager.cpp
│ │ ├── RenderingManager.hpp
│ │ └── methods
│ │ │ ├── RenderingDeferred.cpp
│ │ │ ├── RenderingDeferred.hpp
│ │ │ ├── RenderingForward.cpp
│ │ │ ├── RenderingForward.hpp
│ │ │ ├── RenderingForwardShadowMapping.cpp
│ │ │ ├── RenderingForwardShadowMapping.hpp
│ │ │ ├── RenderingShadowMapping.cpp
│ │ │ ├── RenderingShadowMapping.hpp
│ │ │ ├── RenderingSimple.cpp
│ │ │ └── RenderingSimple.hpp
│ ├── settings
│ │ ├── ConfigUtils.cpp
│ │ ├── ConfigUtils.hpp
│ │ ├── FontsList.cpp
│ │ ├── FontsList.hpp
│ │ ├── Settings.cpp
│ │ ├── Settings.h
│ │ └── SettingsStructs.h
│ ├── ui
│ │ ├── UIHelpers.cpp
│ │ ├── UIHelpers.hpp
│ │ ├── UIManager.cpp
│ │ ├── UIManager.hpp
│ │ ├── components
│ │ │ ├── ColorPicker.cpp
│ │ │ ├── ColorPicker.hpp
│ │ │ ├── FileBrowser.cpp
│ │ │ ├── FileBrowser.hpp
│ │ │ ├── FileSaver.cpp
│ │ │ ├── FileSaver.hpp
│ │ │ ├── ImageViewer.cpp
│ │ │ ├── ImageViewer.hpp
│ │ │ ├── Log.cpp
│ │ │ ├── Log.hpp
│ │ │ ├── RendererUI.cpp
│ │ │ ├── RendererUI.hpp
│ │ │ ├── Screenshot.cpp
│ │ │ ├── Screenshot.hpp
│ │ │ ├── ShaderEditor.cpp
│ │ │ ├── ShaderEditor.hpp
│ │ │ ├── Tabs.cpp
│ │ │ ├── Tabs.hpp
│ │ │ ├── exporters
│ │ │ │ ├── ExportFile.cpp
│ │ │ │ ├── ExportFile.hpp
│ │ │ │ ├── ExportGLTF.cpp
│ │ │ │ ├── ExportGLTF.hpp
│ │ │ │ ├── ExportOBJ.cpp
│ │ │ │ └── ExportOBJ.hpp
│ │ │ ├── ide
│ │ │ │ ├── KuplungIDE.cpp
│ │ │ │ └── KuplungIDE.hpp
│ │ │ ├── importers
│ │ │ │ ├── ImportFile.cpp
│ │ │ │ └── ImportFile.hpp
│ │ │ ├── materialeditor
│ │ │ │ ├── MELink.cpp
│ │ │ │ ├── MELink.hpp
│ │ │ │ ├── MENode.cpp
│ │ │ │ ├── MENode.hpp
│ │ │ │ ├── MENode_Color.cpp
│ │ │ │ ├── MENode_Color.hpp
│ │ │ │ ├── MENode_Combine.cpp
│ │ │ │ ├── MENode_Combine.hpp
│ │ │ │ ├── MENode_Texture.cpp
│ │ │ │ ├── MENode_Texture.hpp
│ │ │ │ ├── MaterialEditor.cpp
│ │ │ │ ├── MaterialEditor.hpp
│ │ │ │ └── MaterialEditorData.h
│ │ │ └── uveditor
│ │ │ │ ├── UVEditor.cpp
│ │ │ │ ├── UVEditor.hpp
│ │ │ │ ├── UVPoint.cpp
│ │ │ │ └── UVPoint.hpp
│ │ ├── dialogs
│ │ │ ├── DialogControlsGUI.cpp
│ │ │ ├── DialogControlsGUI.hpp
│ │ │ ├── DialogControlsModels.cpp
│ │ │ ├── DialogControlsModels.hpp
│ │ │ ├── DialogOptions.cpp
│ │ │ ├── DialogOptions.hpp
│ │ │ ├── DialogSVS.cpp
│ │ │ ├── DialogSVS.hpp
│ │ │ ├── DialogShadertoy.cpp
│ │ │ ├── DialogShadertoy.hpp
│ │ │ ├── DialogStyle.cpp
│ │ │ └── DialogStyle.hpp
│ │ └── iconfonts
│ │ │ ├── IconsFontAwesome.h
│ │ │ └── IconsMaterialDesign.h
│ └── utilities
│ │ ├── catch
│ │ └── catch.hpp
│ │ ├── consumption
│ │ ├── Consumption.cpp
│ │ ├── Consumption.hpp
│ │ ├── WindowsCPUUsage.cpp
│ │ └── WindowsCPUUsage.hpp
│ │ ├── cpp-base64
│ │ ├── base64.cpp
│ │ └── base64.h
│ │ ├── cuda
│ │ ├── CudaHelpers.cpp
│ │ └── CudaHelpers.hpp
│ │ ├── export
│ │ ├── Exporter.cpp
│ │ ├── Exporter.hpp
│ │ ├── ExporterAssimp.cpp
│ │ ├── ExporterAssimp.hpp
│ │ ├── ExporterGLTF.cpp
│ │ ├── ExporterGLTF.hpp
│ │ ├── ExporterOBJ.cpp
│ │ └── ExporterOBJ.hpp
│ │ ├── font-parser
│ │ ├── FNTParser.cpp
│ │ └── FNTParser.hpp
│ │ ├── gl
│ │ ├── GLIncludes.h
│ │ ├── GLUtils.cpp
│ │ └── GLUtils.hpp
│ │ ├── helpers
│ │ ├── DateTimes.h
│ │ ├── Files.h
│ │ ├── Helpers.h
│ │ └── Strings.h
│ │ ├── imgui
│ │ ├── ImGuiColorTextEdit
│ │ │ ├── TextEditor.cpp
│ │ │ └── TextEditor.h
│ │ ├── imconfig.h
│ │ ├── imgui.cpp
│ │ ├── imgui.h
│ │ ├── imgui_demo.cpp
│ │ ├── imgui_draw.cpp
│ │ ├── imgui_impl_opengl3.cpp
│ │ ├── imgui_impl_opengl3.h
│ │ ├── imgui_impl_sdl.cpp
│ │ ├── imgui_impl_sdl.h
│ │ ├── imgui_internal.h
│ │ ├── imgui_widgets.cpp
│ │ ├── imguizmo
│ │ │ ├── ImGuizmo.cpp
│ │ │ └── ImGuizmo.h
│ │ ├── imstb_rectpack.h
│ │ ├── imstb_textedit.h
│ │ └── imstb_truetype.h
│ │ ├── input
│ │ ├── Controls.cpp
│ │ └── Controls.hpp
│ │ ├── libnoise
│ │ ├── noiseutils.cpp
│ │ └── noiseutils.h
│ │ ├── lua
│ │ ├── LuaManager.cpp
│ │ └── LuaManager.hpp
│ │ ├── maths
│ │ ├── Maths.cpp
│ │ └── Maths.hpp
│ │ ├── measurement
│ │ ├── Timings.cpp
│ │ └── Timings.hpp
│ │ ├── miniz
│ │ ├── KuplungMiniz.cpp
│ │ ├── KuplungMiniz.hpp
│ │ ├── miniz.c
│ │ └── miniz.h
│ │ ├── minizip
│ │ ├── KuplungMinizip.cpp
│ │ └── KuplungMinizip.hpp
│ │ ├── nanovg
│ │ ├── fontstash.h
│ │ ├── nanovg.c
│ │ ├── nanovg.h
│ │ ├── nanovg_gl.h
│ │ └── nanovg_gl_utils.h
│ │ ├── oui
│ │ ├── blendish.h
│ │ └── oui.h
│ │ ├── parsers
│ │ ├── FileModelManager.cpp
│ │ ├── FileModelManager.hpp
│ │ ├── ModelObject.h
│ │ ├── ParserUtils.cpp
│ │ ├── ParserUtils.hpp
│ │ ├── assimp-parser
│ │ │ ├── AssimpParser.cpp
│ │ │ └── AssimpParser.hpp
│ │ ├── gltf-parser
│ │ │ ├── GLTFParser.cpp
│ │ │ └── GLTFParser.hpp
│ │ ├── obj-parser
│ │ │ ├── objParser1.cpp
│ │ │ ├── objParser1.hpp
│ │ │ ├── objParser2.cpp
│ │ │ ├── objParser2.hpp
│ │ │ ├── objParserCuda.cpp
│ │ │ └── objParserCuda.hpp
│ │ ├── ply-parser
│ │ │ ├── PLYParser.cpp
│ │ │ └── PLYParser.hpp
│ │ └── stl-parser
│ │ │ ├── STLParser.cpp
│ │ │ └── STLParser.hpp
│ │ ├── renderers
│ │ ├── ImageRenderer.cpp
│ │ ├── ImageRenderer.hpp
│ │ ├── KuplungRendererBase.cpp
│ │ ├── KuplungRendererBase.hpp
│ │ ├── default-forward
│ │ │ ├── DefaultForwardRenderer.cpp
│ │ │ └── DefaultForwardRenderer.hpp
│ │ ├── ray-tracer
│ │ │ ├── RayTracerRenderer.cpp
│ │ │ └── RayTracerRenderer.hpp
│ │ └── scene-renderer
│ │ │ ├── SceneRenderer.cpp
│ │ │ └── SceneRenderer.hpp
│ │ ├── saveopen
│ │ ├── KuplungAppScene.pb.cc
│ │ ├── KuplungAppScene.pb.h
│ │ ├── KuplungAppSettings.pb.cc
│ │ ├── KuplungAppSettings.pb.h
│ │ ├── KuplungDefinitions.pb.cc
│ │ ├── KuplungDefinitions.pb.h
│ │ ├── SaveOpen.cpp
│ │ ├── SaveOpen.hpp
│ │ ├── SaveOpenBinarySeq.cpp
│ │ ├── SaveOpenBinarySeq.hpp
│ │ ├── SaveOpenGProtocolBufs.cpp
│ │ └── SaveOpenGProtocolBufs.hpp
│ │ ├── shapes
│ │ └── Shapes.h
│ │ └── stb
│ │ ├── stb_image.h
│ │ ├── stb_image_write.h
│ │ ├── stb_rect_pack.h
│ │ ├── stb_textedit.h
│ │ └── stb_truetype.h
├── main.cpp
└── resources
│ ├── Images.xcassets
│ └── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── icon_128x128.png
│ │ ├── icon_128x128@2x.png
│ │ ├── icon_16x16.png
│ │ ├── icon_16x16@2x.png
│ │ ├── icon_256x256.png
│ │ ├── icon_256x256@2x.png
│ │ ├── icon_32x32.png
│ │ ├── icon_32x32@2x.png
│ │ ├── icon_512x512.png
│ │ └── icon_512x512@2x.png
│ ├── Kuplung.icns
│ ├── Kuplung.ico
│ ├── Kuplung_RecentFiles.ini
│ ├── Kuplung_RecentFilesImported.ini
│ ├── Kuplung_Settings.ini
│ ├── axis_helpers
│ ├── x_minus.mtl
│ ├── x_minus.obj
│ ├── x_plus.mtl
│ ├── x_plus.obj
│ ├── y_minus.mtl
│ ├── y_minus.obj
│ ├── y_plus.mtl
│ ├── y_plus.obj
│ ├── z_minus.mtl
│ ├── z_minus.obj
│ ├── z_plus.mtl
│ └── z_plus.obj
│ ├── fonts
│ ├── fontawesome-webfont.ttf
│ └── material-icons-regular.ttf
│ ├── gui
│ ├── camera.mtl
│ ├── camera.obj
│ ├── light_directional.mtl
│ ├── light_directional.obj
│ ├── light_point.mtl
│ ├── light_point.obj
│ ├── light_spot.mtl
│ └── light_spot.obj
│ ├── kuplung.rc
│ ├── lua
│ └── test.lua
│ ├── noise16.png
│ ├── protobuf
│ ├── KuplungAppScene.proto
│ ├── KuplungAppSettings.proto
│ └── KuplungDefinitions.proto
│ ├── shaders
│ ├── axis.frag
│ ├── axis.vert
│ ├── axis_helpers.frag
│ ├── axis_helpers.vert
│ ├── axis_labels.frag
│ ├── axis_labels.vert
│ ├── bounding_box.frag
│ ├── bounding_box.vert
│ ├── camera.frag
│ ├── camera.vert
│ ├── cuda
│ │ ├── oceanFFT.frag
│ │ └── oceanFFT.vert
│ ├── deferred_g_buffer.frag
│ ├── deferred_g_buffer.vert
│ ├── deferred_light_box.frag
│ ├── deferred_light_box.vert
│ ├── deferred_shading.frag
│ ├── deferred_shading.vert
│ ├── grid.frag
│ ├── grid.vert
│ ├── grid2d.frag
│ ├── grid2d.vert
│ ├── light.frag
│ ├── light.vert
│ ├── light_ray.frag
│ ├── light_ray.vert
│ ├── model_face.frag
│ ├── model_face.geom
│ ├── model_face.tcs
│ ├── model_face.tes
│ ├── model_face.vert
│ ├── model_face_effects.frag
│ ├── model_face_lights.frag
│ ├── model_face_mapping.frag
│ ├── model_face_misc.frag
│ ├── model_face_pbr.frag
│ ├── model_face_shadow_mapping.frag
│ ├── model_face_vars.frag
│ ├── ray_line.frag
│ ├── ray_line.vert
│ ├── reflection.frag
│ ├── reflection.vert
│ ├── rendering_simple.frag
│ ├── rendering_simple.geom
│ ├── rendering_simple.tcs
│ ├── rendering_simple.tes
│ ├── rendering_simple.vert
│ ├── shadertoy.vert
│ ├── shadow_mapping_depth.frag
│ ├── shadow_mapping_depth.vert
│ ├── shadows_debug_quad.vert
│ ├── shadows_debug_quad_depth.frag
│ ├── skybox.frag
│ ├── skybox.vert
│ ├── spaceship.frag
│ ├── spaceship.vert
│ ├── stoy
│ │ ├── 4ljGW1.stoy
│ │ ├── 4tlSzl.stoy
│ │ ├── Ms2SD1.stoy
│ │ ├── XlSSzK.stoy
│ │ └── XlfGRj.stoy
│ ├── structured_vol_sampling.frag
│ ├── structured_vol_sampling.vert
│ ├── terrain.frag
│ ├── terrain.vert
│ ├── vertex_sphere.frag
│ └── vertex_sphere.vert
│ ├── shadertoy
│ ├── LICENSE.txt
│ ├── cube00_0.jpg
│ ├── cube00_1.jpg
│ ├── cube00_2.jpg
│ ├── cube00_3.jpg
│ ├── cube00_4.jpg
│ ├── cube00_5.jpg
│ ├── cube01_0.png
│ ├── cube01_1.png
│ ├── cube01_2.png
│ ├── cube01_3.png
│ ├── cube01_4.png
│ ├── cube01_5.png
│ ├── cube02_0.jpg
│ ├── cube02_1.jpg
│ ├── cube02_2.jpg
│ ├── cube02_3.jpg
│ ├── cube02_4.jpg
│ ├── cube02_5.jpg
│ ├── cube03_0.png
│ ├── cube03_1.png
│ ├── cube03_2.png
│ ├── cube03_3.png
│ ├── cube03_4.png
│ ├── cube03_5.png
│ ├── cube04_0.png
│ ├── cube04_1.png
│ ├── cube04_2.png
│ ├── cube04_3.png
│ ├── cube04_4.png
│ ├── cube04_5.png
│ ├── cube05_0.png
│ ├── cube05_1.png
│ ├── cube05_2.png
│ ├── cube05_3.png
│ ├── cube05_4.png
│ ├── cube05_5.png
│ ├── tex00.jpg
│ ├── tex01.jpg
│ ├── tex02.jpg
│ ├── tex03.jpg
│ ├── tex04.jpg
│ ├── tex05.jpg
│ ├── tex06.jpg
│ ├── tex07.jpg
│ ├── tex08.jpg
│ ├── tex09.jpg
│ ├── tex10.png
│ ├── tex11.png
│ ├── tex12.png
│ ├── tex13.png
│ ├── tex14.png
│ ├── tex15.png
│ ├── tex16.png
│ ├── tex17.jpg
│ ├── tex18.jpg
│ ├── tex19.png
│ ├── tex20.jpg
│ └── webcamBig.png
│ ├── shapes
│ ├── MaterialBall.mtl
│ ├── MaterialBall.obj
│ ├── MaterialBallBlender.mtl
│ ├── MaterialBallBlender.obj
│ ├── brick_wall.mtl
│ ├── brick_wall.obj
│ ├── brick_wall_diffuse.png
│ ├── brick_wall_displacement.png
│ ├── brick_wall_normal.png
│ ├── brick_wall_occlusion.png
│ ├── brick_wall_spec.png
│ ├── cone.mtl
│ ├── cone.obj
│ ├── cube.mtl
│ ├── cube.obj
│ ├── cylinder.mtl
│ ├── cylinder.obj
│ ├── epcot.mtl
│ ├── epcot.obj
│ ├── grid.mtl
│ ├── grid.obj
│ ├── ico_sphere.mtl
│ ├── ico_sphere.obj
│ ├── monkey_head.mtl
│ ├── monkey_head.obj
│ ├── plane.mtl
│ ├── plane.obj
│ ├── plane_objects.mtl
│ ├── plane_objects.obj
│ ├── plane_objects_large.mtl
│ ├── plane_objects_large.obj
│ ├── torus.mtl
│ ├── torus.obj
│ ├── triangle.mtl
│ ├── triangle.obj
│ ├── tube.mtl
│ ├── tube.obj
│ ├── uv_sphere.mtl
│ └── uv_sphere.obj
│ └── skybox
│ ├── fire_planet_back.jpg
│ ├── fire_planet_bottom.jpg
│ ├── fire_planet_front.jpg
│ ├── fire_planet_left.jpg
│ ├── fire_planet_right.jpg
│ ├── fire_planet_top.jpg
│ ├── lake_mountain_back.jpg
│ ├── lake_mountain_bottom.jpg
│ ├── lake_mountain_front.jpg
│ ├── lake_mountain_left.jpg
│ ├── lake_mountain_right.jpg
│ ├── lake_mountain_top.jpg
│ ├── stormydays_back.jpg
│ ├── stormydays_bottom.jpg
│ ├── stormydays_front.jpg
│ ├── stormydays_left.jpg
│ ├── stormydays_right.jpg
│ └── stormydays_top.jpg
├── KuplungCuda.bash
├── KuplungCuda.make
├── LICENSE.md
├── MSVC
├── Kuplung.sln
├── Kuplung.vcxproj
└── Kuplung.vcxproj.filters
├── README.md
├── appveyor.yml
├── external
└── libnoise
│ ├── headers
│ ├── basictypes.h
│ ├── exception.h
│ ├── interp.h
│ ├── latlon.h
│ ├── mathconsts.h
│ ├── misc.h
│ ├── model
│ │ ├── cylinder.h
│ │ ├── line.h
│ │ ├── model.h
│ │ ├── plane.h
│ │ └── sphere.h
│ ├── module
│ │ ├── abs.h
│ │ ├── add.h
│ │ ├── billow.h
│ │ ├── blend.h
│ │ ├── cache.h
│ │ ├── checkerboard.h
│ │ ├── clamp.h
│ │ ├── const.h
│ │ ├── curve.h
│ │ ├── cylinders.h
│ │ ├── displace.h
│ │ ├── exponent.h
│ │ ├── invert.h
│ │ ├── max.h
│ │ ├── min.h
│ │ ├── module.h
│ │ ├── modulebase.h
│ │ ├── multiply.h
│ │ ├── perlin.h
│ │ ├── power.h
│ │ ├── ridgedmulti.h
│ │ ├── rotatepoint.h
│ │ ├── scalebias.h
│ │ ├── scalepoint.h
│ │ ├── select.h
│ │ ├── spheres.h
│ │ ├── terrace.h
│ │ ├── translatepoint.h
│ │ ├── turbulence.h
│ │ └── voronoi.h
│ ├── noise.h
│ ├── noisegen.h
│ └── vectortable.h
│ ├── lib
│ ├── libnoise.a
│ └── libnoise.lib
│ └── windows
│ ├── include
│ └── noise
│ │ ├── basictypes.h
│ │ ├── exception.h
│ │ ├── interp.h
│ │ ├── latlon.h
│ │ ├── mathconsts.h
│ │ ├── misc.h
│ │ ├── model
│ │ ├── cylinder.h
│ │ ├── line.h
│ │ ├── model.h
│ │ ├── plane.h
│ │ └── sphere.h
│ │ ├── module
│ │ ├── abs.h
│ │ ├── add.h
│ │ ├── billow.h
│ │ ├── blend.h
│ │ ├── cache.h
│ │ ├── checkerboard.h
│ │ ├── clamp.h
│ │ ├── const.h
│ │ ├── curve.h
│ │ ├── cylinders.h
│ │ ├── displace.h
│ │ ├── exponent.h
│ │ ├── invert.h
│ │ ├── max.h
│ │ ├── min.h
│ │ ├── module.h
│ │ ├── modulebase.h
│ │ ├── multiply.h
│ │ ├── perlin.h
│ │ ├── power.h
│ │ ├── ridgedmulti.h
│ │ ├── rotatepoint.h
│ │ ├── scalebias.h
│ │ ├── scalepoint.h
│ │ ├── select.h
│ │ ├── spheres.h
│ │ ├── terrace.h
│ │ ├── translatepoint.h
│ │ ├── turbulence.h
│ │ └── voronoi.h
│ │ ├── noise.h
│ │ ├── noisegen.h
│ │ └── vectortable.h
│ └── lib
│ └── noise.lib
├── lizard.txt
├── lizard_duplicates.txt
└── screenshots
├── screenshot.png
├── screenshot2.png
└── screenshot3.png
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | charset = utf-8
7 | indent_style = space
8 | indent_size = 2
9 | tab_width = 2
10 | trim_trailing_whitespace = true
11 |
12 | [*.txt]
13 | indent_style = space
14 | indent_size = 2
15 |
16 | [*.{diff,md}]
17 | trim_trailing_whitespace = false
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # C++ objects and libs
2 |
3 | *.slo
4 | *.lo
5 | *.o
6 | *.a
7 | *.la
8 | *.lai
9 | *.so
10 | *.dll
11 | *.dylib
12 |
13 |
14 | # Qt-es
15 |
16 | /.qmake.cache
17 | /.qmake.stash
18 | *.pro.user
19 | *.pro.user.*
20 | *.qbs.user
21 | *.qbs.user.*
22 | *.moc
23 | moc_*.cpp
24 | qrc_*.cpp
25 | ui_*.h
26 | Makefile*
27 | *build-*
28 |
29 | # QtCreator
30 |
31 | *.autosave
32 | imgui.ini
33 |
34 | #Cmake build
35 | cmake-build/
36 | build/
37 |
38 | #QtCtreator Qml
39 | *.qmlproject.user
40 | *.qmlproject.user.*
41 |
42 | # Visual Studio
43 | *.tlog
44 | VS2015/packages/*
45 | VS2015/Kuplung.VC.opendb
46 | VS2015/Kuplung.sdf
47 | *.sdf
48 | MSVC/resources/*
49 | MSVC/.vs/*
50 | MSVC/Kuplung.dir/*
51 | Kuplung.dir/*
52 | MSVC/Release/*
53 | Kuplung/CMakeFiles/*
54 | *.vcxproj.user
55 | *.aps
56 |
57 |
58 | # VSCode
59 | .vscode
60 |
61 | # Xcode
62 | .DS_Store
63 | */build/*
64 | *.pbxuser
65 | !default.pbxuser
66 | *.mode1v3
67 | !default.mode1v3
68 | *.mode2v3
69 | !default.mode2v3
70 | *.perspectivev3
71 | !default.perspectivev3
72 | xcuserdata
73 | profile
74 | *.moved-aside
75 | DerivedData
76 | .idea/
77 | *.hmap
78 | xcuserdata/*
79 |
80 | # protobuf generated files
81 | Kuplung/**/*.pb.h
82 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | env:
2 | global:
3 | - secure: "pxjms1QSZMRZHTdZKdLBhUaqMav/AV8WYRwLDRlywpMIT+13BCS6iII2WFyxK2Lx6si7jq6sRdd/HjtYl4eiXv9NkWLTZqW+1CfRm8Ns57F60+6zCHOby/2zTJgNt6d7uGtXc2dbud9+HWBnZVrZ4KyihFj9niTh3+sm7iSe5GmGL1gMN87JEheS3zZIEAIN1cBjn5LY7O2jcERH4lLuHrjv6fWuLXE06KhcZ1cSqn/1ebhS+LaGuMzBzD5CjYZ4DLN63IupNrOvLdNECW5bUrVZ3pvvt8phmyOiP5N7W2CeOSuycJowEkKt3u7Qrh5i87Uq4tvYbZarx2jN2w8PhUeY5JzZQGKX/wlXCmLJKrqk9JiF2rsDu4Re4E73AGcs/Wv50NLIsXd/tHHUWneC/WKF+wqce9lAltl87HB+ZNSnsvi2jvxxDJp8gc7D2ryWm5olAqW58nNYOlQeBDDg+jxVnGwBhY4Gd46iZAlthmvzewBupfjR7yajm5qfxlK9IPkIDwnWzuVZUoS2GUIqNTSMSb8lM0LDlwx/h4wIAyiKaQEVpIGUj8JJZ3TbN1WiF2eztc7/sXYpv3XdYX8To6sq8Jnk/bmUIeJSsNfzVm2lcw2nft+YeNM/DHpmcYqWCXc1GfA0Lle8NjThRd9wmwRvXgSuShFysldWaBBLQu8="
4 |
5 | language: cpp
6 | os: osx
7 | compiler:
8 | - clang
9 |
10 | before_install:
11 | - echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
12 | - brew update
13 | - brew install sdl2 glm minizip glfw3 assimp lua@5.3
14 | #- brew tap caskroom/drivers
15 |
16 | addons:
17 | coverity_scan:
18 | project:
19 | name: "supudo/Kuplung"
20 | description: "OpenGL Model Viewer"
21 | notification_email: supudo@gmail.com
22 | build_command_prepend: ""
23 | build_command: "mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ../Kuplung && cmake --build ./"
24 | branch_pattern: coverity_scan
25 |
26 | script:
27 | - mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ../Kuplung && cmake --build ./
28 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Kuplung
2 |
3 | First, thank you for even considering contributing.
4 |
5 | If you really want to contribute feel free to post an issue, do a pull request or drop me a line. Every piece of advise is highly appreciated.
6 | Of course every contributor will be added in the list.
7 |
--------------------------------------------------------------------------------
/Kuplung.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Kuplung/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | charset = utf-8
7 | indent_style = space
8 | indent_size = 2
9 | tab_width = 2
10 | trim_trailing_whitespace = true
11 |
12 | [*.txt]
13 | indent_style = space
14 | indent_size = 2
15 |
16 | [*.{diff,md}]
17 | trim_trailing_whitespace = false
18 |
--------------------------------------------------------------------------------
/Kuplung/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
2 |
3 | SET(PROJECT_NAME "Kuplung")
4 | PROJECT(${PROJECT_NAME})
5 |
6 | IF(CMAKE_BUILD_TYPE STREQUAL Debug)
7 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake-build/Debug")
8 | SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake-build/Debug")
9 | SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake-build/Debug")
10 | ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
11 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake-build/Release")
12 | SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake-build/Release")
13 | SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake-build/Release")
14 | ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
15 |
16 | IF(APPLE)
17 | INCLUDE(CMakeLists_APPLE.cmake)
18 | ELSEIF(WIN32)
19 | INCLUDE(CMakeLists_WIN32.cmake)
20 | ELSEIF(UNIX)
21 | INCLUDE(CMakeLists_UNIX.cmake)
22 | ENDIF(APPLE)
23 |
--------------------------------------------------------------------------------
/Kuplung/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | Kuplung
9 | CFBundleIdentifier
10 | net.supudo.apps.Kuplung
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | Kuplung
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSApplicationCategoryType
24 | public.app-category.developer-tools
25 | LSMinimumSystemVersion
26 | 10.11
27 | NSHumanReadableCopyright
28 | Copyright © 2015 supudo.net. All rights reserved.
29 | CFBundleIconFile
30 | Kuplung.icns
31 | NSHighResolutionCapable
32 | True
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Kuplung/cmake/FindMinizip.cmake:
--------------------------------------------------------------------------------
1 | # - Find minizip
2 | # Find the native MINIZIP includes and library
3 | #
4 | # MINIZIP_INCLUDE_DIR - where to find minizip.h, etc.
5 | # MINIZIP_LIBRARIES - List of libraries when using minizip.
6 | # MINIZIP_FOUND - True if minizip found.
7 |
8 |
9 | IF (MINIZIP_INCLUDE_DIR)
10 | # Already in cache, be silent
11 | SET(MINIZIP_FIND_QUIETLY TRUE)
12 | ENDIF (MINIZIP_INCLUDE_DIR)
13 |
14 | FIND_PATH(MINIZIP_INCLUDE_DIR zip.h PATH_SUFFIXES minizip)
15 |
16 | SET(MINIZIP_NAMES minizip)
17 | FIND_LIBRARY(MINIZIP_LIBRARY NAMES ${MINIZIP_NAMES})
18 |
19 | # handle the QUIETLY and REQUIRED arguments and set MINIZIP_FOUND to TRUE if
20 | # all listed variables are TRUE
21 | INCLUDE(FindPackageHandleStandardArgs)
22 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(MiniZip DEFAULT_MSG MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR)
23 |
24 | IF(MINIZIP_FOUND)
25 | SET(MINIZIP_LIBRARIES ${MINIZIP_LIBRARY})
26 | ELSE(MINIZIP_FOUND)
27 | SET(MINIZIP_LIBRARIES)
28 | ENDIF(MINIZIP_FOUND)
29 |
30 | MARK_AS_ADVANCED(MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR)
--------------------------------------------------------------------------------
/Kuplung/cmake/Findbenchmark.cmake:
--------------------------------------------------------------------------------
1 | # Findbenchmark.cmake
2 | # - Try to find benchmark
3 | #
4 | # The following variables are optionally searched for defaults
5 | # benchmark_ROOT_DIR: Base directory where all benchmark components are found
6 | #
7 | # Once done this will define
8 | # benchmark_FOUND - System has benchmark
9 | # benchmark_INCLUDE_DIRS - The benchmark include directories
10 | # benchmark_LIBRARIES - The libraries needed to use benchmark
11 |
12 | set(GBenchmark_ROOT_DIR "" CACHE PATH "Folder containing benchmark")
13 |
14 | find_path(GBenchmark_INCLUDE_DIR "benchmark/benchmark.h"
15 | PATHS ${benchmark_ROOT_DIR}
16 | PATH_SUFFIXES include
17 | NO_DEFAULT_PATH)
18 | find_path(GBenchmark_INCLUDE_DIR "benchmark/benchmark.h")
19 |
20 | find_library(GBenchmark_LIBRARY NAMES "benchmark"
21 | PATHS ${benchmark_ROOT_DIR}
22 | PATH_SUFFIXES lib lib64
23 | NO_DEFAULT_PATH)
24 | find_library(GBenchmark_LIBRARY NAMES "benchmark")
25 |
26 | include(FindPackageHandleStandardArgs)
27 | # handle the QUIETLY and REQUIRED arguments and set benchmark_FOUND to TRUE
28 | # if all listed variables are TRUE
29 | find_package_handle_standard_args(GBenchmark FOUND_VAR GBenchmark_FOUND
30 | REQUIRED_VARS GBenchmark_LIBRARY
31 | GBenchmark_INCLUDE_DIR)
32 |
33 | if(GBenchmark_FOUND)
34 | set(GBenchmark_LIBRARIES ${benchmark_LIBRARY})
35 | set(GBenchmark_INCLUDE_DIRS ${benchmark_INCLUDE_DIR})
36 | endif()
37 |
38 | mark_as_advanced(GBenchmark_INCLUDE_DIR GBenchmark_LIBRARY)
39 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/cuda/CudaExamples.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // CudaExamples.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/3/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef CudaExamples_hpp
10 | #define CudaExamples_hpp
11 |
12 | #ifdef DEF_KuplungSetting_UseCuda
13 |
14 | # include "kuplung/cuda/examples/VectorAddition.hpp"
15 | # include "kuplung/cuda/examples/oceanFFT.hpp"
16 | # include "kuplung/utilities/gl/GLIncludes.h"
17 | # include
18 | # include
19 | # include
20 | # include
21 | # include
22 |
23 | class CudaExamples {
24 | public:
25 | ~CudaExamples();
26 | void init();
27 | void draw(bool* p_opened, glm::mat4 matrixProjection, glm::mat4 matrixCamera, glm::mat4 matrixGrid);
28 | std::unique_ptr exampleOceanFFT;
29 |
30 | private:
31 | int selectedCudaExample;
32 | GLuint vboTexture;
33 | void renderExample(glm::mat4 matrixProjection, glm::mat4 matrixCamera, glm::mat4 matrixGrid);
34 | std::unique_ptr exampleVectorAddition;
35 | };
36 |
37 | #endif
38 |
39 | #endif /* CudaExamples_hpp */
40 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/cuda/cu/cuda_OBJParser.cu:
--------------------------------------------------------------------------------
1 | //
2 | // cuda_OBJParser.cu
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/3/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | extern "C"
14 | __global__ void cudaParseOBJFile(int* obj_data,
15 | float *vertices,
16 | float *textureCoordinates,
17 | float *normals,
18 | float *indices
19 | ) {
20 | const unsigned int tid = threadIdx.x;
21 | int data = obj_data[tid];
22 | }
23 |
24 | void parseOBJFile(const char* obj_file_contents,
25 | int obj_file_content_length,
26 | float *vertices,
27 | float *textureCoordinates,
28 | float *normals,
29 | float *indices
30 | ) {
31 | float *cuda_vertices, *cuda_textureCoordinates, *cuda_normals, *cuda_indices;
32 | const unsigned int num_threads = obj_file_content_length / 4;
33 | const unsigned int mem_size = sizeof(char) * obj_file_content_length;
34 |
35 | char *d_data;
36 | cudaMalloc((void **) &d_data, mem_size);
37 | cudaMemcpy(d_data, obj_file_contents, mem_size, cudaMemcpyHostToDevice);
38 |
39 | dim3 grid(1, 1, 1);
40 | dim3 threads(num_threads, 1, 1);
41 | // execute the kernel
42 | cudaParseOBJFile<<< grid, threads >>>((int *) d_data, vertices, textureCoordinates, normals, indices);
43 |
44 | cudaFree(d_data);
45 | cudaFree(cuda_vertices);
46 | cudaFree(cuda_textureCoordinates);
47 | cudaFree(cuda_normals);
48 | cudaFree(cuda_indices);
49 | }
50 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/cuda/cu/cuda_vectorAddition.cu:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | extern "C"
5 | __global__ void vectorAdditionCUDA(const float* a, const float* b, float* c, int n)
6 | {
7 | int ii = blockDim.x * blockIdx.x + threadIdx.x;
8 | if (ii < n)
9 | c[ii] = a[ii] + b[ii];
10 | }
11 |
12 | void vectorAddition(const float* a, const float* b, float* c, int n) {
13 | float *a_cuda, *b_cuda, *c_cuda;
14 | unsigned int nBytes = sizeof(float) * n;
15 | int threadsPerBlock = 256;
16 | int blocksPerGrid = (n + threadsPerBlock - 1) / threadsPerBlock;
17 |
18 | // allocate and copy memory into the device
19 | cudaMalloc((void **)& a_cuda, nBytes);
20 | cudaMalloc((void **)& b_cuda, nBytes);
21 | cudaMalloc((void **)& c_cuda, nBytes);
22 | cudaMemcpy(a_cuda, a, nBytes, cudaMemcpyHostToDevice);
23 | cudaMemcpy(b_cuda, b, nBytes, cudaMemcpyHostToDevice);
24 |
25 | vectorAdditionCUDA<<>>(a_cuda, b_cuda, c_cuda, n);
26 |
27 | // load the answer back into the host
28 | cudaMemcpy(c, c_cuda, nBytes, cudaMemcpyDeviceToHost);
29 |
30 | cudaFree(a_cuda);
31 | cudaFree(b_cuda);
32 | cudaFree(c_cuda);
33 | }
34 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/cuda/examples/VectorAddition.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // VectorAddition.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/3/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifdef DEF_KuplungSetting_UseCuda
10 |
11 | #ifndef VectorAddition_hpp
12 | #define VectorAddition_hpp
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | class VectorAddition {
20 | public:
21 | ~VectorAddition();
22 | void init();
23 | void doVectorAddition();
24 |
25 | private:
26 | std::string printArray(const float* a, const unsigned int n);
27 | };
28 |
29 | #endif /* VectorAddition_hpp */
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/artefacts/Spaceship.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // Spaceship.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/22/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef Spaceship_hpp
10 | #define Spaceship_hpp
11 |
12 | #include
13 | #include "kuplung/settings/Settings.h"
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/pcg/SpaceshipMeshGenerator.hpp"
16 | #include "kuplung/objects/Objects.h"
17 | #include "kuplung/meshes/helpers/Light.hpp"
18 |
19 | class Spaceship {
20 | public:
21 | ~Spaceship();
22 | Spaceship();
23 | bool initShaderProgram();
24 | void initBuffers(const int gridSize);
25 | void render(const glm::mat4& matrixProjection, const glm::mat4& matrixCamera, const glm::mat4& matrixModel, const glm::vec3& vecCameraPosition);
26 | std::unique_ptr spaceshipGenerator;
27 |
28 | float solidLightSkin_Ambient_Strength, solidLightSkin_Diffuse_Strength, solidLightSkin_Specular_Strength;
29 | bool Setting_UseTexture, Setting_Wireframe;
30 | glm::vec3 lightDirection;
31 | glm::vec3 solidLightSkin_MaterialColor, solidLightSkin_Ambient, solidLightSkin_Diffuse, solidLightSkin_Specular;
32 |
33 | private:
34 | GLuint shaderProgram;
35 | GLuint shaderVertex, shaderFragment;
36 | GLuint glVAO;
37 | GLuint vboVertices, vboTextureCoordinates, vboTextureDiffuse, vboNormals, vboColors, vboIndices;
38 | GLuint glUniformMVPMatrix, glUniformMMatrix, glAttributeVertexPosition, glAttributeVertexNormal;
39 | GLuint glAttributeColor, glFS_CameraPosition;
40 | GLint glAttributeTextureCoord, glUniformHasTexture, glUniformSamplerTexture;
41 |
42 | std::unique_ptr solidLight;
43 | };
44 |
45 | #endif /* Spaceship_hpp */
46 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/artefacts/StructuredVolumetricSampling.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // StructuredVolumetricSampling.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/22/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef StructuredVolumetricSampling_hpp
10 | #define StructuredVolumetricSampling_hpp
11 |
12 | #include
13 | #include "kuplung/settings/Settings.h"
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 |
16 | class StructuredVolumetricSampling {
17 | public:
18 | ~StructuredVolumetricSampling();
19 | StructuredVolumetricSampling();
20 | bool initShaderProgram();
21 | void initBuffers();
22 | void initNoiseTexture();
23 | void initFBO(const int windowWidth, const int windowHeight, GLuint* vboTexture);
24 | void render(const int mouseX, const int mouseY, const float seconds);
25 | void renderToTexture(const int mouseX, const int mouseY, const float seconds, GLuint* vboTexture);
26 |
27 | private:
28 | GLuint shaderProgram, shaderVertex, shaderFragment;
29 | GLuint glVAO, vboVertices, vboTextureNoise;
30 | GLuint glVS_screenResolution;
31 | GLuint glAttributeVertexPosition, glFS_deltaRunningTime, glFS_noiseTextureSampler, glFS_screenResolution, glFS_mouseCoordinates;
32 |
33 | void bindFBO();
34 | void unbindFBO(GLuint* vboTexture);
35 | GLuint tFBO, tRBO;
36 | };
37 |
38 | #endif /* StructuredVolumetricSampling_hpp */
39 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/artefacts/Terrain.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // Terrain.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/22/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef Terrain_hpp
10 | #define Terrain_hpp
11 |
12 | #include
13 | #include "kuplung/utilities/gl/GLIncludes.h"
14 | #include "kuplung/settings/Settings.h"
15 | #include "kuplung/pcg/HeightmapGenerator.hpp"
16 |
17 | class Terrain {
18 | public:
19 | ~Terrain();
20 | Terrain();
21 | bool initShaderProgram();
22 | void initBuffers(std::string const& assetsFolder, const int width, const int height);
23 | void render(const glm::mat4& matrixProjection, const glm::mat4& matrixCamera, const glm::mat4& matrixModel);
24 | std::string heightmapImage;
25 | std::unique_ptr terrainGenerator;
26 |
27 | bool Setting_UseTexture, Setting_Wireframe;
28 |
29 | private:
30 | GLuint shaderProgram;
31 | GLuint shaderVertex, shaderFragment;
32 | GLuint glVAO;
33 | GLuint vboVertices, vboTextureCoordinates, vboTextureDiffuse, vboNormals, vboColors, vboIndices;
34 | GLuint glUniformMVPMatrix, glAttributeVertexPosition, glAttributeVertexNormal, glAttributeColor;
35 | GLint glAttributeTextureCoord, glUniformHasTexture, glUniformSamplerTexture;
36 | };
37 |
38 | #endif /* Terrain_hpp */
39 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/AxisHelpers.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // AxisHelpers.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/14/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef AxisHelpers_hpp
10 | #define AxisHelpers_hpp
11 |
12 | #include
13 | #include
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/utilities/parsers/ModelObject.h"
16 | #include "kuplung/objects/ObjectDefinitions.h"
17 | #include "kuplung/meshes/helpers/Camera.hpp"
18 |
19 | class AxisHelpers {
20 | public:
21 | ~AxisHelpers();
22 | AxisHelpers();
23 | void setModel(const MeshModel& meshModel);
24 | void initProperties();
25 | const bool initShaderProgram();
26 | void initBuffers();
27 | void render(const glm::mat4& mtxProjection, const glm::mat4& mtxCamera, const glm::vec3& position);
28 | MeshModel meshModel;
29 |
30 | private:
31 | GLuint shaderProgram;
32 | GLuint shaderVertex, shaderFragment;
33 | GLuint glVAO;
34 | GLuint vboVertices, vboIndices;
35 | GLint glUniformMVPMatrix, glUniformColor;
36 | };
37 |
38 | #endif /* AxisHelpers_hpp */
39 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/AxisLabels.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // AxisLabels.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/14/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef AxisLabels_hpp
10 | #define AxisLabels_hpp
11 |
12 | #include
13 | #include "kuplung/utilities/gl/GLIncludes.h"
14 | #include "kuplung/utilities/parsers/ModelObject.h"
15 | #include "kuplung/objects/ObjectDefinitions.h"
16 | #include "kuplung/meshes/helpers/Camera.hpp"
17 |
18 | class AxisLabels {
19 | public:
20 | ~AxisLabels();
21 | AxisLabels();
22 | void setModels(const MeshModel& meshModel_PosX, const MeshModel& meshModel_NegX, const MeshModel& meshModel_PosY,
23 | const MeshModel& meshModel_NegY, const MeshModel& meshModel_PosZ, const MeshModel& meshModel_NegZ,
24 | int position);
25 | void initProperties();
26 | const bool initShaderProgram();
27 | void initBuffers();
28 | void render(const glm::mat4& mtxProjection, const glm::mat4& mtxCamera, int position);
29 | MeshModel meshModel_PosX, meshModel_NegX, meshModel_PosY, meshModel_NegY, meshModel_PosZ, meshModel_NegZ;
30 |
31 | private:
32 | GLuint shaderProgram;
33 | GLuint shaderVertex, shaderFragment;
34 | GLuint glVAO_PosX, glVAO_NegX, glVAO_PosY, glVAO_NegY, glVAO_PosZ, glVAO_NegZ;
35 | GLuint vboVertices_PosX, vboColors_PosX, vboIndices_PosX;
36 | GLuint vboVertices_NegX, vboColors_NegX, vboIndices_NegX;
37 | GLuint vboVertices_PosY, vboColors_PosY, vboIndices_PosY;
38 | GLuint vboVertices_NegY, vboColors_NegY, vboIndices_NegY;
39 | GLuint vboVertices_PosZ, vboColors_PosZ, vboIndices_PosZ;
40 | GLuint vboVertices_NegZ, vboColors_NegZ, vboIndices_NegZ;
41 | GLint glUniformMVPMatrix;
42 |
43 | int ahPosition;
44 | };
45 |
46 | #endif /* AxisLabels_hpp */
47 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/BoundingBox.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // BoundingBox.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/2/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef BoundingBox_hpp
10 | #define BoundingBox_hpp
11 |
12 | #include "kuplung/objects/ObjectDefinitions.h"
13 | #include "kuplung/settings/Settings.h"
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/utilities/parsers/ModelObject.h"
16 | #include
17 |
18 | class BoundingBox {
19 | public:
20 | ~BoundingBox();
21 | BoundingBox() noexcept;
22 | const bool initShaderProgram();
23 | void initBuffers(const MeshModel& meshModel);
24 | void render(const glm::mat4& matrixMVP, const glm::vec4& outlineColor);
25 | MeshModel meshModel;
26 |
27 | glm::mat4 matrixTransform;
28 |
29 | GLfloat min_x, max_x, min_y, max_y, min_z, max_z;
30 | glm::vec3 size, center;
31 |
32 | private:
33 | std::vector dataVertices;
34 | std::vector dataIndices;
35 |
36 | GLuint shaderProgram;
37 | GLuint shaderVertex, shaderFragment;
38 | GLuint glVAO;
39 | GLuint vboVertices, vboIndices;
40 |
41 | GLint glUniformMVPMatrix, glUniformColor;
42 | };
43 |
44 | #endif /* BoundingBox_hpp */
45 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/Camera.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // Camera.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/3/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef Camera_hpp
10 | #define Camera_hpp
11 |
12 | #include
13 | #include
14 | #include "kuplung/settings/Settings.h"
15 | #include "kuplung/objects/ObjectDefinitions.h"
16 |
17 | class Camera {
18 | public:
19 | ~Camera();
20 | Camera();
21 | void initProperties();
22 | void render();
23 | const glm::vec3 createRay(const float mouse_x, const float mouse_y, const float fov, const float ratio, const float pNear, const float pFar);
24 | const PixelDataPoint getClickData(const int x, const int y, const int height) const;
25 |
26 | std::unique_ptr eyeSettings;
27 | std::unique_ptr positionX, positionY, positionZ;
28 | std::unique_ptr rotateX, rotateY, rotateZ;
29 | std::unique_ptr rotateCenterX, rotateCenterY, rotateCenterZ;
30 |
31 | glm::vec3 cameraPosition;
32 | glm::mat4 matrixCamera;
33 | };
34 |
35 | #endif /* Camera_hpp */
36 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/CameraModel.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // CameraModel.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/3/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef CameraModel_hpp
10 | #define CameraModel_hpp
11 |
12 | #include
13 | #include
14 | #include "kuplung/settings/Settings.h"
15 | #include "kuplung/objects/ObjectDefinitions.h"
16 | #include "kuplung/utilities/gl/GLIncludes.h"
17 | #include "kuplung/utilities/parsers/ModelObject.h"
18 |
19 | class CameraModel {
20 | public:
21 | ~CameraModel();
22 | CameraModel();
23 | void setModel(MeshModel const& meshModel);
24 | void initProperties();
25 | const bool initShaderProgram();
26 | void initBuffers();
27 | void render(const glm::mat4& mtxProjection, const glm::mat4& mtxCamera, const glm::mat4& mtxGrid, const bool& fixedGridWorld);
28 | MeshModel meshModel;
29 |
30 | std::unique_ptr positionX, positionY, positionZ;
31 | std::unique_ptr rotateX, rotateY, rotateZ;
32 | std::unique_ptr rotateCenterX, rotateCenterY, rotateCenterZ;
33 | std::unique_ptr innerLightDirectionX, innerLightDirectionY, innerLightDirectionZ;
34 | std::unique_ptr colorR, colorG, colorB;
35 | bool showCameraObject, showInWire;
36 |
37 | glm::mat4 matrixModel;
38 |
39 | private:
40 | GLuint shaderProgram;
41 | GLuint shaderVertex, shaderFragment;
42 | GLuint glVAO;
43 | GLuint vboVertices, vboNormals, vboIndices;
44 | GLint glUniformMVPMatrix, glUniformInnerLightDirection, glUniformColor;
45 | };
46 |
47 | #endif /* CameraModel_hpp */
48 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/LightRay.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // LightRay.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/17/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef LightRay_hpp
10 | #define LightRay_hpp
11 |
12 | #include
13 | #include
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/utilities/parsers/ModelObject.h"
16 | #include "kuplung/settings/Settings.h"
17 |
18 | class LightRay {
19 | public:
20 | LightRay();
21 | ~LightRay();
22 | const bool initShaderProgram();
23 | void initBuffers(const glm::vec3& position, const glm::vec3& direction, const bool simple);
24 | void render(const glm::mat4& matrixProjection, const glm::mat4& matrixCamera, const glm::mat4& matrixModel);
25 |
26 | private:
27 | short int axisSize;
28 | float x, y, z;
29 |
30 | GLuint shaderProgram;
31 | GLuint shaderVertex, shaderFragment;
32 | GLuint glVAO, vboVertices, vboIndices;
33 | GLint glUniformMVPMatrix;
34 | };
35 |
36 | #endif /* LightRay_hpp */
37 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/MiniAxis.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // MiniAxis.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/14/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef MiniAxis_hpp
10 | #define MiniAxis_hpp
11 |
12 | #include
13 | #include "kuplung/settings/Settings.h"
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/utilities/parsers/ModelObject.h"
16 | #include "kuplung/objects/ObjectDefinitions.h"
17 |
18 | class MiniAxis {
19 | public:
20 | ~MiniAxis();
21 | MiniAxis();
22 | void initProperties();
23 | const bool initShaderProgram();
24 | void initBuffers(); // 0 = x, 1 = y, 2 = z
25 | void render(const glm::mat4& matrixProjection, const glm::mat4& matrixCamera);
26 |
27 | bool showAxis;
28 | std::unique_ptr rotateX, rotateY, rotateZ;
29 | glm::mat4 matrixModel;
30 |
31 | private:
32 | int axisSize;
33 |
34 | GLuint shaderProgram;
35 | GLuint shaderVertex, shaderFragment;
36 | GLuint glVAO, vboVertices, vboColors;
37 | GLint glUniformMVPMatrix;
38 | };
39 |
40 | #endif /* MiniAxis_hpp */
41 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/RayLine.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // RayLine.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/5/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef RayLine_hpp
10 | #define RayLine_hpp
11 |
12 | #include
13 | #include "kuplung/settings/Settings.h"
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/objects/ObjectDefinitions.h"
16 | #ifdef WIN32
17 | //#include
18 | //#include
19 | typedef unsigned int uint;
20 | #endif
21 |
22 | class RayLine {
23 | public:
24 | ~RayLine();
25 | void init();
26 | const bool initShaderProgram();
27 | void initBuffers(const glm::vec3& vecFrom, const glm::vec3& vecTo);
28 | void initProperties();
29 | void render(const glm::mat4& matrixProjection, const glm::mat4& matrixCamera);
30 |
31 | glm::mat4 matrixModel;
32 |
33 | private:
34 | GLuint shaderProgram;
35 | GLuint shaderVertex, shaderFragment;
36 | GLuint glVAO, vboVertices, vboColors, vboIndices;
37 | GLint glUniformMVPMatrix, glUniformColor;
38 |
39 | std::vector dataVertices, dataColors;
40 | std::vector dataIndices;
41 | };
42 |
43 | #endif /* RayLine_hpp */
44 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/Skybox.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // Skybox.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/2/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef Skybox_hpp
10 | #define Skybox_hpp
11 |
12 | #include
13 | #include
14 | #include "kuplung/utilities/gl/GLIncludes.h"
15 | #include "kuplung/settings/Settings.h"
16 | #include "kuplung/objects/ObjectDefinitions.h"
17 |
18 | class Skybox {
19 | public:
20 | Skybox();
21 | ~Skybox();
22 | void init(const short int& gridSize);
23 | const bool initBuffers();
24 | void render(const glm::mat4& matrixView, const float& plane_close, const float& plane_far, const float& fov);
25 |
26 | std::vector skyboxItems;
27 | int Setting_Skybox_Item;
28 |
29 | private:
30 | short int gridSize;
31 |
32 | GLuint shaderProgram, shaderVertex, shaderFragment;
33 | GLuint glVAO, vboVertices, vboTexture;
34 | GLint glVS_MatrixView, glVS_MatrixProjection;
35 | };
36 |
37 | #endif /* ModelFace_hpp */
38 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/helpers/VertexSphere.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // VertexSphere.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/2/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef VertexSphere_hpp
10 | #define VertexSphere_hpp
11 |
12 | #include
13 | #include "kuplung/utilities/gl/GLIncludes.h"
14 | #include "kuplung/utilities/parsers/ModelObject.h"
15 | #include "kuplung/objects/ObjectDefinitions.h"
16 | #include "kuplung/settings/Settings.h"
17 |
18 | class VertexSphere {
19 | public:
20 | VertexSphere();
21 | ~VertexSphere();
22 | const bool initShaderProgram();
23 | void initBuffers(MeshModel const& meshModel, const int& circleSegments, const float& radius);
24 | void render(const glm::mat4& matrixMVP, const glm::vec4& color);
25 |
26 | bool isSphere;
27 | bool showWireframes;
28 | unsigned short int circleSegments;
29 | std::vector dataVertices;
30 | std::vector dataNormals;
31 | std::vector dataIndices;
32 |
33 | private:
34 | GLuint shaderProgram;
35 | GLuint shaderVertex, shaderFragment;
36 | GLuint glVAO;
37 | GLuint vboVertices, vboNormals, vboIndices;
38 |
39 | GLint glUniformMVPMatrix, glUniformInnerLightDirection, glUniformColor;
40 | };
41 |
42 | #endif /* VertexSphere_hpp */
43 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/meshes/scene/ModelFaceData.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // ModelFaceData.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/2/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef ModelFaceData_hpp
10 | #define ModelFaceData_hpp
11 |
12 | #include "kuplung/meshes/scene/ModelFaceBase.hpp"
13 |
14 | class ModelFaceData: public ModelFaceBase {
15 | public:
16 | ~ModelFaceData();
17 | void init(MeshModel const& model, std::string const& assetsFolder) override;
18 | void initBuffers() override;
19 | void renderModel(const bool useTessellation);
20 |
21 | bool vertexSphereVisible, vertexSphereIsSphere, vertexSphereShowWireframes;
22 | float vertexSphereRadius;
23 | int vertexSphereSegments;
24 | glm::vec4 vertexSphereColor;
25 | GLuint glVAO;
26 | GLuint vboTextureAmbient, vboTextureDiffuse, vboTextureSpecular, vboTextureSpecularExp, vboTextureDissolve, vboTextureBump, vboTextureDisplacement;
27 | GLuint occQuery;
28 |
29 | glm::mat4 matrixGrid;
30 |
31 | private:
32 | GLuint vboVertices, vboNormals, vboTextureCoordinates, vboIndices, vboTangents, vboBitangents;
33 | };
34 |
35 | #endif /* ModelFaceData_hpp */
36 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/pcg/SpaceshipMeshGenerator.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // SpaceshipMeshGenerator.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/21/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef SpaceshipMeshGenerator_hpp
10 | #define SpaceshipMeshGenerator_hpp
11 |
12 | #include
13 | #include "kuplung/settings/Settings.h"
14 | #include "kuplung/utilities/parsers/ModelObject.h"
15 | #include "kuplung/utilities/parsers/FileModelManager.hpp"
16 |
17 | class SpaceshipMeshGenerator {
18 | public:
19 | void generate(const int& gridSize);
20 |
21 | std::vector vertices, normals, colors;
22 | std::vector uvs;
23 | std::vector indices;
24 |
25 | MeshModel modelSpaceship;
26 |
27 | private:
28 | int gridSize;
29 |
30 | std::unique_ptr fileParser;
31 |
32 | void generateMeshModel();
33 | void generateFirstHull();
34 | void generateFirstHull2();
35 | void generateFirstHull3();
36 | int getRandomValue(const float& valueMin, const float& valueMax, bool zeroIsValid = true);
37 |
38 | void extrudeMesh();
39 | };
40 |
41 | #endif /* SpaceshipMeshGenerator_hpp */
42 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/pcg/VoronoiGenerator.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // VoronoiGenerator.cpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/21/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #include "VoronoiGenerator.hpp"
10 |
11 | VoronoiGenerator::~VoronoiGenerator() {
12 | }
13 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/pcg/VoronoiGenerator.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // VoronoiGenerator.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/21/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef VoronoiGenerator_hpp
10 | #define VoronoiGenerator_hpp
11 |
12 | #include "kuplung/settings/Settings.h"
13 |
14 | class VoronoiGenerator {
15 | public:
16 | ~VoronoiGenerator();
17 |
18 | private:
19 | };
20 |
21 | #endif /* VoronoiGenerator_hpp */
22 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/rendering/RenderingManager.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // RenderingManager.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/2/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef RenderingManager_hpp
10 | #define RenderingManager_hpp
11 |
12 | #include "kuplung/rendering/methods/RenderingSimple.hpp"
13 | #include "kuplung/rendering/methods/RenderingForward.hpp"
14 | #include "kuplung/rendering/methods/RenderingForwardShadowMapping.hpp"
15 | #include "kuplung/rendering/methods/RenderingShadowMapping.hpp"
16 | #include "kuplung/rendering/methods/RenderingDeferred.hpp"
17 | #include "kuplung/meshes/scene/ModelFaceData.hpp"
18 | #include "kuplung/objects/ObjectsManager.hpp"
19 | #include "kuplung/settings/SettingsStructs.h"
20 |
21 | class RenderingManager {
22 | public:
23 | explicit RenderingManager(ObjectsManager &managerObjects);
24 | ~RenderingManager();
25 | void init();
26 | void render(const int& selectedModel);
27 |
28 | int RenderingTotalVertices;
29 | int RenderingTotalIndices;
30 | int RenderingTotalTriangles;
31 | int RenderingTotalFaces;
32 |
33 | std::vector meshModelFaces;
34 |
35 | private:
36 | ObjectsManager &managerObjects;
37 |
38 | std::unique_ptr rendererSimple;
39 | std::unique_ptr rendererForward;
40 | std::unique_ptr rendererForwardShadowMapping;
41 | std::unique_ptr rendererShadowMapping;
42 | std::unique_ptr rendererDeferred;
43 | };
44 |
45 | #endif /* RenderingManager_hpp */
46 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/rendering/methods/RenderingSimple.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // RenderingSimple.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/2/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef RenderingSimple_hpp
10 | #define RenderingSimple_hpp
11 |
12 | #include "kuplung/meshes/scene/ModelFaceData.hpp"
13 | #include "kuplung/objects/ObjectsManager.hpp"
14 |
15 | class RenderingSimple {
16 | public:
17 | explicit RenderingSimple(ObjectsManager &managerObjects);
18 | explicit RenderingSimple(std::unique_ptr &managerObjects);
19 | ~RenderingSimple();
20 |
21 | bool init();
22 | void render(const std::vector& meshModelFaces, const int& selectedModel);
23 |
24 | private:
25 | ObjectsManager &managerObjects;
26 |
27 | glm::mat4 matrixProjection, matrixCamera;
28 | glm::vec3 vecCameraPosition, uiAmbientLight;
29 |
30 | GLuint shaderProgram;
31 | GLint glVS_MVPMatrix, glVS_WorldMatrix, glFS_SamplerTexture, glFS_HasSamplerTexture;
32 | GLint glFS_CameraPosition, glFS_UIAmbient;
33 | std::unique_ptr solidLight;
34 | };
35 |
36 | #endif /* RenderingSimple_hpp */
37 |
--------------------------------------------------------------------------------
/Kuplung/kuplung/settings/ConfigUtils.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // ConfigUtils.hpp
3 | // Kuplung
4 | //
5 | // Created by Sergey Petrov on 12/4/15.
6 | // Copyright © 2015 supudo.net. All rights reserved.
7 | //
8 |
9 | #ifndef ConfigUtils_hpp
10 | #define ConfigUtils_hpp
11 |
12 | #include "SettingsStructs.h"
13 | #include