From 43851899c7673f04f28edc650fe806e4f5964e36 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 13 Feb 2020 14:59:13 +0100 Subject: [PATCH] Cleanup of more copyright headers Add debug groups and object names to the OpenGL objects in the framebuffer renderer --- LICENSE.md | 2 +- .../shaders/renderabletrail_apple_fs.glsl | 2 +- .../shaders/renderabletrail_apple_vs.glsl | 2 +- modules/cefwebgui/shaders/gui_fs.glsl | 2 +- modules/cefwebgui/shaders/gui_vs.glsl | 2 +- modules/galaxy/shaders/galaxyraycast.glsl | 2 +- .../globebrowsing/shaders/smviewer_fs.glsl | 2 +- .../globebrowsing/shaders/smviewer_vs.glsl | 2 +- modules/iswa/shaders/datasphere_fs.glsl | 2 +- modules/iswa/shaders/datasphere_vs.glsl | 2 +- modules/multiresvolume/shaders/boundsFs.glsl | 2 +- modules/multiresvolume/shaders/boundsVs.glsl | 2 +- modules/multiresvolume/shaders/helper.glsl | 2 +- modules/multiresvolume/shaders/raycast.glsl | 2 +- modules/space/shaders/convolution_fs.glsl | 2 +- modules/space/shaders/convolution_vs.glsl | 2 +- modules/space/shaders/debrisViz_fs.glsl | 2 +- modules/space/shaders/debrisViz_vs.glsl | 2 +- modules/space/shaders/psfToTexture_fs.glsl | 2 +- modules/space/shaders/psfToTexture_vs.glsl | 2 +- .../shaders/dilation_fs.glsl | 2 +- .../shaders/dilation_vs.glsl | 2 +- .../shaders/renderableModelDepth_fs.glsl | 2 +- .../shaders/renderableModelDepth_vs.glsl | 2 +- modules/toyvolume/shaders/boundsfs.glsl | 2 +- modules/toyvolume/shaders/boundsvs.glsl | 2 +- modules/toyvolume/shaders/raycast.glsl | 2 +- modules/volume/shaders/boundsfs.glsl | 2 +- modules/volume/shaders/boundsvs.glsl | 2 +- modules/volume/shaders/helper.glsl | 2 +- modules/volume/shaders/raycast.glsl | 2 +- .../webbrowser/shaders/screenspace_fs.glsl | 2 +- .../webbrowser/shaders/screenspace_vs.glsl | 2 +- shaders/PowerScaling/powerScalingMath.hglsl | 2 +- shaders/PowerScaling/powerScaling_fs.hglsl | 2 +- shaders/PowerScaling/powerScaling_vs.hglsl | 2 +- shaders/abuffer/abufferfragment.glsl | 2 +- shaders/abuffer/abufferresources.glsl | 2 +- shaders/abuffer/boundsabuffer.frag | 2 +- shaders/abuffer/raycasterdata.glsl | 2 +- shaders/abuffer/renderabuffer.frag | 2 +- shaders/abuffer/renderabuffer.vert | 2 +- shaders/abuffer/resolveabuffer.frag | 2 +- shaders/abuffer/resolveabuffer.vert | 2 +- shaders/abuffer/resolvehelpers.glsl | 2 +- shaders/blending.glsl | 2 +- shaders/floatoperations.glsl | 2 +- shaders/fragment.glsl | 2 +- shaders/framebuffer/exitframebuffer.frag | 2 +- shaders/framebuffer/fxaa.frag | 2 +- shaders/framebuffer/fxaa.vert | 2 +- shaders/framebuffer/hdrAndFiltering.frag | 2 +- shaders/framebuffer/hdrAndFiltering.vert | 2 +- shaders/framebuffer/inside.glsl | 2 +- .../framebuffer/mergeDownscaledVolume.frag | 2 +- .../framebuffer/mergeDownscaledVolume.vert | 2 +- shaders/framebuffer/nOneStripMSAA.frag | 4 +- shaders/framebuffer/nOneStripMSAA.vert | 2 +- shaders/framebuffer/outside.glsl | 2 +- shaders/framebuffer/raycastframebuffer.frag | 2 +- shaders/framebuffer/renderframebuffer.frag | 2 +- shaders/framebuffer/resolveframebuffer.vert | 2 +- shaders/hdr.glsl | 2 +- shaders/rand.glsl | 2 +- src/interaction/touchbar.mm | 2 +- src/openspace.cpp | 2 +- src/rendering/framebufferrenderer.cpp | 176 ++++++++++++++++-- support/cmake/openspace_header.template | 2 +- support/coding/new_files.py | 4 +- 69 files changed, 226 insertions(+), 90 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 65a49a2e5b..4e0881c01c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014-2019 +Copyright (c) 2014-2020 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software diff --git a/modules/base/shaders/renderabletrail_apple_fs.glsl b/modules/base/shaders/renderabletrail_apple_fs.glsl index f0f83b0285..d89b3cc720 100644 --- a/modules/base/shaders/renderabletrail_apple_fs.glsl +++ b/modules/base/shaders/renderabletrail_apple_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/renderabletrail_apple_vs.glsl b/modules/base/shaders/renderabletrail_apple_vs.glsl index 4c4db42aac..aa6224c3af 100644 --- a/modules/base/shaders/renderabletrail_apple_vs.glsl +++ b/modules/base/shaders/renderabletrail_apple_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/shaders/gui_fs.glsl b/modules/cefwebgui/shaders/gui_fs.glsl index 9dda0651ab..3b31cb9184 100644 --- a/modules/cefwebgui/shaders/gui_fs.glsl +++ b/modules/cefwebgui/shaders/gui_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/shaders/gui_vs.glsl b/modules/cefwebgui/shaders/gui_vs.glsl index 2323d505d3..f8ee811e0a 100644 --- a/modules/cefwebgui/shaders/gui_vs.glsl +++ b/modules/cefwebgui/shaders/gui_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/galaxyraycast.glsl b/modules/galaxy/shaders/galaxyraycast.glsl index dab687e3ca..5bc7bcb4c6 100644 --- a/modules/galaxy/shaders/galaxyraycast.glsl +++ b/modules/galaxy/shaders/galaxyraycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * -* Copyright (c) 2014-2019 * +* Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/smviewer_fs.glsl b/modules/globebrowsing/shaders/smviewer_fs.glsl index 0d58b4e8aa..62719a89a5 100644 --- a/modules/globebrowsing/shaders/smviewer_fs.glsl +++ b/modules/globebrowsing/shaders/smviewer_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/smviewer_vs.glsl b/modules/globebrowsing/shaders/smviewer_vs.glsl index 958527c339..c5bb033b36 100644 --- a/modules/globebrowsing/shaders/smviewer_vs.glsl +++ b/modules/globebrowsing/shaders/smviewer_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/datasphere_fs.glsl b/modules/iswa/shaders/datasphere_fs.glsl index 58435e4ba3..a374bd57c2 100644 --- a/modules/iswa/shaders/datasphere_fs.glsl +++ b/modules/iswa/shaders/datasphere_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/datasphere_vs.glsl b/modules/iswa/shaders/datasphere_vs.glsl index fb4befc750..af4b217a9b 100644 --- a/modules/iswa/shaders/datasphere_vs.glsl +++ b/modules/iswa/shaders/datasphere_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/boundsFs.glsl b/modules/multiresvolume/shaders/boundsFs.glsl index 83902fdb9c..2c1dbf6d40 100644 --- a/modules/multiresvolume/shaders/boundsFs.glsl +++ b/modules/multiresvolume/shaders/boundsFs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/boundsVs.glsl b/modules/multiresvolume/shaders/boundsVs.glsl index aa4bdf998c..bdf91b8623 100644 --- a/modules/multiresvolume/shaders/boundsVs.glsl +++ b/modules/multiresvolume/shaders/boundsVs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/helper.glsl b/modules/multiresvolume/shaders/helper.glsl index d080334c0b..89b0c21866 100644 --- a/modules/multiresvolume/shaders/helper.glsl +++ b/modules/multiresvolume/shaders/helper.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/raycast.glsl b/modules/multiresvolume/shaders/raycast.glsl index eac36037d6..5ce6378080 100644 --- a/modules/multiresvolume/shaders/raycast.glsl +++ b/modules/multiresvolume/shaders/raycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/convolution_fs.glsl b/modules/space/shaders/convolution_fs.glsl index f10b9e0c14..9cde38881e 100644 --- a/modules/space/shaders/convolution_fs.glsl +++ b/modules/space/shaders/convolution_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/convolution_vs.glsl b/modules/space/shaders/convolution_vs.glsl index a2e5f20da8..c87dcf9fe6 100644 --- a/modules/space/shaders/convolution_vs.glsl +++ b/modules/space/shaders/convolution_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/debrisViz_fs.glsl b/modules/space/shaders/debrisViz_fs.glsl index e54886d99a..23199cd727 100644 --- a/modules/space/shaders/debrisViz_fs.glsl +++ b/modules/space/shaders/debrisViz_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/debrisViz_vs.glsl b/modules/space/shaders/debrisViz_vs.glsl index c81cd42431..57b89a2510 100644 --- a/modules/space/shaders/debrisViz_vs.glsl +++ b/modules/space/shaders/debrisViz_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/psfToTexture_fs.glsl b/modules/space/shaders/psfToTexture_fs.glsl index 3eee43d979..060b33e557 100644 --- a/modules/space/shaders/psfToTexture_fs.glsl +++ b/modules/space/shaders/psfToTexture_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/psfToTexture_vs.glsl b/modules/space/shaders/psfToTexture_vs.glsl index d24f8ac013..791adc6c4e 100644 --- a/modules/space/shaders/psfToTexture_vs.glsl +++ b/modules/space/shaders/psfToTexture_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/dilation_fs.glsl b/modules/spacecraftinstruments/shaders/dilation_fs.glsl index 827fa02491..0b4b01e684 100644 --- a/modules/spacecraftinstruments/shaders/dilation_fs.glsl +++ b/modules/spacecraftinstruments/shaders/dilation_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/dilation_vs.glsl b/modules/spacecraftinstruments/shaders/dilation_vs.glsl index d8cc4380db..9d2a0c22d9 100644 --- a/modules/spacecraftinstruments/shaders/dilation_vs.glsl +++ b/modules/spacecraftinstruments/shaders/dilation_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl b/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl index f0e3acc04f..c4a2b2c5c3 100644 --- a/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl b/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl index 7bf11b3be2..eec94130a1 100644 --- a/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/shaders/boundsfs.glsl b/modules/toyvolume/shaders/boundsfs.glsl index 6f1123a51d..4c6fa0ed17 100644 --- a/modules/toyvolume/shaders/boundsfs.glsl +++ b/modules/toyvolume/shaders/boundsfs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/shaders/boundsvs.glsl b/modules/toyvolume/shaders/boundsvs.glsl index b5a22f127b..67c3aa488e 100644 --- a/modules/toyvolume/shaders/boundsvs.glsl +++ b/modules/toyvolume/shaders/boundsvs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/shaders/raycast.glsl b/modules/toyvolume/shaders/raycast.glsl index 7168af6ef6..b604dd050d 100644 --- a/modules/toyvolume/shaders/raycast.glsl +++ b/modules/toyvolume/shaders/raycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/boundsfs.glsl b/modules/volume/shaders/boundsfs.glsl index 8fa1123413..5e589ac90b 100644 --- a/modules/volume/shaders/boundsfs.glsl +++ b/modules/volume/shaders/boundsfs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/boundsvs.glsl b/modules/volume/shaders/boundsvs.glsl index 04688e177a..32c2d80aeb 100644 --- a/modules/volume/shaders/boundsvs.glsl +++ b/modules/volume/shaders/boundsvs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/helper.glsl b/modules/volume/shaders/helper.glsl index 970b6cf6fa..9c51d02d41 100644 --- a/modules/volume/shaders/helper.glsl +++ b/modules/volume/shaders/helper.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/raycast.glsl b/modules/volume/shaders/raycast.glsl index e7e28ab456..0ecee6cf0d 100644 --- a/modules/volume/shaders/raycast.glsl +++ b/modules/volume/shaders/raycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/shaders/screenspace_fs.glsl b/modules/webbrowser/shaders/screenspace_fs.glsl index bef4564a75..7b0491b004 100644 --- a/modules/webbrowser/shaders/screenspace_fs.glsl +++ b/modules/webbrowser/shaders/screenspace_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/shaders/screenspace_vs.glsl b/modules/webbrowser/shaders/screenspace_vs.glsl index 780ddfcef6..b7a3b4af15 100644 --- a/modules/webbrowser/shaders/screenspace_vs.glsl +++ b/modules/webbrowser/shaders/screenspace_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/PowerScaling/powerScalingMath.hglsl b/shaders/PowerScaling/powerScalingMath.hglsl index 626a76fcc7..c07c248f4b 100644 --- a/shaders/PowerScaling/powerScalingMath.hglsl +++ b/shaders/PowerScaling/powerScalingMath.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/PowerScaling/powerScaling_fs.hglsl b/shaders/PowerScaling/powerScaling_fs.hglsl index f31ab0a052..d30d5370fa 100644 --- a/shaders/PowerScaling/powerScaling_fs.hglsl +++ b/shaders/PowerScaling/powerScaling_fs.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/PowerScaling/powerScaling_vs.hglsl b/shaders/PowerScaling/powerScaling_vs.hglsl index b1cbbb4c9f..85b94bd939 100644 --- a/shaders/PowerScaling/powerScaling_vs.hglsl +++ b/shaders/PowerScaling/powerScaling_vs.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/abufferfragment.glsl b/shaders/abuffer/abufferfragment.glsl index 108bd1726c..519c76136f 100644 --- a/shaders/abuffer/abufferfragment.glsl +++ b/shaders/abuffer/abufferfragment.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/abufferresources.glsl b/shaders/abuffer/abufferresources.glsl index 562a761be9..2083160765 100644 --- a/shaders/abuffer/abufferresources.glsl +++ b/shaders/abuffer/abufferresources.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/boundsabuffer.frag b/shaders/abuffer/boundsabuffer.frag index 127f1dedd7..39b3c9de74 100644 --- a/shaders/abuffer/boundsabuffer.frag +++ b/shaders/abuffer/boundsabuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/raycasterdata.glsl b/shaders/abuffer/raycasterdata.glsl index 50d5ed6d76..6adc2b505d 100644 --- a/shaders/abuffer/raycasterdata.glsl +++ b/shaders/abuffer/raycasterdata.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/renderabuffer.frag b/shaders/abuffer/renderabuffer.frag index af323f7bec..316238681b 100644 --- a/shaders/abuffer/renderabuffer.frag +++ b/shaders/abuffer/renderabuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/renderabuffer.vert b/shaders/abuffer/renderabuffer.vert index a1bf057ce6..95ffd3ac7a 100644 --- a/shaders/abuffer/renderabuffer.vert +++ b/shaders/abuffer/renderabuffer.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/resolveabuffer.frag b/shaders/abuffer/resolveabuffer.frag index 8efebf2947..d3681578da 100644 --- a/shaders/abuffer/resolveabuffer.frag +++ b/shaders/abuffer/resolveabuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/resolveabuffer.vert b/shaders/abuffer/resolveabuffer.vert index 956aa538ce..c33c92d84d 100644 --- a/shaders/abuffer/resolveabuffer.vert +++ b/shaders/abuffer/resolveabuffer.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/resolvehelpers.glsl b/shaders/abuffer/resolvehelpers.glsl index 411bcd9c9a..2a474879c9 100644 --- a/shaders/abuffer/resolvehelpers.glsl +++ b/shaders/abuffer/resolvehelpers.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/blending.glsl b/shaders/blending.glsl index 46091050cb..c5dce91519 100644 --- a/shaders/blending.glsl +++ b/shaders/blending.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/floatoperations.glsl b/shaders/floatoperations.glsl index 7b43a5f891..dad993dc47 100644 --- a/shaders/floatoperations.glsl +++ b/shaders/floatoperations.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/fragment.glsl b/shaders/fragment.glsl index 95efdb25ab..7607996e74 100644 --- a/shaders/fragment.glsl +++ b/shaders/fragment.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/exitframebuffer.frag b/shaders/framebuffer/exitframebuffer.frag index e561206773..0280f0a36c 100644 --- a/shaders/framebuffer/exitframebuffer.frag +++ b/shaders/framebuffer/exitframebuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/fxaa.frag b/shaders/framebuffer/fxaa.frag index a9d30c4279..c558b4cd04 100644 --- a/shaders/framebuffer/fxaa.frag +++ b/shaders/framebuffer/fxaa.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/fxaa.vert b/shaders/framebuffer/fxaa.vert index f737e51882..b0a412be03 100644 --- a/shaders/framebuffer/fxaa.vert +++ b/shaders/framebuffer/fxaa.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/hdrAndFiltering.frag b/shaders/framebuffer/hdrAndFiltering.frag index 0e2b3b2090..d4e43cbdf8 100644 --- a/shaders/framebuffer/hdrAndFiltering.frag +++ b/shaders/framebuffer/hdrAndFiltering.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/hdrAndFiltering.vert b/shaders/framebuffer/hdrAndFiltering.vert index f737e51882..b0a412be03 100644 --- a/shaders/framebuffer/hdrAndFiltering.vert +++ b/shaders/framebuffer/hdrAndFiltering.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/inside.glsl b/shaders/framebuffer/inside.glsl index 5801dfc587..012a221fd9 100644 --- a/shaders/framebuffer/inside.glsl +++ b/shaders/framebuffer/inside.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/mergeDownscaledVolume.frag b/shaders/framebuffer/mergeDownscaledVolume.frag index 14a6405735..b255d2a590 100644 --- a/shaders/framebuffer/mergeDownscaledVolume.frag +++ b/shaders/framebuffer/mergeDownscaledVolume.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/mergeDownscaledVolume.vert b/shaders/framebuffer/mergeDownscaledVolume.vert index f737e51882..b0a412be03 100644 --- a/shaders/framebuffer/mergeDownscaledVolume.vert +++ b/shaders/framebuffer/mergeDownscaledVolume.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/nOneStripMSAA.frag b/shaders/framebuffer/nOneStripMSAA.frag index c16d61aeba..4386ad4af5 100644 --- a/shaders/framebuffer/nOneStripMSAA.frag +++ b/shaders/framebuffer/nOneStripMSAA.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -32,7 +32,7 @@ in vec2 vTexCoord; uniform int currentSample; uniform sampler2DMS pixelSizeTexture; -void main() { +void main() { finalColor = vec4(texelFetch(pixelSizeTexture, ivec2(vTexCoord), currentSample).rgb, 1.0); //finalColor = vec4(0.5*vPosition.xy + 0.5, 1.0, 1.0); //finalColor = vec4(vPosition.xy, 0.0, 1.0); diff --git a/shaders/framebuffer/nOneStripMSAA.vert b/shaders/framebuffer/nOneStripMSAA.vert index 6c7f2e9163..ccce241d15 100644 --- a/shaders/framebuffer/nOneStripMSAA.vert +++ b/shaders/framebuffer/nOneStripMSAA.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/outside.glsl b/shaders/framebuffer/outside.glsl index e56198693b..847304b039 100644 --- a/shaders/framebuffer/outside.glsl +++ b/shaders/framebuffer/outside.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/raycastframebuffer.frag b/shaders/framebuffer/raycastframebuffer.frag index bff04b1dbe..1a9efc53c2 100644 --- a/shaders/framebuffer/raycastframebuffer.frag +++ b/shaders/framebuffer/raycastframebuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/renderframebuffer.frag b/shaders/framebuffer/renderframebuffer.frag index a20d685f4e..deb68cb122 100644 --- a/shaders/framebuffer/renderframebuffer.frag +++ b/shaders/framebuffer/renderframebuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/resolveframebuffer.vert b/shaders/framebuffer/resolveframebuffer.vert index 9167d4c640..320f8b7f15 100644 --- a/shaders/framebuffer/resolveframebuffer.vert +++ b/shaders/framebuffer/resolveframebuffer.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/hdr.glsl b/shaders/hdr.glsl index 2fca4496c5..63dc9b5d2d 100644 --- a/shaders/hdr.glsl +++ b/shaders/hdr.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/rand.glsl b/shaders/rand.glsl index 3e38e95058..f2ac746245 100644 --- a/shaders/rand.glsl +++ b/shaders/rand.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/touchbar.mm b/src/interaction/touchbar.mm index f1762ced24..644e199e29 100644 --- a/src/interaction/touchbar.mm +++ b/src/interaction/touchbar.mm @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/openspace.cpp b/src/openspace.cpp index 48c80e5071..eda8a807f2 100644 --- a/src/openspace.cpp +++ b/src/openspace.cpp @@ -29,7 +29,7 @@ namespace openspace { std::string licenseText() { return "OpenSpace\n\ \n\ -Copyright (c) 2014-2019\n\ +Copyright (c) 2014-2020\n\ \n\ Permission is hereby granted, free of charge, to any person obtaining a copy of this\n\ software and associated documentation files (the \"Software\"), to deal in the Software\n\ diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index d260facb32..5a3ff016cd 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -51,6 +51,30 @@ namespace { constexpr const char* _loggerCat = "FramebufferRenderer"; + // If this is true (detected automatically), the OpenGL debug information functions + // are available and will be used to mark object names and debug groups + bool HasGLDebugInfo = false; + + struct GLDebugGroup { + explicit GLDebugGroup(std::string_view name) { + if (HasGLDebugInfo) { + glPushDebugGroup( + GL_DEBUG_SOURCE_APPLICATION, + 0, + name.length(), + name.data() + ); + } + } + + ~GLDebugGroup() { + if (HasGLDebugInfo) { + glPopDebugGroup(); + } + } + }; + + constexpr const std::array HDRUniformNames = { "hdrFeedingTexture", "blackoutFactor", "hdrExposure", "gamma", "Hue", "Saturation", "Value" @@ -141,6 +165,10 @@ namespace openspace { void FramebufferRenderer::initialize() { LDEBUG("Initializing FramebufferRenderer"); + HasGLDebugInfo = glbinding::Binding::ObjectLabel.isResolved() && + glbinding::Binding::PushDebugGroup.isResolved() && + glbinding::Binding::PopDebugGroup.isResolved(); + const GLfloat vertexData[] = { // x y -1.f, -1.f, @@ -165,35 +193,112 @@ void FramebufferRenderer::initialize() { // GBuffers glGenTextures(1, &_gBuffers.colorTexture); + if (HasGLDebugInfo) { + glObjectLabel(GL_TEXTURE, _gBuffers.colorTexture, -1, "G-Buffer Color"); + } glGenTextures(1, &_gBuffers.depthTexture); + if (HasGLDebugInfo) { + glObjectLabel(GL_TEXTURE, _gBuffers.depthTexture, -1, "G-Buffer Depth"); + } glGenTextures(1, &_gBuffers.positionTexture); + if (HasGLDebugInfo) { + glObjectLabel(GL_TEXTURE, _gBuffers.positionTexture, -1, "G-Buffer Position"); + } glGenTextures(1, &_gBuffers.normalTexture); + if (HasGLDebugInfo) { + glObjectLabel(GL_TEXTURE, _gBuffers.normalTexture, -1, "G-Buffer Normal"); + } glGenFramebuffers(1, &_gBuffers.framebuffer); + if (HasGLDebugInfo) { + glObjectLabel(GL_FRAMEBUFFER, _gBuffers.framebuffer, -1, "G-Buffer Main"); + } // PingPong Buffers // The first pingpong buffer shares the color texture with the renderbuffer: _pingPongBuffers.colorTexture[0] = _gBuffers.colorTexture; glGenTextures(1, &_pingPongBuffers.colorTexture[1]); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel( + GL_TEXTURE, + _pingPongBuffers.colorTexture[1], + -1, + "G-Buffer Color Ping-Pong" + ); + } glGenFramebuffers(1, &_pingPongBuffers.framebuffer); - + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel( + GL_FRAMEBUFFER, + _pingPongBuffers.framebuffer, + -1, + "G-Buffer Ping-Pong" + ); + } + // Exit framebuffer glGenTextures(1, &_exitColorTexture); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_TEXTURE, _exitColorTexture, -1, "Exit color"); + } glGenTextures(1, &_exitDepthTexture); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_TEXTURE, _exitColorTexture, -1, "Exit depth"); + } glGenFramebuffers(1, &_exitFramebuffer); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_FRAMEBUFFER, _exitFramebuffer, -1, "Exit"); + } // HDR / Filtering Buffers glGenFramebuffers(1, &_hdrBuffers.hdrFilteringFramebuffer); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_FRAMEBUFFER, _exitFramebuffer, -1, "HDR filtering"); + } glGenTextures(1, &_hdrBuffers.hdrFilteringTexture); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_TEXTURE, _hdrBuffers.hdrFilteringTexture, -1, "HDR filtering"); + } + // FXAA Buffers glGenFramebuffers(1, &_fxaaBuffers.fxaaFramebuffer); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_FRAMEBUFFER, _fxaaBuffers.fxaaFramebuffer, -1, "FXAA"); + } glGenTextures(1, &_fxaaBuffers.fxaaTexture); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel(GL_TEXTURE, _fxaaBuffers.fxaaTexture, -1, "FXAA"); + } // DownscaleVolumeRendering glGenFramebuffers(1, &_downscaleVolumeRendering.framebuffer); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel( + GL_FRAMEBUFFER, + _downscaleVolumeRendering.framebuffer, + -1, + "Downscaled Volume" + ); + } glGenTextures(1, &_downscaleVolumeRendering.colorTexture); + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel( + GL_TEXTURE, + _downscaleVolumeRendering.colorTexture, + -1, + "Downscaled Volume Color" + ); + } glGenTextures(1, &_downscaleVolumeRendering.depthbuffer); - + if (glbinding::Binding::ObjectLabel.isResolved()) { + glObjectLabel( + GL_TEXTURE, + _downscaleVolumeRendering.depthbuffer, + -1, + "Downscaled Volume Depth" + ); + } + // Allocate Textures/Buffers Memory updateResolution(); @@ -424,23 +529,19 @@ void FramebufferRenderer::applyTMO(float blackoutFactor) { if (doPerformanceMeasurements) { perfInternal = std::make_unique( "FramebufferRenderer::render::TMO" - ); + ); } _hdrFilteringProgram->activate(); ghoul::opengl::TextureUnit hdrFeedingTextureUnit; hdrFeedingTextureUnit.activate(); - glBindTexture( - GL_TEXTURE_2D, - _pingPongBuffers.colorTexture[_pingPongIndex] - ); + glBindTexture(GL_TEXTURE_2D, _pingPongBuffers.colorTexture[_pingPongIndex]); _hdrFilteringProgram->setUniform( _hdrUniformCache.hdrFeedingTexture, hdrFeedingTextureUnit ); - _hdrFilteringProgram->setUniform(_hdrUniformCache.blackoutFactor, blackoutFactor); _hdrFilteringProgram->setUniform(_hdrUniformCache.hdrExposure, _hdrExposure); _hdrFilteringProgram->setUniform(_hdrUniformCache.gamma, _gamma); @@ -468,7 +569,7 @@ void FramebufferRenderer::applyFXAA() { if (doPerformanceMeasurements) { perfInternal = std::make_unique( "FramebufferRenderer::render::FXAA" - ); + ); } _fxaaProgram->activate(); @@ -1042,6 +1143,9 @@ void FramebufferRenderer::updateDownscaledVolume() { void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFactor) { ZoneScoped + GLint viewport[4]; + glGetIntegerv(GL_VIEWPORT, viewport); + { // Set OpenGL default rendering state ZoneScopedN("Setting OpenGL state") @@ -1076,6 +1180,8 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac ZoneScopedN("Deferred G-Buffer") TracyGpuZone("Deferred G-Buffer") + glViewport(0, 0, _resolution.x, _resolution.y); + glBindFramebuffer(GL_FRAMEBUFFER, _gBuffers.framebuffer); glDrawBuffers(3, ColorAttachment012Array); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -1091,15 +1197,28 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac }; RendererTasks tasks; - data.renderBinMask = static_cast(Renderable::RenderBin::Background); - scene->render(data, tasks); - data.renderBinMask = static_cast(Renderable::RenderBin::Opaque); - scene->render(data, tasks); - data.renderBinMask = static_cast(Renderable::RenderBin::Transparent); - scene->render(data, tasks); + { + GLDebugGroup group("Background"); + data.renderBinMask = static_cast(Renderable::RenderBin::Background); + scene->render(data, tasks); + } + + { + GLDebugGroup group("Opaque"); + data.renderBinMask = static_cast(Renderable::RenderBin::Opaque); + scene->render(data, tasks); + } + + { + GLDebugGroup group("Transparent"); + data.renderBinMask = static_cast(Renderable::RenderBin::Transparent); + scene->render(data, tasks); + } // Run Volume Tasks { + GLDebugGroup group("Raycaster Tasks"); + std::unique_ptr perfInternal; if (doPerformanceMeasurements) { perfInternal = std::make_unique( @@ -1107,9 +1226,15 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac ); } performRaycasterTasks(tasks.raycasterTasks); + + if (HasGLDebugInfo) { + glPopDebugGroup(); + } } if (!tasks.deferredcasterTasks.empty()) { + GLDebugGroup group("Deferred Caster Tasks"); + // We use ping pong rendering in order to be able to // render to the same final buffer, multiple // deferred tasks at same time (e.g. more than 1 ATM being seen at once) @@ -1124,22 +1249,28 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac } performDeferredTasks(tasks.deferredcasterTasks); } - + glDrawBuffers(1, &ColorAttachment01Array[_pingPongIndex]); glEnablei(GL_BLEND, 0); - data.renderBinMask = static_cast(Renderable::RenderBin::Overlay); - scene->render(data, tasks); + { + GLDebugGroup group("Overlay"); + data.renderBinMask = static_cast(Renderable::RenderBin::Overlay); + scene->render(data, tasks); + } glDrawBuffer(GL_COLOR_ATTACHMENT0); // Disabling depth test for filtering and hdr glDisable(GL_DEPTH_TEST); + glViewport(viewport[0], viewport[1], viewport[2], viewport[3]); + if (_enableFXAA) { glBindFramebuffer(GL_FRAMEBUFFER, _fxaaBuffers.fxaaFramebuffer); glDrawBuffers(1, ColorAttachment0Array); glDisable(GL_BLEND); + } else { // When applying the TMO, the result is saved to the default FBO to be displayed @@ -1147,10 +1278,15 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac glBindFramebuffer(GL_FRAMEBUFFER, _defaultFBO); } - // Apply the selected TMO on the results and resolve the result for the default FBO - applyTMO(blackoutFactor); + { + // Apply the selected TMO on the results and resolve the result to the default FBO + GLDebugGroup group("Apply TMO"); + + applyTMO(blackoutFactor); + } if (_enableFXAA) { + GLDebugGroup group("Apply FXAA"); glBindFramebuffer(GL_FRAMEBUFFER, _defaultFBO); applyFXAA(); } diff --git a/support/cmake/openspace_header.template b/support/cmake/openspace_header.template index 5cae439242..ca8ede21eb 100644 --- a/support/cmake/openspace_header.template +++ b/support/cmake/openspace_header.template @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2019 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/support/coding/new_files.py b/support/coding/new_files.py index 6721943f33..60ee3c29e2 100644 --- a/support/coding/new_files.py +++ b/support/coding/new_files.py @@ -33,8 +33,8 @@ Project = { } License = { - 'OpenSpace': '/*****************************************************************************************\n * *\n * OpenSpace *\n * *\n * Copyright (c) 2014-2018 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/', - 'Ghoul': '/*****************************************************************************************\n * *\n * GHOUL *\n * General Helpful Open Utility Library *\n * *\n * Copyright (c) 2012-2018 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/' + 'OpenSpace': '/*****************************************************************************************\n * *\n * OpenSpace *\n * *\n * Copyright (c) 2014-2020 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/', + 'Ghoul': '/*****************************************************************************************\n * *\n * GHOUL *\n * General Helpful Open Utility Library *\n * *\n * Copyright (c) 2012-2020 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/' } Namespace = {