[DEV] integrate GLD
This commit is contained in:
parent
ea2b69fa16
commit
cf37100dbb
22
GLD_ege.json
22
GLD_ege.json
@ -3,7 +3,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ewol Game engine",
|
"description":"Ewol Game engine",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://LICENCE.txt",
|
"license-file":"file://LICENSE",
|
||||||
"maintainer":"file://authors.txt",
|
"maintainer":"file://authors.txt",
|
||||||
"author":"file://authors.txt",
|
"author":"file://authors.txt",
|
||||||
"version":"file://version.txt",
|
"version":"file://version.txt",
|
||||||
@ -103,8 +103,7 @@
|
|||||||
"."
|
"."
|
||||||
],
|
],
|
||||||
"compilation-version": {
|
"compilation-version": {
|
||||||
"language": "c++",
|
"c++": 2017
|
||||||
"version": 2017
|
|
||||||
},
|
},
|
||||||
"dependency": [
|
"dependency": [
|
||||||
"ewol",
|
"ewol",
|
||||||
@ -120,14 +119,11 @@
|
|||||||
"path":"data/material.*"
|
"path":"data/material.*"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"flag": [
|
"flag": {
|
||||||
{
|
"c++": [
|
||||||
"language": "c++",
|
"-Wno-write-strings",
|
||||||
"value": [
|
"-Wmissing-field-initializers",
|
||||||
"-Wno-write-strings",
|
"-Wall"
|
||||||
"-Wmissing-field-initializers",
|
]
|
||||||
"-Wall"
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
@ -197,9 +197,9 @@ void ege::resource::Mesh::draw(mat4& _positionMatrix,
|
|||||||
vec3 cameraNormal = vec3(0,0,-1);
|
vec3 cameraNormal = vec3(0,0,-1);
|
||||||
cameraNormal.normalized();
|
cameraNormal.normalized();
|
||||||
// remove face that is notin the view ...
|
// remove face that is notin the view ...
|
||||||
List<uint32_t> tmpIndexResult;
|
etk::Vector<uint32_t> tmpIndexResult;
|
||||||
List<ege::Face>& tmppFaces = m_listFaces.getValue(kkk).m_faces;
|
etk::Vector<ege::Face>& tmppFaces = m_listFaces.getValue(kkk).m_faces;
|
||||||
//List<uint32_t>& tmppIndex = m_listFaces.getValue(kkk).m_index;
|
//etk::Vector<uint32_t>& tmppIndex = m_listFaces.getValue(kkk).m_index;
|
||||||
switch(m_normalMode) {
|
switch(m_normalMode) {
|
||||||
case ege::resource::Mesh::normalMode::face:
|
case ege::resource::Mesh::normalMode::face:
|
||||||
for(size_t iii=0; iii<tmppFaces.size() ; ++iii) {
|
for(size_t iii=0; iii<tmppFaces.size() ; ++iii) {
|
||||||
@ -263,7 +263,7 @@ void ege::resource::Mesh::draw(mat4& _positionMatrix,
|
|||||||
void ege::resource::Mesh::drawNormal(mat4& _positionMatrix,
|
void ege::resource::Mesh::drawNormal(mat4& _positionMatrix,
|
||||||
ememory::SharedPtr<ewol::resource::Colored3DObject> _draw) {
|
ememory::SharedPtr<ewol::resource::Colored3DObject> _draw) {
|
||||||
etk::Color<float> tmpColor(0.0, 1.0, 0.0, 1.0);
|
etk::Color<float> tmpColor(0.0, 1.0, 0.0, 1.0);
|
||||||
List<vec3> vertices;
|
etk::Vector<vec3> vertices;
|
||||||
// generate element in 2 pass :
|
// generate element in 2 pass :
|
||||||
// - create new index dependeng a vertex is a unique componenet of position, texture, normal
|
// - create new index dependeng a vertex is a unique componenet of position, texture, normal
|
||||||
// - the index list generation (can be dynamic ... (TODO later)
|
// - the index list generation (can be dynamic ... (TODO later)
|
||||||
@ -381,7 +381,7 @@ void ege::resource::Mesh::calculateNormaleEdge(const etk::String& _materialName)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for(size_t iii=0 ; iii<m_listVertex.size() ; iii++) {
|
for(size_t iii=0 ; iii<m_listVertex.size() ; iii++) {
|
||||||
List<Face>& tmpFaceList = m_listFaces[_materialName].m_faces;
|
etk::Vector<Face>& tmpFaceList = m_listFaces[_materialName].m_faces;
|
||||||
vec3 normal(0,0,0);
|
vec3 normal(0,0,0);
|
||||||
// add the vertex from all the element in the list for face when the element in the face ...
|
// add the vertex from all the element in the list for face when the element in the face ...
|
||||||
for(size_t jjj=0 ; jjj<tmpFaceList.size() ; jjj++) {
|
for(size_t jjj=0 ; jjj<tmpFaceList.size() ; jjj++) {
|
||||||
@ -646,13 +646,13 @@ void ege::resource::Mesh::addLine(const etk::String& _layerName, const vec3& _po
|
|||||||
m_listFaces[_layerName].m_faces.pushBack(tmpFace);
|
m_listFaces[_layerName].m_faces.pushBack(tmpFace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ege::resource::Mesh::addLines(const etk::String& _layerName, const List<vec3>& _list, const etk::Color<float>& _color) {
|
void ege::resource::Mesh::addLines(const etk::String& _layerName, const etk::Vector<vec3>& _list, const etk::Color<float>& _color) {
|
||||||
for (size_t iii=1; iii<_list.size(); ++iii) {
|
for (size_t iii=1; iii<_list.size(); ++iii) {
|
||||||
addLine(_layerName, _list[iii-1], _list[iii], _color);
|
addLine(_layerName, _list[iii-1], _list[iii], _color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ege::resource::Mesh::addLines(const etk::String& _layerName, const List<vec3>& _list, const List<etk::Color<float>>& _color) {
|
void ege::resource::Mesh::addLines(const etk::String& _layerName, const etk::Vector<vec3>& _list, const etk::Vector<etk::Color<float>>& _color) {
|
||||||
if (_color.size() != _list.size()) {
|
if (_color.size() != _list.size()) {
|
||||||
EGE_ERROR("Can not add line with changing color without same number of color");
|
EGE_ERROR("Can not add line with changing color without same number of color");
|
||||||
return;
|
return;
|
||||||
@ -735,7 +735,7 @@ void ege::resource::Mesh::addTriangle(const etk::String& _layerName, const vec3&
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <ege/physics/shape/Concave.hpp>
|
#include <ege/physics/shape/Concave.hpp>
|
||||||
const List<ememory::SharedPtr<ege::physics::Shape>>& ege::resource::Mesh::getPhysicalProperties() {
|
const etk::Vector<ememory::SharedPtr<ege::physics::Shape>>& ege::resource::Mesh::getPhysicalProperties() {
|
||||||
for (auto &it: m_physics) {
|
for (auto &it: m_physics) {
|
||||||
if (it == null) {
|
if (it == null) {
|
||||||
EGE_WARNING("Get null ... ");
|
EGE_WARNING("Get null ... ");
|
||||||
@ -752,7 +752,7 @@ const List<ememory::SharedPtr<ege::physics::Shape>>& ege::resource::Mesh::getPhy
|
|||||||
//EGE_INFO(" add vertices : " << m_listVertex);
|
//EGE_INFO(" add vertices : " << m_listVertex);
|
||||||
tmpElement->setListOfVertex(m_listVertex);
|
tmpElement->setListOfVertex(m_listVertex);
|
||||||
for (size_t kkk=0; kkk<m_listFaces.size(); ++kkk) {
|
for (size_t kkk=0; kkk<m_listFaces.size(); ++kkk) {
|
||||||
List<uint32_t> index;
|
etk::Vector<uint32_t> index;
|
||||||
for (auto &it : m_listFaces.getValue(kkk).m_faces) {
|
for (auto &it : m_listFaces.getValue(kkk).m_faces) {
|
||||||
index.pushBack(it.m_vertex[0]);
|
index.pushBack(it.m_vertex[0]);
|
||||||
index.pushBack(it.m_vertex[1]);
|
index.pushBack(it.m_vertex[1]);
|
||||||
|
@ -105,14 +105,14 @@ namespace ege {
|
|||||||
MaterialGlId m_GLMaterial;
|
MaterialGlId m_GLMaterial;
|
||||||
ege::Light m_light;
|
ege::Light m_light;
|
||||||
protected:
|
protected:
|
||||||
List<vec3> m_listVertex; //!< List of all vertex in the element
|
etk::Vector<vec3> m_listVertex; //!< List of all vertex in the element
|
||||||
List<vec2> m_listUV; //!< List of all UV point in the mesh (for the specify texture)
|
etk::Vector<vec2> m_listUV; //!< List of all UV point in the mesh (for the specify texture)
|
||||||
List<etk::Color<float>> m_listColor; //!< List of all Color point in the mesh
|
etk::Vector<etk::Color<float>> m_listColor; //!< List of all Color point in the mesh
|
||||||
List<vec3> m_listFacesNormal; //!< List of all Face normal, when calculated
|
etk::Vector<vec3> m_listFacesNormal; //!< List of all Face normal, when calculated
|
||||||
List<vec3> m_listVertexNormal; //!< List of all Face normal, when calculated
|
etk::Vector<vec3> m_listVertexNormal; //!< List of all Face normal, when calculated
|
||||||
etk::Map<etk::String,FaceIndexing> m_listFaces; //!< List of all Face for the mesh
|
etk::Map<etk::String,FaceIndexing> m_listFaces; //!< List of all Face for the mesh
|
||||||
etk::Map<etk::String,ememory::SharedPtr<ege::Material>> m_materials;
|
etk::Map<etk::String,ememory::SharedPtr<ege::Material>> m_materials;
|
||||||
List<ememory::SharedPtr<ege::physics::Shape>> m_physics; //!< collision shape module ... (independent of bullet lib)
|
etk::Vector<ememory::SharedPtr<ege::physics::Shape>> m_physics; //!< collision shape module ... (independent of bullet lib)
|
||||||
void clean();
|
void clean();
|
||||||
protected:
|
protected:
|
||||||
ememory::SharedPtr<gale::resource::VirtualBufferObject> m_verticesVBO;
|
ememory::SharedPtr<gale::resource::VirtualBufferObject> m_verticesVBO;
|
||||||
@ -162,7 +162,7 @@ namespace ege {
|
|||||||
bool getCheckNormal() {
|
bool getCheckNormal() {
|
||||||
return m_checkNormal;
|
return m_checkNormal;
|
||||||
};
|
};
|
||||||
const List<ememory::SharedPtr<ege::physics::Shape>>& getPhysicalProperties();
|
const etk::Vector<ememory::SharedPtr<ege::physics::Shape>>& getPhysicalProperties();
|
||||||
void addPhysicElement(const ememory::SharedPtr<ege::physics::Shape>& _shape) {
|
void addPhysicElement(const ememory::SharedPtr<ege::physics::Shape>& _shape) {
|
||||||
if (_shape == null) {
|
if (_shape == null) {
|
||||||
return;
|
return;
|
||||||
@ -203,8 +203,8 @@ namespace ege {
|
|||||||
addLine( _layerName, _pos1, _pos2, _color, _color);
|
addLine( _layerName, _pos1, _pos2, _color, _color);
|
||||||
}
|
}
|
||||||
void addLine(const etk::String& _layerName, const vec3& _pos1, const vec3& _pos2, const etk::Color<float>& _color1, const etk::Color<float>& _color2);
|
void addLine(const etk::String& _layerName, const vec3& _pos1, const vec3& _pos2, const etk::Color<float>& _color1, const etk::Color<float>& _color2);
|
||||||
void addLines(const etk::String& _layerName, const List<vec3>& _list, const etk::Color<float>& _color);
|
void addLines(const etk::String& _layerName, const etk::Vector<vec3>& _list, const etk::Color<float>& _color);
|
||||||
void addLines(const etk::String& _layerName, const List<vec3>& _list, const List<etk::Color<float>>& _color);
|
void addLines(const etk::String& _layerName, const etk::Vector<vec3>& _list, const etk::Vector<etk::Color<float>>& _color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @not_in_doc
|
* @not_in_doc
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : CameraPisition",
|
"description":"Ege sample : CameraPisition",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : Collision",
|
"description":"Ege sample : Collision",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : DoubleView",
|
"description":"Ege sample : DoubleView",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : Artificial intelligence",
|
"description":"Ege sample : Artificial intelligence",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : Low poly test",
|
"description":"Ege sample : Low poly test",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : MeshCreator",
|
"description":"Ege sample : MeshCreator",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : RayTest",
|
"description":"Ege sample : RayTest",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"group-id":"com.atria-soft",
|
"group-id":"com.atria-soft",
|
||||||
"description":"Ege sample : Torque Apply",
|
"description":"Ege sample : Torque Apply",
|
||||||
"license":"MPL-2",
|
"license":"MPL-2",
|
||||||
"license-file":"file://../../LICENCE.txt",
|
"license-file":"file://../../LICENSE",
|
||||||
"maintainer":"file://../../authors.txt",
|
"maintainer":"file://../../authors.txt",
|
||||||
"author":"file://../../authors.txt",
|
"author":"file://../../authors.txt",
|
||||||
"version":"file://../../version.txt",
|
"version":"file://../../version.txt",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user