… | |
… | |
108 | cgGLEnableProfile (vsh_profile);// z-fighting?? |
108 | cgGLEnableProfile (vsh_profile);// z-fighting?? |
109 | cgGLDisableProfile (fsh_profile); |
109 | cgGLDisableProfile (fsh_profile); |
110 | } |
110 | } |
111 | else |
111 | else |
112 | { |
112 | { |
113 | #if 0 |
|
|
114 | glEnable (GL_MINMAX); |
113 | glEnable (GL_MINMAX); |
115 | #endif |
|
|
116 | glDisable (GL_POLYGON_OFFSET_FILL); |
114 | glDisable (GL_POLYGON_OFFSET_FILL); |
117 | glDepthFunc (GL_LESS); |
115 | glDepthFunc (GL_LESS); |
118 | glDepthMask (0); |
116 | glDepthMask (0); |
119 | cgGLEnableProfile (vsh_profile); |
117 | cgGLEnableProfile (vsh_profile); |
120 | cgGLEnableProfile (fsh_profile); |
118 | cgGLEnableProfile (fsh_profile); |
… | |
… | |
123 | for (vector<octant *>::iterator i = vislist.begin (); i != vislist.end (); ++i) |
121 | for (vector<octant *>::iterator i = vislist.begin (); i != vislist.end (); ++i) |
124 | (*i)->display (*this); |
122 | (*i)->display (*this); |
125 | |
123 | |
126 | drawn.clear (); |
124 | drawn.clear (); |
127 | |
125 | |
|
|
126 | if (mode == view::DEPTH) |
|
|
127 | { |
|
|
128 | static int count; count++; |
|
|
129 | if (farlist.size ()) |
|
|
130 | printf ("%d: size %d\n", count, farlist.size ()); |
|
|
131 | |
|
|
132 | glDepthFunc (GL_LEQUAL); |
128 | for (vector<octant *>::iterator i = farlist.begin (); i != farlist.end (); ++i) |
133 | for (vector<octant *>::iterator i = farlist.begin (); i != farlist.end (); ++i) |
129 | { |
|
|
130 | //printf ("BB %d,%d,%d - %d\n", |
|
|
131 | //(*i)-> |
|
|
132 | (*i)->draw_bbox (*this); |
134 | (*i)->draw_bbox (*this); |
|
|
135 | |
|
|
136 | farlist.clear (); |
133 | } |
137 | } |
134 | |
138 | |
135 | glColorMask (1, 1, 1, 0); |
139 | glColorMask (1, 1, 1, 0); |
136 | glDepthMask (1); |
140 | glDepthMask (1); |
137 | } |
141 | } |
138 | |
142 | |