Class of drawer in Opengl. More...
#include <MC_opengl_drawer.hpp>
Public Member Functions | |
| MC_opengl_drawer () | |
| empty constructor | |
Static Public Member Functions | |
| static const MC_mesh_index_vector & | draw (const MC_mesh_index_vector &mesh) |
| draw a MC_mesh_index_vector | |
| static void | draw_per_polygon_color (const MC_mesh_index_vector &mesh, const MC_v3d_vector &color_per_polygon) |
| draw a MC_mesh_index_vector with a per polygon color | |
| static const MC_mesh_index_vector_draw & | draw (const MC_mesh_index_vector_draw &mesh) |
| draw a MC_mesh_index_vector_draw | |
| static const MC_mesh_fast_draw & | draw (const MC_mesh_fast_draw &mesh) |
| draw a MC_mesh_fast_draw | |
| static const MC_segment & | draw (const MC_segment &segment) |
| draw a MC_segment | |
| static const std::vector < MC_segment > & | draw (const std::vector< MC_segment > &segments) |
| draw a vector of MC_segment | |
| static const MC_curve & | draw (const MC_curve &curve) |
| draw a MC_curve | |
| static const std::vector < MC_curve > & | draw (const std::vector< MC_curve > &curves) |
| draw a vector of MC_curve | |
| static const MC_polygon & | draw (const MC_polygon &polygon) |
| draw a MC_polygon | |
| static void | draw (const object::MC_bounding_box_oriented &bb) |
| draw an oriented bounding box | |
| static MC_opengl_drawer | draw_triangular (const mesh::cgal::MC_mesh_cgal &mesh) |
| draw a MC_mesh_cgal (the mesh sould be made of triangles only) | |
| static void | draw_sphere (const MC_v3d &position, const double &radius=0.5, const int &N_subdiv=2) |
| draw directly a sphere of given position and radius | |
| static void | draw_sphere (const MC_v3d_vector &position, const double &radius=0.5, const int &N_subdiv=2) |
| draw directly a sphere of given position and radius | |
| static void | draw_points (const MC_v3d_vector &position) |
| draw sampled points | |
| static const MC_mesh_index_vector & | draw_grid (const MC_mesh_index_vector &mesh) |
| draw a grid of a mesh | |
| static const MC_mesh_fast_draw & | draw_grid (const MC_mesh_fast_draw &mesh) |
| draw a grid of a fast draw mesh | |
| static const MC_mesh_index_vector & | draw_normal_per_polygon (const MC_mesh_index_vector &mesh, const double &L=0.1) |
| draw the per-polygon normals | |
| template<typename T > | |
| static const MC_opengl_drawer | draw (const std::vector< T > &to_draw) |
| draw a vector of drawable structure | |
| static GLuint | send_gpu (const MC_mesh_fast_draw &mesh) |
| send a geometry to the GPU (use VBO or draw_list depending on the graphics card) | |
| static GLuint | send_gpu_grid (const MC_mesh_index_vector &mesh) |
| send a geometry grid to the GPU | |
Class of drawer in Opengl.
Interface between data class and OpenGL stuff
Definition at line 53 of file MC_opengl_drawer.hpp.
| mesh_conv::MC_opengl_drawer::MC_opengl_drawer | ( | ) |
empty constructor
Definition at line 19 of file MC_opengl_drawer.cpp.
Referenced by draw(), and draw_triangular().

| static const MC_opengl_drawer mesh_conv::MC_opengl_drawer::draw | ( | const std::vector< T > & | to_draw | ) | [inline, static] |
draw a vector of drawable structure
Definition at line 121 of file MC_opengl_drawer.hpp.
References draw(), and MC_opengl_drawer().
00122 { 00123 for(int k=0,N=to_draw.size();k<N;++k) 00124 MC_opengl_drawer::draw(to_draw[k]); 00125 return MC_opengl_drawer(); 00126 }

| static void mesh_conv::MC_opengl_drawer::draw | ( | const object::MC_bounding_box_oriented & | bb | ) | [static] |
draw an oriented bounding box
| const MC_polygon & mesh_conv::MC_opengl_drawer::draw | ( | const MC_polygon & | polygon | ) | [static] |
draw a MC_polygon
Definition at line 398 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_polygon::normal(), mesh_conv::MC_v3d::pointer(), and mesh_conv::MC_v3d_vector::size().
00399 { 00400 int N=polygon.size(); 00401 MC_v3d n=polygon.normal(); 00402 00403 glBegin(GL_POLYGON); 00404 glNormal3dv(n.pointer()); 00405 for(int k=0;k<N;++k) 00406 glVertex3dv(polygon[k].pointer()); 00407 glEnd(); 00408 00409 return polygon; 00410 }

| const std::vector< MC_curve > & mesh_conv::MC_opengl_drawer::draw | ( | const std::vector< MC_curve > & | curves | ) | [static] |
draw a vector of MC_curve
Definition at line 391 of file MC_opengl_drawer.cpp.
References draw().
00392 { 00393 int N=curves.size(); 00394 for(int k=0;k<N;++k) 00395 draw(curves[k]); 00396 return curves; 00397 }

draw a MC_curve
Definition at line 297 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_v3d_vector::size().
00298 { 00299 int N=curve.size(); 00300 glBegin(GL_LINE_STRIP); 00301 for(int k=0;k<N;++k) 00302 glVertex3dv(curve[k].pointer()); 00303 glEnd(); 00304 00305 return curve; 00306 }

| const std::vector< MC_segment > & mesh_conv::MC_opengl_drawer::draw | ( | const std::vector< MC_segment > & | segments | ) | [static] |
draw a vector of MC_segment
Definition at line 285 of file MC_opengl_drawer.cpp.
| const MC_segment & mesh_conv::MC_opengl_drawer::draw | ( | const MC_segment & | segment | ) | [static] |
draw a MC_segment
Definition at line 277 of file MC_opengl_drawer.cpp.
| const MC_mesh_fast_draw & mesh_conv::MC_opengl_drawer::draw | ( | const MC_mesh_fast_draw & | mesh | ) | [static] |
draw a MC_mesh_fast_draw
Definition at line 90 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_fast_draw::color(), mesh_conv::MC_mesh_fast_draw::connectivity(), mesh_conv::MC_mesh_fast_draw::normal(), mesh_conv::MC_mesh_fast_draw::point_set(), mesh_conv::MC_int_vector::pointer(), mesh_conv::MC_double_vector::pointer(), mesh_conv::MC_int_vector::size(), mesh_conv::MC_double_vector::size(), and mesh_conv::MC_mesh_fast_draw::texture().
00091 { 00092 const MC_double_vector& vertex=mesh.point_set(); 00093 const MC_double_vector& color=mesh.color(); 00094 const MC_double_vector& texture=mesh.texture(); 00095 const MC_double_vector& normal=mesh.normal(); 00096 const std::map <int,MC_int_vector>& connectivity=mesh.connectivity(); 00097 00098 const double* p_vertex=vertex.pointer(); 00099 const double* p_color=color.pointer(); 00100 const double* p_texture=texture.pointer(); 00101 const double* p_normal=normal.pointer(); 00102 00103 glEnable(GL_LIGHTING); 00104 glEnable(GL_BLEND); 00105 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 00106 glEnable(GL_COLOR_MATERIAL); 00107 00108 00109 00110 bool is_color=(color.size()==vertex.size()); 00111 bool is_texture=(texture.size()!=0); 00112 00113 00114 std::map <int,MC_int_vector>:: const_iterator it; 00115 for(it=connectivity.begin();it!=connectivity.end();++it) 00116 { 00117 int current_size=it->first; 00118 const MC_int_vector& current_connectivity=it->second; 00119 const int* p_connectivity=current_connectivity.pointer(); 00120 00121 if(current_size==3 || current_size==4) 00122 { 00123 glEnableClientState(GL_VERTEX_ARRAY); 00124 glEnableClientState(GL_NORMAL_ARRAY); 00125 if(is_color) 00126 glEnableClientState(GL_COLOR_ARRAY); 00127 if(is_texture) 00128 { 00129 //glEnable(GL_TEXTURE_2D); 00130 glEnableClientState(GL_TEXTURE_COORD_ARRAY); 00131 } 00132 00133 glVertexPointer(3,GL_DOUBLE,0,p_vertex); 00134 glNormalPointer(GL_DOUBLE,0,p_normal); 00135 if(is_color) 00136 glColorPointer(3,GL_DOUBLE,0,p_color); 00137 if(is_texture) 00138 glTexCoordPointer(2,GL_DOUBLE,0,p_texture); 00139 00140 00141 00142 if(current_size==3) 00143 glDrawElements(GL_TRIANGLES,current_connectivity.size(),GL_UNSIGNED_INT,p_connectivity); 00144 else 00145 glDrawElements(GL_QUADS,current_connectivity.size(),GL_UNSIGNED_INT,p_connectivity); 00146 00147 glDisableClientState(GL_VERTEX_ARRAY); 00148 glDisableClientState(GL_NORMAL_ARRAY); 00149 glDisableClientState(GL_COLOR_ARRAY); 00150 glDisableClientState(GL_TEXTURE_COORD_ARRAY); 00151 } 00152 else 00153 { 00154 for(int k_polygon=0;k_polygon<current_connectivity.size();k_polygon+=current_size) 00155 { 00156 glBegin(GL_POLYGON); 00157 for(int k_size=0;k_size<current_size;++k_size) 00158 { 00159 if(is_color==true) 00160 glColor3dv( p_color+3*current_connectivity[k_polygon+k_size] ); 00161 if(is_texture==true) 00162 glTexCoord2dv( p_texture+2*current_connectivity[k_polygon+k_size] ); 00163 glNormal3dv( p_normal+3*current_connectivity[k_polygon+k_size] ); 00164 glVertex3dv( p_vertex+3*current_connectivity[k_polygon+k_size] ); 00165 00166 } 00167 glEnd(); 00168 } 00169 00170 } 00171 } 00172 00173 00174 glDisable(GL_LIGHTING); 00175 glDisable(GL_BLEND); 00176 00177 return mesh; 00178 }

| const MC_mesh_index_vector_draw & mesh_conv::MC_opengl_drawer::draw | ( | const MC_mesh_index_vector_draw & | mesh | ) | [static] |
draw a MC_mesh_index_vector_draw
Definition at line 181 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_index_vector_draw::color(), mesh_conv::MC_mesh_index_vector::connectivity(), mesh_conv::MC_mesh_index_vector_draw::normal(), mesh_conv::MC_mesh_index_vector::point_set(), mesh_conv::MC_v3d::pointer(), mesh_conv::MC_mesh_index_vector::polygon_number(), mesh_conv::MC_int_vector::size(), mesh_conv::MC_int_vector_vector::size(), mesh_conv::MC_v3d_vector::size(), mesh_conv::MC_mesh_index_vector_draw::texture(), and mesh_conv::MC_mesh_index_vector_draw::texture_connectivity().
00182 { 00183 00184 bool is_vertex_normal = (mesh.normal().size()==mesh.point_set().size()); 00185 bool is_vertex_color = (mesh.color().size()==mesh.point_set().size()); 00186 bool is_texture = (mesh.texture().size()!=0 && mesh.texture_connectivity().size()==mesh.polygon_number()); 00187 // if(is_texture) 00188 // { 00189 // //glEnable(GL_TEXTURE_2D); 00190 // //glBindTexture(GL_TEXTURE_2D,1); 00191 // glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 00192 // } 00193 00194 //std::cout<<is_texture<<std::endl; 00195 00196 // alpha channel 00197 glEnable(GL_BLEND); 00198 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 00199 glEnable(GL_COLOR_MATERIAL); 00200 glEnable(GL_LIGHTING); 00201 00202 int N_polygon=mesh.polygon_number(); 00203 for(int k_polygon=0;k_polygon<N_polygon;k_polygon++) 00204 { 00205 MC_int_vector index=mesh.connectivity()(k_polygon); 00206 00207 MC_int_vector index_texture; 00208 if(is_texture==true) 00209 index_texture=mesh.texture_connectivity()(k_polygon); 00210 00211 int poly_size=index.size(); 00212 00213 glBegin(GL_POLYGON); 00214 for(int k_vertex=0;k_vertex<poly_size;++k_vertex) 00215 { 00216 int u=index(k_vertex); 00217 00218 MC_v3d x=mesh.point_set()[u]; 00219 if(is_vertex_normal) 00220 {MC_v3d n=mesh.normal()[u];glNormal3dv(n.pointer());} 00221 if(is_vertex_color) 00222 {MC_v3d c=mesh.color()[u];glColor3dv(c.pointer());} 00223 if(is_texture) 00224 { 00225 int utex=index_texture(k_vertex); 00226 MC_v3d t=mesh.texture()[utex]; 00227 00228 glTexCoord2dv(t.pointer()); 00229 00230 } 00231 00232 glVertex3dv(x.pointer()); 00233 } 00234 glEnd(); 00235 } 00236 00237 00238 glDisable(GL_BLEND); 00239 00240 return mesh; 00241 }
| const MC_mesh_index_vector & mesh_conv::MC_opengl_drawer::draw | ( | const MC_mesh_index_vector & | mesh | ) | [static] |
draw a MC_mesh_index_vector
Definition at line 56 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_index_vector::get_polygon(), mesh_conv::MC_polygon::normal(), mesh_conv::MC_mesh_index_vector::polygon_number(), and mesh_conv::MC_mesh_index_vector::polygon_size().
Referenced by draw(), draw_normal_per_polygon(), draw_sphere(), and send_gpu().
00057 { 00058 00059 // alpha channel 00060 glEnable(GL_BLEND); 00061 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 00062 00063 int N_polygon=mesh.polygon_number(); 00064 for(int k_polygon=0;k_polygon<N_polygon;k_polygon++) 00065 { 00066 int poly_size=mesh.polygon_size(k_polygon); 00067 MC_polygon p=mesh.get_polygon(k_polygon); 00068 00069 00070 //normal 00071 MC_v3d n=p.normal(); 00072 glNormal3d(n[0],n[1],n[2]); 00073 00074 glBegin(GL_POLYGON); 00075 for(int k_vertex=0;k_vertex<poly_size;k_vertex++) 00076 { 00077 MC_v3d x=p[k_vertex]; 00078 glVertex3d(x[0],x[1],x[2]); 00079 } 00080 glEnd(); 00081 } 00082 00083 00084 glDisable(GL_BLEND); 00085 00086 return mesh; 00087 }


| const MC_mesh_fast_draw & mesh_conv::MC_opengl_drawer::draw_grid | ( | const MC_mesh_fast_draw & | mesh | ) | [static] |
draw a grid of a fast draw mesh
Definition at line 359 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_fast_draw::connectivity(), mesh_conv::MC_mesh_fast_draw::point_set(), and mesh_conv::MC_double_vector::pointer().
00360 { 00361 std::map<int,MC_int_vector> connec=mesh.connectivity(); 00362 std::map<int,MC_int_vector> ::const_iterator it_connec=connec.begin(); 00363 std::map<int,MC_int_vector> ::const_iterator it_connec_end=connec.end(); 00364 00365 const double* v=mesh.point_set().pointer(); 00366 00367 for(;it_connec!=it_connec_end;it_connec++) 00368 { 00369 00370 int N_size=it_connec->first; 00371 int N_poly=it_connec->second.size()/N_size; 00372 00373 for(int k_poly=0;k_poly<N_poly;++k_poly) 00374 { 00375 glBegin(GL_LINE_STRIP); 00376 for(int k_vertex=0;k_vertex<=N_size;++k_vertex) 00377 { 00378 int index=it_connec->second(k_poly*N_size+k_vertex%N_size); 00379 glVertex3dv(v+3*index); 00380 } 00381 glEnd(); 00382 } 00383 00384 00385 00386 } 00387 00388 00389 return mesh; 00390 }

| const MC_mesh_index_vector & mesh_conv::MC_opengl_drawer::draw_grid | ( | const MC_mesh_index_vector & | mesh | ) | [static] |
draw a grid of a mesh
Definition at line 344 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_index_vector::connectivity(), mesh_conv::MC_mesh_index_vector::point_set(), mesh_conv::MC_mesh_index_vector::polygon_number(), and mesh_conv::MC_int_vector::size().
Referenced by send_gpu_grid().
00345 { 00346 int N=mesh.polygon_number(); 00347 for(int k=0;k<N;++k) 00348 { 00349 glBegin(GL_LINE_STRIP); 00350 MC_int_vector index=mesh.connectivity()(k); 00351 int N_size=index.size(); 00352 for(int k_poly=0;k_poly<=N_size;++k_poly) 00353 glVertex3dv(mesh.point_set()(index(k_poly%N_size)).pointer()); 00354 glEnd(); 00355 } 00356 00357 return mesh; 00358 }


| const MC_mesh_index_vector & mesh_conv::MC_opengl_drawer::draw_normal_per_polygon | ( | const MC_mesh_index_vector & | mesh, | |
| const double & | L = 0.1 | |||
| ) | [static] |
draw the per-polygon normals
Definition at line 412 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_polygon::barycenter(), draw(), mesh_conv::MC_mesh_index_vector::get_polygon(), mesh_conv::MC_mesh_index_vector::normal_polygon(), mesh_conv::MC_v3d_vector::size(), and mesh_conv::MC_v3d_vector::zeros().
00413 { 00414 MC_v3d_vector nn=mesh.normal_polygon(); 00415 MC_v3d_vector bar=MC_v3d_vector::zeros(nn.size()); 00416 for(int k=0,N=nn.size();k<N;++k) 00417 bar[k]=mesh.get_polygon(k).barycenter(); 00418 for(int k=0,N=nn.size();k<N;++k) 00419 draw(MC_segment(bar[k],bar[k]+L*nn[k])); 00420 return mesh; 00421 }

| void mesh_conv::MC_opengl_drawer::draw_per_polygon_color | ( | const MC_mesh_index_vector & | mesh, | |
| const MC_v3d_vector & | color_per_polygon | |||
| ) | [static] |
draw a MC_mesh_index_vector with a per polygon color
Definition at line 21 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_index_vector::get_polygon(), mesh_conv::MC_polygon::normal(), mesh_conv::MC_v3d::pointer(), mesh_conv::MC_mesh_index_vector::polygon_number(), mesh_conv::MC_mesh_index_vector::polygon_size(), and mesh_conv::MC_v3d_vector::size().
00022 { 00023 if(color_per_polygon.size()!=mesh.polygon_number()) 00024 {std::cout<<"Error in MC_opengl_drawer::draw_per_polygon_color(), size of color="<<color_per_polygon.size()<<" while polygon number="<<mesh.polygon_number()<<std::endl;exit(-1);} 00025 00026 // alpha channel 00027 glEnable(GL_BLEND); 00028 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 00029 00030 int N_polygon=mesh.polygon_number(); 00031 for(int k_polygon=0;k_polygon<N_polygon;k_polygon++) 00032 { 00033 int poly_size=mesh.polygon_size(k_polygon); 00034 MC_polygon p=mesh.get_polygon(k_polygon); 00035 00036 00037 //normal 00038 MC_v3d n=p.normal(); 00039 glNormal3d(n[0],n[1],n[2]); 00040 00041 const MC_v3d& col=color_per_polygon[k_polygon]; 00042 glColor3dv(col.pointer()); 00043 00044 glBegin(GL_POLYGON); 00045 for(int k_vertex=0;k_vertex<poly_size;k_vertex++) 00046 { 00047 const MC_v3d& x=p[k_vertex]; 00048 glVertex3d(x[0],x[1],x[2]); 00049 } 00050 glEnd(); 00051 } 00052 00053 00054 glDisable(GL_BLEND); 00055 }

| void mesh_conv::MC_opengl_drawer::draw_points | ( | const MC_v3d_vector & | position | ) | [static] |
draw sampled points
Definition at line 313 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_v3d_vector::size().
00314 { 00315 glBegin(GL_POINTS); 00316 for(int k=0,N=position.size();k<N;++k) 00317 glVertex3dv(position[k].pointer()); 00318 glEnd(); 00319 }

| void mesh_conv::MC_opengl_drawer::draw_sphere | ( | const MC_v3d_vector & | position, | |
| const double & | radius = 0.5, |
|||
| const int & | N_subdiv = 2 | |||
| ) | [static] |
draw directly a sphere of given position and radius
compute only one occurence of the sphere and plot the same at different place using glMatrix translation
Definition at line 320 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_index_vector::build_sphere(), draw(), and mesh_conv::MC_v3d_vector::size().
00321 { 00322 MC_mesh_fast_draw sph=MC_mesh_fast_draw(MC_mesh_index_vector::build_sphere(N_subdiv)*radius); 00323 int N=position.size(); 00324 glMatrixMode(GL_MODELVIEW); 00325 00326 for(int k=0;k<N;++k) 00327 { 00328 glPushMatrix(); 00329 glTranslated(position[k][0],position[k][1],position[k][2]); 00330 draw(sph); 00331 glPopMatrix(); 00332 } 00333 }

| void mesh_conv::MC_opengl_drawer::draw_sphere | ( | const MC_v3d & | position, | |
| const double & | radius = 0.5, |
|||
| const int & | N_subdiv = 2 | |||
| ) | [static] |
draw directly a sphere of given position and radius
Definition at line 309 of file MC_opengl_drawer.cpp.
References mesh_conv::MC_mesh_index_vector::build_sphere(), and draw().
00310 { 00311 draw(MC_mesh_fast_draw(MC_mesh_index_vector::build_sphere(N_subdiv)*radius+position)); 00312 }

| MC_opengl_drawer mesh_conv::MC_opengl_drawer::draw_triangular | ( | const mesh::cgal::MC_mesh_cgal & | mesh | ) | [static] |
draw a MC_mesh_cgal (the mesh sould be made of triangles only)
Definition at line 423 of file MC_opengl_drawer.cpp.
References MC_opengl_drawer().
00424 { 00425 std::cout<<"Warning MC_opengl_drawer::draw_triangular not implemented"<<std::endl; 00426 exit(-1); 00427 //mesh::cgal::MC_mesh_cgal_drawer::draw_triangular(mesh); 00428 return MC_opengl_drawer(); 00429 }

| GLuint mesh_conv::MC_opengl_drawer::send_gpu | ( | const MC_mesh_fast_draw & | mesh | ) | [static] |
send a geometry to the GPU (use VBO or draw_list depending on the graphics card)
Definition at line 243 of file MC_opengl_drawer.cpp.
References draw().
00244 { 00245 GLuint new_draw_list=glGenLists(1); 00246 glNewList(new_draw_list,GL_COMPILE); 00247 MC_opengl_drawer::draw(mesh); 00248 glEndList(); 00249 // 00250 // 00251 // 00252 // const MC_double_vector& vertex=mesh.point_set(); 00253 // const MC_double_vector& color=mesh.color(); 00254 // const MC_double_vector& texture=mesh.texture(); 00255 // const MC_double_vector& normal=mesh.normal(); 00256 // const std::map <int,MC_int_vector>& connectivity=mesh.connectivity(); 00257 // 00258 // const double* p_vertex=vertex.pointer(); 00259 // const double* p_color=color.pointer(); 00260 // const double* p_texture=texture.pointer(); 00261 // const double* p_normal=normal.pointer(); 00262 // 00263 // GLuint vboId=0; 00264 // glGenBuffersARB(1, &vboId); 00265 // glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboId); 00266 // glBufferDataARB(GL_ARRAY_BUFFER_ARB, vertex.size(), p_vertex, GL_STATIC_DRAW_ARB); 00267 // glEnableClientState (GL_VERTEX_ARRAY); 00268 // 00269 // 00270 // vboId2 = createVBO(teapotIndices, sizeof(teapotIndices), GL_ELEMENT_ARRAY_BUFFER_ARB, GL_STATIC_DRAW_ARB); 00271 // 00272 00273 00274 return new_draw_list; 00275 }

| GLuint mesh_conv::MC_opengl_drawer::send_gpu_grid | ( | const MC_mesh_index_vector & | mesh | ) | [static] |
send a geometry grid to the GPU
Definition at line 336 of file MC_opengl_drawer.cpp.
References draw_grid().
00337 { 00338 GLuint new_draw_list=glGenLists(1); 00339 glNewList(new_draw_list,GL_COMPILE); 00340 MC_opengl_drawer::draw_grid(mesh); 00341 glEndList(); 00342 return new_draw_list; 00343 }

1.6.1