Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/intern/draw_manager.h')
-rw-r--r--source/blender/draw/intern/draw_manager.h30
1 files changed, 3 insertions, 27 deletions
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index f7fb50188f3..7981563a9c1 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -42,6 +42,7 @@
#include "GPU_viewport.h"
#include "draw_instance_data.h"
+#include "draw_shader_shared.h"
#ifdef __cplusplus
extern "C" {
@@ -426,38 +427,13 @@ struct DRWPass {
char name[MAX_PASS_NAME];
};
-/* keep in sync with viewBlock */
-typedef struct DRWViewUboStorage {
- /* View matrices */
- float persmat[4][4];
- float persinv[4][4];
- float viewmat[4][4];
- float viewinv[4][4];
- float winmat[4][4];
- float wininv[4][4];
-
- float clipplanes[6][4];
- float viewvecs[2][4];
- /* Should not be here. Not view dependent (only main view). */
- float viewcamtexcofac[4];
- float viewport_size[2];
- float viewport_size_inv[2];
-
- /** Frustum culling data. */
- /** NOTE: vec3 arrays are paded to vec4. */
- float frustum_corners[8][4];
- float frustum_planes[6][4];
-} DRWViewUboStorage;
-
-BLI_STATIC_ASSERT_ALIGN(DRWViewUboStorage, 16)
-
#define MAX_CULLED_VIEWS 32
struct DRWView {
/** Parent view if this is a sub view. NULL otherwise. */
struct DRWView *parent;
- DRWViewUboStorage storage;
+ ViewInfos storage;
/** Number of active clipplanes. */
int clip_planes_len;
/** Does culling result needs to be updated. */
@@ -647,7 +623,7 @@ typedef struct DRWManager {
uint primary_view_ct;
/** TODO(@fclem): Remove this. Only here to support
* shaders without common_view_lib.glsl */
- DRWViewUboStorage view_storage_cpy;
+ ViewInfos view_storage_cpy;
#ifdef USE_GPU_SELECT
uint select_id;