1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
From 4920977eeeebdc944a824e2c589272324ea5e74e Mon Sep 17 00:00:00 2001
From: speleo3 <speleo3@21428953-86e3-433d-9a34-2224224d0fc8>
Date: Mon, 15 Jul 2013 14:01:10 +0000
Subject: [PATCH] fixed flickering ortho problems on some machines
git-svn-id: svn://svn.code.sf.net/p/pymol/code/trunk@4034 21428953-86e3-433d-9a34-2224224d0fc8
---
pymol/ChangeLog | 4 ++++
pymol/layer1/Ortho.c | 26 ++++++++++++++++++++------
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/pymol/layer1/Ortho.c b/pymol/layer1/Ortho.c
index 4d79114..9dd5d45 100644
--- a/pymol/layer1/Ortho.c
+++ b/pymol/layer1/Ortho.c
@@ -1517,7 +1517,7 @@ void OrthoDoDraw(PyMOLGlobals * G, int render_mode)
int overlay, text;
int rightSceneMargin;
int internal_feedback;
- int times = 1;
+ int times = 1, origtimes = 0;
int double_pump = false;
float *bg_color;
int skip_prompt = 0;
@@ -1627,6 +1627,7 @@ void OrthoDoDraw(PyMOLGlobals * G, int render_mode)
SceneGLClearColor(0.0, 0.0, 0.0, 1.0);
+ origtimes = times;
while(times--) {
switch (times) {
@@ -1678,7 +1679,7 @@ void OrthoDoDraw(PyMOLGlobals * G, int render_mode)
} else {
OrthoRenderCGO(G);
OrthoPopMatrix(G);
- return;
+ continue;
}
}
}
@@ -1925,10 +1926,23 @@ void OrthoDoDraw(PyMOLGlobals * G, int render_mode)
CGOStop(I->orthoCGO);
I->orthoCGO->use_shader = true;
}
-
- OrthoPushMatrix(G);
- OrthoRenderCGO(G);
- OrthoPopMatrix(G);
+
+ while(origtimes--){
+ switch (origtimes){
+ case 1:
+ OrthoDrawBuffer(G, GL_BACK_LEFT);
+ break;
+ case 0:
+ if(double_pump) {
+ OrthoDrawBuffer(G, GL_BACK_RIGHT);
+ } else
+ OrthoDrawBuffer(G, GL_BACK);
+ break;
+ }
+ OrthoPushMatrix(G);
+ OrthoRenderCGO(G);
+ OrthoPopMatrix(G);
+ }
}
}
--
1.8.3.2
|