Mercurial > hg > octave-lyh
diff src/gl-render.cc @ 7914:e998e81224b5
Various compilation fixes for MSVC.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 10 Jul 2008 08:59:18 -0400 |
parents | c350329da645 |
children | 4976f66d469b |
line wrap: on
line diff
--- a/src/gl-render.cc +++ b/src/gl-render.cc @@ -380,8 +380,6 @@ vertex_data_rep *get_rep (void) const { return rep; } }; -#include <Array.cc> - class opengl_renderer::patch_tesselator : public opengl_tesselator { @@ -2300,7 +2298,8 @@ has_facealpha = ((a.numel () > 0) && (a.rows () == f.rows ())); } - Array2<vertex_data> vdata (f.dims ()); + octave_idx_type fr = f.rows (), fc = f.columns (); + std::vector<vertex_data> vdata (f.numel ()); for (int i = 0; i < nf; i++) for (int j = 0; j < count_f(i); j++) @@ -2333,7 +2332,7 @@ aa = a(idx); } - vdata(i,j) = + vdata[i+j*fr] = vertex_data (vv, cc, nn, aa, as, ds, ss, se); } @@ -2383,7 +2382,7 @@ for (int j = 0; j < count_f(i); j++) { - vertex_data::vertex_data_rep *vv = vdata(i,j).get_rep (); + vertex_data::vertex_data_rep *vv = vdata[i+j*fr].get_rep (); tess.add_vertex (vv->coords.fortran_vec (), vv); } @@ -2443,7 +2442,7 @@ for (int j = 0; j < count_f(i); j++) { - vertex_data::vertex_data_rep *vv = vdata(i,j).get_rep (); + vertex_data::vertex_data_rep *vv = vdata[i+j*fr].get_rep (); tess.add_vertex (vv->coords.fortran_vec (), vv); } @@ -2498,10 +2497,10 @@ continue; Matrix lc = (do_edge ? (mecolor.numel () == 0 ? - vdata(i,j).get_rep ()->color : mecolor) + vdata[i+j*fr].get_rep ()->color : mecolor) : Matrix ()); Matrix fc = (do_face ? (mfcolor.numel () == 0 ? - vdata(i,j).get_rep ()->color : mfcolor) + vdata[i+j*fr].get_rep ()->color : mfcolor) : Matrix ()); draw_marker (v(idx,0), v(idx,1), (has_z ? v(idx,2) : 0), lc, fc);