diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2016-10-21 23:50:00 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2016-10-21 23:51:12 +0300 |
commit | 5ff586610a47aa26ed388270c9a26487c553f1f1 (patch) | |
tree | c152a29097278e1e52c29678eefc4dbff136e8d6 /source/blender/gpu/GPU_viewport.h | |
parent | deb77c0e7490ed300a7688bf462de85f36ee1ca3 (diff) |
Viewport: use depth shader to debug the depth
At the moment this already shows that the depth is the same after the solid plates and in the very end of drawing, while they should be different. Later on we can adapt this to show different buffers we want to debug.
I am using near=0.1, far=2.0 for my tests. I decided not to make a doversion for near/far because this is for debugging only
Diffstat (limited to 'source/blender/gpu/GPU_viewport.h')
-rw-r--r-- | source/blender/gpu/GPU_viewport.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h index 82b537e1c3d..e2519484eb4 100644 --- a/source/blender/gpu/GPU_viewport.h +++ b/source/blender/gpu/GPU_viewport.h @@ -32,10 +32,21 @@ #ifndef __GPU_VIEWPORT_H__ #define __GPU_VIEWPORT_H__ +#include <stdbool.h> + typedef struct GPUViewport GPUViewport; GPUViewport *GPU_viewport_create(void); void GPU_viewport_free(GPUViewport *viewport); +/* debug */ +bool GPU_viewport_debug_depth_create(GPUViewport *viewport, int width, int height, int samples, char err_out[256]); +void GPU_viewport_debug_depth_free(GPUViewport *viewport); +void GPU_viewport_debug_depth_store(GPUViewport *viewport, const int x, const int y); +void GPU_viewport_debug_depth_draw(GPUViewport *viewport, const float znear, const float zfar); +bool GPU_viewport_debug_depth_is_valid(GPUViewport *viewport); +int GPU_viewport_debug_depth_width(const GPUViewport *viewport); +int GPU_viewport_debug_depth_height(const GPUViewport *viewport); + #endif // __GPU_VIEWPORT_H__ |