OPenGL 画连续线
用opengl 响应鼠标移动画线 显示的线条是断断续续的不连续
代码如下:
glBegin(GL_LINE_STRIP);
glVertex2f(PrePos_x,PrePos_y);//起点
glVertex2f(CurrPos_x,CurrPos_y);//终点
glEnd();
后来用点来画 结果画出来的是扇形:
glBegin(GL_LINE_STRIP);
for(int i=m_uVertexNum;i<m_vVerter.size()-1;++i) //m_vVerter是移动时所存储点集
{
glVertex2f(TransePos_x(m_vVerter[i].x),TransePos_y(m_vVerter[i].y));
}
glEnd();
众神有何良策解决???????