Commit 3aebaa02 authored by Thibault Soucarre's avatar Thibault Soucarre

using float instead of double for Element_pos

parent c3a29831
...@@ -92,7 +92,7 @@ typedef long Element_count; ...@@ -92,7 +92,7 @@ typedef long Element_count;
/*! /*!
* \brief Unity for variables of position of a element in the display such as height, abscissa... * \brief Unity for variables of position of a element in the display such as height, abscissa...
*/ */
typedef double Element_pos; typedef float Element_pos;
/*! /*!
* \brief Unity for colors * \brief Unity for colors
......
...@@ -146,7 +146,7 @@ void Render_alternate::resizeGL(int width, int height) { ...@@ -146,7 +146,7 @@ void Render_alternate::resizeGL(int width, int height) {
if(_state == DRAWING_STATE_WAITING) if(_state == DRAWING_STATE_WAITING)
_projection = glm::ortho(-50, 50, -50, 50);//, 0, 1); _projection = glm::ortho(-50, 50, -50, 50);//, 0, 1);
else if(_state == DRAWING_STATE_DRAWING) else if(_state == DRAWING_STATE_DRAWING)
_projection = glm::ortho(0., Info::Render::width, 0., Info::Render::height, 0., 100.); _projection = glm::ortho(0.f, Info::Render::width, 0.f, Info::Render::height, 0.f, 100.f);
else{ else{
message << tr("Undefined value for the drawing state attribute - Render area").toStdString() << Message::ende; message << tr("Undefined value for the drawing state attribute - Render area").toStdString() << Message::ende;
} }
......
...@@ -72,8 +72,8 @@ private: ...@@ -72,8 +72,8 @@ private:
std::ofstream _svg_file; std::ofstream _svg_file;
std::string _filename; std::string _filename;
double _y_min; Element_pos _y_min;
double _y_max; Element_pos _y_max;
/*! /*!
* \brief Contains container text coordinates. * \brief Contains container text coordinates.
*/ */
......
...@@ -156,7 +156,7 @@ void Vbo::config(){ ...@@ -156,7 +156,7 @@ void Vbo::config(){
//Select VBO //Select VBO
glBindBuffer(GL_ARRAY_BUFFER, _vboID); glBindBuffer(GL_ARRAY_BUFFER, _vboID);
//Send vertex //Send vertex
glVertexAttribPointer(0, 2, GL_DOUBLE, GL_FALSE, 0, BUFFER_OFFSET(0)); glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, BUFFER_OFFSET(0));
glEnableVertexAttribArray(0); glEnableVertexAttribArray(0);
//Send colors //Send colors
if(colors_size>0){ if(colors_size>0){
......
...@@ -610,7 +610,7 @@ public: ...@@ -610,7 +610,7 @@ public:
const Variable *variable; const Variable *variable;
// find container needs to know the position of each container // find container needs to know the position of each container
double yr = y; Element_pos yr = y;
const Container::Vector *root_containers = trace->get_view_root_containers(); const Container::Vector *root_containers = trace->get_view_root_containers();
if(root_containers->empty())root_containers= trace->get_root_containers(); if(root_containers->empty())root_containers= trace->get_root_containers();
if (!root_containers->empty()) if (!root_containers->empty())
...@@ -751,7 +751,7 @@ public: ...@@ -751,7 +751,7 @@ public:
} }
} }
const Container *search_container_by_position(const Container *container, double &y) { const Container *search_container_by_position(const Container *container, Element_pos &y) {
const Container *result; const Container *result;
// Search if the result is a descendant // Search if the result is a descendant
const Container::Vector *children = container->get_view_children();//we want to display only children meant to be displayed const Container::Vector *children = container->get_view_children();//we want to display only children meant to be displayed
......
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