ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/view.C
(Generate patch)

Comparing libgender/view.C (file contents):
Revision 1.18 by root, Wed Oct 6 01:41:30 2004 UTC vs.
Revision 1.24 by root, Wed Oct 6 07:45:20 2004 UTC

66} 66}
67 67
68void view::begin () 68void 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#if 0
79 for (vector<octant *>::iterator i = checklist.begin (); i != checklist.end (); ++i)
80 //printf ("%p %d\n", *i, occ_query_result ((*i)->occ_query));
81 occ_query_result ((*i)->occ_query);
82
77 checklist.clear (); 83 checklist.clear ();
84#endif
78 85
79 world.detect_visibility (*this); 86 world.detect_visibility (*this);
80} 87}
81 88
82void view::end () 89void view::end ()
96 glEnable (GL_POLYGON_OFFSET_FILL); 103 glEnable (GL_POLYGON_OFFSET_FILL);
97 glPolygonOffset (0, 1); 104 glPolygonOffset (0, 1);
98 glDepthFunc (GL_LESS); 105 glDepthFunc (GL_LESS);
99 glDisable (GL_LIGHTING); 106 glDisable (GL_LIGHTING);
100 glColorMask (0, 0, 0, 0); 107 glColorMask (0, 0, 0, 0);
101 //cgGLDisableProfile (CG_PROFILE_ARBVP1); 108 cgGLEnableProfile (vsh_profile);// z-fighting??
102 cgGLDisableProfile (CG_PROFILE_ARBFP1); 109 cgGLDisableProfile (fsh_profile);
103 } 110 }
104 else 111 else
105 { 112 {
113#if 0
106 glEnable (GL_MINMAX); 114 glEnable (GL_MINMAX);
115#endif
107 glDisable (GL_POLYGON_OFFSET_FILL); 116 glDisable (GL_POLYGON_OFFSET_FILL);
108 glDepthFunc (GL_LESS); 117 glDepthFunc (GL_LESS);
109 glDepthMask (0); 118 glDepthMask (0);
110 cgGLEnableProfile (CG_PROFILE_ARBVP1); 119 cgGLEnableProfile (vsh_profile);
111 cgGLEnableProfile (CG_PROFILE_ARBFP1); 120 cgGLEnableProfile (fsh_profile);
112 } 121 }
113 122
114 for (vector<octant *>::iterator i = vislist.begin (); i != vislist.end (); ++i) 123 for (vector<octant *>::iterator i = vislist.begin (); i != vislist.end (); ++i)
115 (*i)->display (*this); 124 (*i)->display (*this);
116 125
117 drawn.clear (); 126 drawn.clear ();
118 127
128 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);
133 }
134
119 glColorMask (1, 1, 1, 0); 135 glColorMask (1, 1, 1, 0);
120 glDepthMask (1); 136 glDepthMask (1);
121} 137}
122 138
123 139

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines