[DEV] integrate GLD

This commit is contained in:
Edouard DUPIN 2021-12-15 22:34:16 +01:00
parent ea2b69fa16
commit cf37100dbb
11 changed files with 35 additions and 39 deletions

View File

@ -3,7 +3,7 @@
"group-id":"com.atria-soft",
"description":"Ewol Game engine",
"license":"MPL-2",
"license-file":"file://LICENCE.txt",
"license-file":"file://LICENSE",
"maintainer":"file://authors.txt",
"author":"file://authors.txt",
"version":"file://version.txt",
@ -103,8 +103,7 @@
"."
],
"compilation-version": {
"language": "c++",
"version": 2017
"c++": 2017
},
"dependency": [
"ewol",
@ -120,14 +119,11 @@
"path":"data/material.*"
}
],
"flag": [
{
"language": "c++",
"value": [
"-Wno-write-strings",
"-Wmissing-field-initializers",
"-Wall"
]
}
]
"flag": {
"c++": [
"-Wno-write-strings",
"-Wmissing-field-initializers",
"-Wall"
]
}
}

View File

@ -197,9 +197,9 @@ void ege::resource::Mesh::draw(mat4& _positionMatrix,
vec3 cameraNormal = vec3(0,0,-1);
cameraNormal.normalized();
// remove face that is notin the view ...
List<uint32_t> tmpIndexResult;
List<ege::Face>& tmppFaces = m_listFaces.getValue(kkk).m_faces;
//List<uint32_t>& tmppIndex = m_listFaces.getValue(kkk).m_index;
etk::Vector<uint32_t> tmpIndexResult;
etk::Vector<ege::Face>& tmppFaces = m_listFaces.getValue(kkk).m_faces;
//etk::Vector<uint32_t>& tmppIndex = m_listFaces.getValue(kkk).m_index;
switch(m_normalMode) {
case ege::resource::Mesh::normalMode::face:
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,
ememory::SharedPtr<ewol::resource::Colored3DObject> _draw) {
etk::Color<float> tmpColor(0.0, 1.0, 0.0, 1.0);
List<vec3> vertices;
etk::Vector<vec3> vertices;
// generate element in 2 pass :
// - create new index dependeng a vertex is a unique componenet of position, texture, normal
// - the index list generation (can be dynamic ... (TODO later)
@ -381,7 +381,7 @@ void ege::resource::Mesh::calculateNormaleEdge(const etk::String& _materialName)
return;
}
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);
// 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++) {
@ -646,13 +646,13 @@ void ege::resource::Mesh::addLine(const etk::String& _layerName, const vec3& _po
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) {
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()) {
EGE_ERROR("Can not add line with changing color without same number of color");
return;
@ -735,7 +735,7 @@ void ege::resource::Mesh::addTriangle(const etk::String& _layerName, const vec3&
}
#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) {
if (it == 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);
tmpElement->setListOfVertex(m_listVertex);
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) {
index.pushBack(it.m_vertex[0]);
index.pushBack(it.m_vertex[1]);

View File

@ -105,14 +105,14 @@ namespace ege {
MaterialGlId m_GLMaterial;
ege::Light m_light;
protected:
List<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)
List<etk::Color<float>> m_listColor; //!< List of all Color point in the mesh
List<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_listVertex; //!< List of all vertex in the element
etk::Vector<vec2> m_listUV; //!< List of all UV point in the mesh (for the specify texture)
etk::Vector<etk::Color<float>> m_listColor; //!< List of all Color point in the mesh
etk::Vector<vec3> m_listFacesNormal; //!< 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,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();
protected:
ememory::SharedPtr<gale::resource::VirtualBufferObject> m_verticesVBO;
@ -162,7 +162,7 @@ namespace ege {
bool getCheckNormal() {
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) {
if (_shape == null) {
return;
@ -203,8 +203,8 @@ namespace ege {
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 addLines(const etk::String& _layerName, const List<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::Color<float>& _color);
void addLines(const etk::String& _layerName, const etk::Vector<vec3>& _list, const etk::Vector<etk::Color<float>>& _color);
/**
* @not_in_doc

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : CameraPisition",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : Collision",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : DoubleView",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : Artificial intelligence",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : Low poly test",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : MeshCreator",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : RayTest",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",

View File

@ -4,7 +4,7 @@
"group-id":"com.atria-soft",
"description":"Ege sample : Torque Apply",
"license":"MPL-2",
"license-file":"file://../../LICENCE.txt",
"license-file":"file://../../LICENSE",
"maintainer":"file://../../authors.txt",
"author":"file://../../authors.txt",
"version":"file://../../version.txt",