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:
authorNicholas Bishop <nicholasbishop@gmail.com>2007-01-17 06:57:01 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2007-01-17 06:57:01 +0300
commit5f798002c9ca6b9532862ea14fdad27a4c136a12 (patch)
treed10af1e80b96d2102c5614d3f3fe1050d78e29a1 /source/blender/include
parenta3c9ae8a8819d08f47234f0c065fbdb5fd385c59 (diff)
Added a new function+struct to glutil that takes care of reading in the OpenGL data needed for gluProject/gluUnProject. This allows retopo and sculptmode to share some of the same code, and is probably useful elsewhere as well.
Diffstat (limited to 'source/blender/include')
-rw-r--r--source/blender/include/BDR_sculptmode.h8
-rw-r--r--source/blender/include/BIF_glutil.h8
-rw-r--r--source/blender/include/BIF_retopo.h7
3 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/include/BDR_sculptmode.h b/source/blender/include/BDR_sculptmode.h
index da4174a65d7..cf58d711801 100644
--- a/source/blender/include/BDR_sculptmode.h
+++ b/source/blender/include/BDR_sculptmode.h
@@ -30,6 +30,9 @@
#ifndef BDR_SCULPTMODE_H
#define BDR_SCULPTMODE_H
+/* For bglMats */
+#include "BIF_glutil.h"
+
#include "transform.h"
struct uiBlock;
@@ -65,10 +68,7 @@ typedef struct PropsetData {
} PropsetData;
typedef struct SculptSession {
- /* Cache of the OpenGL matrices */
- double modelviewmat[16];
- double projectionmat[16];
- int viewport[4];
+ bglMats mats;
/* An array of lists; array is sized as
large as the number of verts in the mesh,
diff --git a/source/blender/include/BIF_glutil.h b/source/blender/include/BIF_glutil.h
index 36bd6d0c8d7..be255666727 100644
--- a/source/blender/include/BIF_glutil.h
+++ b/source/blender/include/BIF_glutil.h
@@ -213,5 +213,13 @@ void set_inverted_drawing(int enable);
/* own working polygon offset */
void bglPolygonOffset(float dist);
+/* For caching opengl matrices (gluProject/gluUnProject) */
+typedef struct bglMats {
+ double modelview[16];
+ double projection[16];
+ int viewport[4];
+} bglMats;
+void bgl_get_mats(bglMats *mats);
+
#endif /* BIF_GLUTIL_H */
diff --git a/source/blender/include/BIF_retopo.h b/source/blender/include/BIF_retopo.h
index 8a071f704c2..5d39923a398 100644
--- a/source/blender/include/BIF_retopo.h
+++ b/source/blender/include/BIF_retopo.h
@@ -32,14 +32,15 @@
#include "DNA_vec_types.h"
+/* For bglMats */
+#include "BIF_glutil.h"
+
struct EditVert;
struct Mesh;
struct View3D;
typedef struct RetopoViewData {
- /* OpenGL matrices */
- double modelviewmat[16], projectionmat[16];
- int viewport[4];
+ bglMats mats;
char queue_matrix_update;
} RetopoViewData;