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;
/*!
* \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
......
......@@ -146,7 +146,7 @@ void Render_alternate::resizeGL(int width, int height) {
if(_state == DRAWING_STATE_WAITING)
_projection = glm::ortho(-50, 50, -50, 50);//, 0, 1);
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{
message << tr("Undefined value for the drawing state attribute - Render area").toStdString() << Message::ende;
}
......
......@@ -72,8 +72,8 @@ private:
std::ofstream _svg_file;
std::string _filename;
double _y_min;
double _y_max;
Element_pos _y_min;
Element_pos _y_max;
/*!
* \brief Contains container text coordinates.
*/
......
......@@ -156,7 +156,7 @@ void Vbo::config(){
//Select VBO
glBindBuffer(GL_ARRAY_BUFFER, _vboID);
//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);
//Send colors
if(colors_size>0){
......
......@@ -610,7 +610,7 @@ public:
const Variable *variable;
// 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();
if(root_containers->empty())root_containers= trace->get_root_containers();
if (!root_containers->empty())
......@@ -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;
// 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
......
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