mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
VertexArray stuff and variable order test to sort Linux crash
This commit is contained in:
parent
26b2f2cfe6
commit
bf4fafb862
@ -189,18 +189,16 @@ void gFlagsLine::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
glLineWidth (1.5);
|
||||
} else glLineWidth (1);
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
if (quadcnt>0) {
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_SHORT, 0, quadarray);
|
||||
glDrawArrays(GL_QUADS, 0, quadcnt>>1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
}
|
||||
if (vertcnt>0) {
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertarray);
|
||||
glDrawArrays(GL_LINES, 0, vertcnt>>1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
}
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
if (antialias) {
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
glDisable(GL_BLEND);
|
||||
|
@ -448,7 +448,6 @@ void gLineChart::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertarray);
|
||||
//glColor4ub(m_line_color.red(),m_line_color.green(),m_line_color.blue(),255);
|
||||
w.qglColor(m_line_color);
|
||||
glDrawArrays(GL_LINES, 0, vertcnt>>1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
|
@ -140,26 +140,26 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
glLineWidth (1.5);
|
||||
} else glLineWidth (1);
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glColor4ub(col.red(),col.green(),col.blue(),col.alpha());
|
||||
if (quadcnt>0) {
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
//glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_SHORT, 0, quadarray);
|
||||
glDrawArrays(GL_QUADS, 0, quadcnt>>1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
//glDisableClientState(GL_VERTEX_ARRAY);
|
||||
}
|
||||
if (vertcnt>0) {
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
//glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertarray);
|
||||
glDrawArrays(GL_LINES, 0, vertcnt>>1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
//glDisableClientState(GL_VERTEX_ARRAY);
|
||||
}
|
||||
if (pointcnt>0) {
|
||||
glPointSize(4);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(2, GL_SHORT, 0, pointarray);
|
||||
glDrawArrays(GL_POINTS, 0, pointcnt>>1);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
}
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
|
||||
if (antialias) {
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
|
@ -37,14 +37,13 @@ public:
|
||||
virtual bool isEmpty();
|
||||
inline const ChannelID & code() { return m_code; }
|
||||
protected:
|
||||
Day *m_day;
|
||||
bool m_visible;
|
||||
bool m_movable;
|
||||
|
||||
qint64 m_minx,m_maxx;
|
||||
EventDataType m_miny,m_maxy;
|
||||
Day *m_day;
|
||||
ChannelID m_code;
|
||||
QString m_title;
|
||||
ChannelID m_code;
|
||||
};
|
||||
|
||||
class gLayerGroup:public gLayer
|
||||
|
@ -873,10 +873,10 @@ void gGraphWindow::paintGL()
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
glColor4ub(140,50,200,64);
|
||||
glColor4ub(140,140,140,64);
|
||||
glVertex2f(m_mouseRBrect.x(),m_mouseRBrect.y());
|
||||
glVertex2f(m_mouseRBrect.x()+m_mouseRBrect.width(),m_mouseRBrect.y());
|
||||
glColor4ub(50,50,200,64);
|
||||
glColor4ub(50,50,200,128);
|
||||
glVertex2f(m_mouseRBrect.x()+m_mouseRBrect.width(),m_mouseRBrect.y()+m_mouseRBrect.height());
|
||||
glVertex2f(m_mouseRBrect.x(),m_mouseRBrect.y()+m_mouseRBrect.height());
|
||||
glEnd();
|
||||
|
Loading…
Reference in New Issue
Block a user