… | |
… | |
66 | } |
66 | } |
67 | |
67 | |
68 | void view::begin () |
68 | void view::begin () |
69 | { |
69 | { |
70 | vismap.clear (); |
70 | vismap.clear (); |
|
|
71 | vislist.clear (); |
71 | |
72 | |
72 | generation++; |
73 | generation++; |
73 | |
74 | |
74 | reset_projection (); |
75 | reset_projection (); |
75 | |
76 | |
76 | // check occlusion queries here |
77 | // check occlusion queries here |
|
|
78 | for (vector<octant *>::iterator i = checklist.begin (); i != checklist.end (); ++i) |
|
|
79 | //printf ("%p %d\n", *i, occ_query_result ((*i)->occ_query)); |
|
|
80 | occ_query_result ((*i)->occ_query); |
|
|
81 | |
77 | checklist.clear (); |
82 | checklist.clear (); |
78 | |
83 | |
79 | world.detect_visibility (*this); |
84 | world.detect_visibility (*this); |
80 | } |
85 | } |
81 | |
86 | |
… | |
… | |
96 | glEnable (GL_POLYGON_OFFSET_FILL); |
101 | glEnable (GL_POLYGON_OFFSET_FILL); |
97 | glPolygonOffset (0, 1); |
102 | glPolygonOffset (0, 1); |
98 | glDepthFunc (GL_LESS); |
103 | glDepthFunc (GL_LESS); |
99 | glDisable (GL_LIGHTING); |
104 | glDisable (GL_LIGHTING); |
100 | glColorMask (0, 0, 0, 0); |
105 | glColorMask (0, 0, 0, 0); |
101 | //cgGLDisableProfile (CG_PROFILE_ARBVP1); |
106 | //cgGLDisableProfile (vsh_profile); |
102 | cgGLDisableProfile (CG_PROFILE_ARBFP1); |
107 | cgGLDisableProfile (fsh_profile); |
103 | } |
108 | } |
104 | else |
109 | else |
105 | { |
110 | { |
|
|
111 | #if 0 |
106 | glEnable (GL_MINMAX); |
112 | glEnable (GL_MINMAX); |
|
|
113 | #endif |
107 | glDisable (GL_POLYGON_OFFSET_FILL); |
114 | glDisable (GL_POLYGON_OFFSET_FILL); |
108 | glDepthFunc (GL_LESS); |
115 | glDepthFunc (GL_LESS); |
109 | glDepthMask (0); |
116 | glDepthMask (0); |
110 | cgGLEnableProfile (CG_PROFILE_ARBVP1); |
117 | cgGLEnableProfile (vsh_profile); |
111 | cgGLEnableProfile (CG_PROFILE_ARBFP1); |
118 | cgGLEnableProfile (fsh_profile); |
112 | } |
119 | } |
113 | |
120 | |
114 | for (vector<octant *>::iterator i = vislist.begin (); i != vislist.end (); ++i) |
121 | for (vector<octant *>::iterator i = vislist.begin (); i != vislist.end (); ++i) |
115 | (*i)->display (*this); |
122 | (*i)->display (*this); |
116 | |
123 | |