Commit ceaceb7a authored by Olivier Lagrasse's avatar Olivier Lagrasse

Quick commit for Mateo :p

parent d27a255d
......@@ -123,7 +123,6 @@ doc:
@echo " "
clean:
make -C \$(OTFLIB_DIR) clean
cd ./src && make clean
\$(RM) log.txt
@echo " "
......@@ -132,6 +131,7 @@ clean:
cleanall: clean
make -C \$(OTFLIB_DIR) clean
make -C \$(DOCUMENTATION)/user_manual cleanall
make -C \$(DOCUMENTATION)/technical_manual cleanall
@(cd bin/ && \$(RM) vite)
......
......@@ -86,6 +86,13 @@ public:
*/
const static QByteArray DEFAULT_STATE;
};
/*!
* \brief Sub structure to store render information.
*/
struct Render{
};
};
#endif
......@@ -65,7 +65,7 @@ const int Hook_event::_ctrl_zoom_factor = 3;
void Hook_event::updateRender(){
_render_instance->update();
_render_instance->updateGL();
}
......
......@@ -286,7 +286,7 @@ public:
*/
inline void start_draw_arrows(){
drawing_instance->start_draw_arrows();
drawing_instance->set_color(1, 1, 0);
drawing_instance->set_color(1, 1, 1);
}
/*!
......
......@@ -165,14 +165,12 @@ void Render_opengl::resizeGL(int width, int height) {
}
/*void Render_opengl::paintGL(){
void Render_opengl::paintGL(){
// paintEvent(NULL);
cout << __FILE__ << " " << __LINE__ << endl;
}*/
// cout << __FILE__ << " " << __LINE__ << endl;
//}
void Render_opengl::paintEvent(QPaintEvent *)
{
resizeGL(Render_opengl::QGLWidget::width(), Render_opengl::QGLWidget::height());
Render_opengl::QGLWidget::setFocus(Qt::ActiveWindowFocusReason);/* give the focus to the render area for mouse and keyboard events */
......@@ -374,13 +372,13 @@ void Render_opengl::resizeGL(int width, int height) {
}
QFont font("Arial", 15);
/* QFont font("Arial", 15);
font.setStyle(QFont::StyleOblique);
painter.setFont(font);
painter.setOpacity(0.5);
painter.drawText(Info::Screen::width-320, Info::Screen::height-10, "Rendering mode - work in progress");
*/
painter.end();
......@@ -562,9 +560,9 @@ GLuint Render_opengl::draw_wait() {
if (_wait_timer == NULL){
_wait_angle = 0.0f;
_wait_timer = new QTimer(this);
connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
_wait_timer->start(_wait_spf);
// _wait_timer = new QTimer(this);
//connect(_wait_timer, SIGNAL(timeout()), _render_instance, SLOT(updateGL()));
//_wait_timer->start(_wait_spf);
}
return object;
......@@ -670,7 +668,6 @@ void Render_opengl::call_ruler(){
// Info::Render::_ui_render_max_value->setText(buf_txt.str().c_str());
// }
set_color(1, 1, 0);
for (Element_pos i = Info::Render::_x_min_visible ; i < Info::Render::_x_max_visible ; i+=graduation_diff){
const Element_pos grad_div_by_5 = graduation_diff/5;
for (Element_pos j = (i+grad_div_by_5) ; j<(i+graduation_diff) ; j+= grad_div_by_5){
......@@ -681,7 +678,7 @@ void Render_opengl::call_ruler(){
draw_line( trace_to_render_x(i) + offset_x, offset_y ,
trace_to_render_x(i) + offset_x, 4+offset_y, _z_ruler);
// buf_txt.str("");/* flush the buffer */
// buf_txt.str("");/* flush the buffer */
//buf_txt << Ruler::get_variable_part(i, coeff_prefix, 2);
/* Draw text with GLUT */
......@@ -709,6 +706,16 @@ void Render_opengl::call_ruler(){
}
glBegin(GL_QUADS);
{
glColor4d(0, 0, 1, 1);
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 0, -2 );
glVertex3d(trace_to_render_x(Info::Render::_x_min_visible) , 5, -2 );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 5, -2 );
glVertex3d(trace_to_render_x(Info::Render::_x_max_visible) , 0, -2 );
}
glEnd();
//painter.setPen(Qt::NoPen);
//painter.setBrush(QColor(125, 125, 150));
......@@ -924,7 +931,7 @@ void Render_opengl::draw_stored_arrows(){
Element_pos start_time, end_time, start_height, end_height;
Element_pos scaled_start_time, scaled_end_time, scaled_start_height, scaled_end_height;
set_color(1, 1, 0);
set_color(1, 1, 1);
for (unsigned int i=0 ; i<_arrows.size() ; i++){
......@@ -988,7 +995,7 @@ void Render_opengl::draw_stored_circles(){
const float angle = M_PI/2.0f;
const float delta_angle = 2*M_PI/step;
set_color(1, 1, 0);
set_color(1, 1, 1);
for (unsigned int i=0 ; i<_circles.size() ; i++){
......
......@@ -218,7 +218,7 @@ public:
/*!
* \brief Call by the system each time the render area need to be updated.
*/
// void paintGL();
void paintGL();
/***********************************
......@@ -537,7 +537,6 @@ public:
void draw_stored_circles();
void draw_stored_texts();
void paintEvent(QPaintEvent *);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment