File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ sub make_func {
112112 }
113113}
114114
115- make_func($_) for qw(gl_line_strip gl_points );
115+ make_func($_) for qw(gl_line_strip);
116116
117117pp_def('gl_line_strip_multi',
118118 GenericTypes => $F,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use OpenGL qw/
1616 GL_FLAT
1717 GL_LIGHTING_BIT GL_POSITION GL_LIGHTING GL_LIGHT0 GL_LIGHT_MODEL_TWO_SIDE
1818 GL_COMPILE GL_ENABLE_BIT GL_DEPTH_TEST GL_TRUE
19- GL_LINE_STRIP GL_TRIANGLES GL_LINES
19+ GL_LINE_STRIP GL_TRIANGLES GL_LINES GL_POINTS
2020 GL_COLOR_MATERIAL GL_QUADS GL_MODELVIEW GL_PROJECTION
2121 GL_RGB GL_FLOAT GL_UNSIGNED_INT
2222 GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_TEXTURE_MAG_FILTER
@@ -168,7 +168,13 @@ sub PDL::Graphics::TriD::GObject::togl {
168168
169169sub PDL ::Graphics::TriD::Points::gdraw {
170170 my ($this ,$points ) = @_ ;
171- PDL::gl_points_col($points ,$this -> {Colors });
171+ glEnableClientState(GL_VERTEX_ARRAY);
172+ glVertexPointer_c(3, GL_FLOAT, 0, $points -> make_physical-> address_data);
173+ glEnableClientState(GL_COLOR_ARRAY);
174+ glColorPointer_c(3, GL_FLOAT, 0, $this -> {Colors }-> make_physical-> address_data);
175+ glDrawArrays(GL_POINTS, 0, $points -> nelem / $points -> dim(0));
176+ glDisableClientState(GL_VERTEX_ARRAY);
177+ glDisableClientState(GL_COLOR_ARRAY);
172178}
173179
174180sub PDL ::Graphics::TriD::Spheres::gdraw {
You can’t perform that action at this time.
0 commit comments