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:
authorTon Roosendaal <ton@blender.org>2004-09-27 14:12:45 +0400
committerTon Roosendaal <ton@blender.org>2004-09-27 14:12:45 +0400
commit061442cbd1e69ad494eb22a69a2ae89e72e9d978 (patch)
treedb043e68669d8a0adc68bef0834ecb03b5178264 /source/blender/src/glutil.c
parent995826f3edccb064955bf88b36566fd4550af3b9 (diff)
- improvement for edge/face select
- edges now sample on three locationsm gives more hits - own version of glPolygonOffset remains cumbersome... but for select now the selection routine gets more offset than draw. - first attempt to clean drawobject.c and displists - generic call for draw object in backbuf for select purposes, cleans up a lot in the other calls. - also to verify if we can (in future) use this for vertex/edge/face select, but the whole drawobject code works against me... this is for another refactory (incl. displist) and out of the focus for now - subsurf.c: now creates new faces in order of original. Not used yet, but is handy to recover the original order for selection/paint purposes.
Diffstat (limited to 'source/blender/src/glutil.c')
-rw-r--r--source/blender/src/glutil.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/src/glutil.c b/source/blender/src/glutil.c
index 2bf802f0fcc..c989b13f64d 100644
--- a/source/blender/src/glutil.c
+++ b/source/blender/src/glutil.c
@@ -479,6 +479,10 @@ void bglEnd(void)
/* *************** glPolygonOffset hack ************* */
+// both temporal, so here for now (ton)
+#include "BKE_global.h"
+#include "DNA_view3d_types.h"
+
/* dist is only for ortho now... */
void bglPolygonOffset(float dist)
{
@@ -494,8 +498,10 @@ void bglPolygonOffset(float dist)
glMatrixMode(GL_PROJECTION);
glGetFloatv(GL_PROJECTION_MATRIX, (float *)winmat);
- if(winmat[15]>0.5) offs= 0.00005*dist; // ortho tweaking
- else offs= 0.001; // should be clipping value or so...
+ /* dist is from camera to center point */
+
+ if(winmat[15]>0.5) offs= 0.00005*dist*G.vd->dist; // ortho tweaking
+ else offs= 0.001*dist; // should be clipping value or so...
winmat[14]-= offs;
offset+= offs;