From aa17623425cbcbd5e5ab4cf61b39cd4ef6eca87c Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 28 Jan 2013 08:10:10 +0100 Subject: [PATCH] [DEV] try to set the system back to work --- external/etk | 2 +- external/parsersvg | 2 +- sources/ewol/compositing/Drawing.cpp | 2 +- sources/ewol/compositing/Image.cpp | 2 +- sources/ewol/renderer/resources/Colored3DObject.cpp | 2 +- sources/ewol/renderer/resources/MeshObj.cpp | 6 +++--- sources/ewol/renderer/resources/Program.h | 12 ++++++++++-- 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/external/etk b/external/etk index 0c035b17..73efdadd 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 0c035b17f9ee126896a5c62af65d0b77419b3016 +Subproject commit 73efdadd164efce683c6672717d5d8d8d5959474 diff --git a/external/parsersvg b/external/parsersvg index c305574c..b8287243 160000 --- a/external/parsersvg +++ b/external/parsersvg @@ -1 +1 @@ -Subproject commit c305574cfd83c494b3207339330cdf6feda269be +Subproject commit b8287243a8aef3ff97aa608b284e17c847481cd7 diff --git a/sources/ewol/compositing/Drawing.cpp b/sources/ewol/compositing/Drawing.cpp index 69484126..18a6810f 100644 --- a/sources/ewol/compositing/Drawing.cpp +++ b/sources/ewol/compositing/Drawing.cpp @@ -324,7 +324,7 @@ void ewol::Drawing::Draw(void) m_GLprogram->Use(); m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat); // position : - m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &m_coord[0]); + m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &m_coord[0], 4); // color : m_GLprogram->SendAttribute(m_GLColor, 4/*r,g,b,a*/, &m_coordColor[0]); // Request the draw od the elements : diff --git a/sources/ewol/compositing/Image.cpp b/sources/ewol/compositing/Image.cpp index 6868a418..9bf9e607 100644 --- a/sources/ewol/compositing/Image.cpp +++ b/sources/ewol/compositing/Image.cpp @@ -79,7 +79,7 @@ void ewol::Image::Draw(void) // TextureID m_GLprogram->SetTexture0(m_GLtexID, m_resource->GetId()); // position : - m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &m_coord[0]); + m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &m_coord[0], 4); // Texture : m_GLprogram->SendAttribute(m_GLtexture, 2/*u,v*/, &m_coordTex[0]); // color : diff --git a/sources/ewol/renderer/resources/Colored3DObject.cpp b/sources/ewol/renderer/resources/Colored3DObject.cpp index 9a97a4f5..f37c76df 100644 --- a/sources/ewol/renderer/resources/Colored3DObject.cpp +++ b/sources/ewol/renderer/resources/Colored3DObject.cpp @@ -55,7 +55,7 @@ void ewol::Colored3DObject::Draw(etk::Vector& vertices, mat4 tmpMatrix = projMatrix * camMatrix; m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat); // position : - m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0]); + m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &vertices[0], 4); // color : m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color); // Request the draw od the elements : diff --git a/sources/ewol/renderer/resources/MeshObj.cpp b/sources/ewol/renderer/resources/MeshObj.cpp index a7f41636..f2c2f4aa 100644 --- a/sources/ewol/renderer/resources/MeshObj.cpp +++ b/sources/ewol/renderer/resources/MeshObj.cpp @@ -46,17 +46,17 @@ ewol::MeshObj::MeshObj(etk::UString _fileName) : if (inputDataLine[0]=='v') { if (inputDataLine[1]=='n') { // Vertice normal : vn 0.000000 0.000000 -1.000000 - vec3 vertex; + vec3 vertex(0,0,0); sscanf(&inputDataLine[3], "%f %f %f", &vertex.m_floats[0], &vertex.m_floats[1], &vertex.m_floats[1] ); normals.PushBack(vertex); } else if (inputDataLine[1]=='t') { // Texture position : vt 0.748573 0.750412 - vec2 vertex; + vec2 vertex(0,0); sscanf(&inputDataLine[3], "%f %f", &vertex.m_floats[0], &vertex.m_floats[1]); uvTextures.PushBack(vertex); } else { // Vertice position : v 1.000000 -1.000000 -1.000000 - vec3 vertex; + vec3 vertex(0,0,0); sscanf(&inputDataLine[2], "%f %f %f", &vertex.m_floats[0], &vertex.m_floats[1], &vertex.m_floats[1] ); vertices.PushBack(vertex); } diff --git a/sources/ewol/renderer/resources/Program.h b/sources/ewol/renderer/resources/Program.h index bccace9e..e6ad141c 100644 --- a/sources/ewol/renderer/resources/Program.h +++ b/sources/ewol/renderer/resources/Program.h @@ -81,8 +81,16 @@ namespace ewol * @param[in] pointer Pointer on the data that might be sended. * @param[in] jumpBetweenSample Number of byte to jump between 2 vertex (this permit to enterlace informations) */ - void SendAttribute(int32_t idElem, int32_t nbElement, void* pointer, int32_t jumpBetweenSample=0); - void SendAttributePointer(int32_t idElem, int32_t nbElement, ewol::VirtualBufferObject* vbo, int32_t index, int32_t jumpBetweenSample=0, int32_t offset=0); + void SendAttribute(int32_t idElem, + int32_t nbElement, + void* pointer, + int32_t jumpBetweenSample=0); + void SendAttributePointer(int32_t idElem, + int32_t nbElement, + ewol::VirtualBufferObject* vbo, + int32_t index, + int32_t jumpBetweenSample=0, + int32_t offset=0); /** * @brief User request an Uniform on this program. * @note uniform value is availlable for all the fragment shader in the program (only one value for all)