Plugins/Assimp: Fix stack corruption
Former-commit-id: 15b1c22cd0bbb1601e23b1e4bd037fe0cc13ab24
This commit is contained in:
parent
d2a6ead9f3
commit
840b03691a
|
|
@ -1,71 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<title>Avancement de Nazara</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="englob">
|
||||
<img style="display: block;margin-left: auto;margin-right: auto;" src="https://github.com/DigitalPulseSoftware/NazaraEngine/raw/master/Logo.png" alt="Nazara Engine" />
|
||||
|
||||
<hr>
|
||||
|
||||
Retrouvez le moteur sur GitHub !<br>
|
||||
<a href="https://github.com/DigitalPulseSoftware/NazaraEngine">Dépôt GitHub</a><br><br>
|
||||
Venez vous renseigner sur les topics dédiés à Nazara présents sur plusieurs sites web :<br>
|
||||
<a href="https://openclassrooms.com/forum/sujet/moteur-de-jeu-nazara-engine-69732">OpenClassrooms</a>, <a href="http://pdp.microjoe.org/forums/sujet/354/projet-nazara-engine-moteur-de-jeu">Progdupeupl</a> ou <a href="https://zestedesavoir.com/forums/sujet/1039/nazara-engine/">ZesteDeSavoir</a>
|
||||
<br><br>
|
||||
... ou pourquoi ne pas venir faire un tour sur <a href="http://forum.digitalpulsesoftware.net">le forum dédié au moteur</a> ?
|
||||
|
||||
<hr>
|
||||
|
||||
<h1>Fonctionnalités de Nazara</h1>
|
||||
|
||||
<div>Dernière mise à jour : <span class="lastupdate">
|
||||
%DATE%
|
||||
</span></div>
|
||||
|
||||
<h2>Important:</h2>
|
||||
<p>Afin de faciliter la mise à jour, la page que vous voyez ici a été générée automatiquement par un <i>script Lua</i>, ce qui m'oblige néanmoins à encoder les fonctionnalités de chaque module dans un premier temps.
|
||||
C'est un travail assez long (pour vous donner une idée, les données du noyau représentent un fichier de 200 lignes), et il n'est pas encore complet, c'est pourquoi des modules manquent sur cette page.<br>
|
||||
Gardez donc à l'esprit que le moteur possède plus de fonctionnalités que ce qui est décrit actuellement sur cette page.</p>
|
||||
|
||||
<p>Oh et bien sûr je ne suis pas concepteur de site web, c'est pourquoi cette page est moche (j'ai <u>essayé</u> de minimiser les dégâts).<br>
|
||||
Si vous sentez en vous l'irrésistible envie d'améliorer cette page, sachez que votre aide serait grandement appréciée (vous pouvez me contacter via le lien de votre choix plus haut).</p>
|
||||
|
||||
<p>Le pourcentage indiqué est calculé automatiquement en fonction des <u>fonctionnalités</u>, cela signifie qu'une fonctionnalité présente sera comptée à 100% à partir du moment où son implémentation de base est considérée fonctionnelle, <u>cela n'est donc pas une assurance qu'aucun bug n'existe concernant cette fonctionnalité</u> (cependant cela signifie que la fonctionnalité est utilisable).<br>
|
||||
Et bien entendu, un module ou une fonctionnalité ayant atteint les 100% peut toujours évoluer par la suite.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<table>
|
||||
<caption>Sommaire</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Module</th>
|
||||
<th>Avancement</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%MODULELIST%
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
%MODULEDESCRIPTION%
|
||||
<hr>
|
||||
<table>
|
||||
<caption>Sommaire</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Module</th>
|
||||
<th>Pourcentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%MODULELIST%
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<title>Avancement de Nazara</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="englob">
|
||||
<img style="display: block;margin-left: auto;margin-right: auto;" src="https://github.com/DigitalPulseSoftware/NazaraEngine/raw/master/Logo.png" alt="Nazara Engine" />
|
||||
|
||||
<hr>
|
||||
|
||||
Retrouvez le moteur sur GitHub !<br>
|
||||
<a href="https://github.com/DigitalPulseSoftware/NazaraEngine">Dépôt GitHub</a><br><br>
|
||||
Venez vous renseigner sur les topics dédiés à Nazara présents sur plusieurs sites web :<br>
|
||||
<a href="https://openclassrooms.com/forum/sujet/moteur-de-jeu-nazara-engine-69732">OpenClassrooms</a>, <a href="http://pdp.microjoe.org/forums/sujet/354/projet-nazara-engine-moteur-de-jeu">Progdupeupl</a> ou <a href="https://zestedesavoir.com/forums/sujet/1039/nazara-engine/">ZesteDeSavoir</a>
|
||||
<br><br>
|
||||
... ou pourquoi ne pas venir faire un tour sur <a href="http://forum.digitalpulsesoftware.net">le forum dédié au moteur</a> ?
|
||||
|
||||
<hr>
|
||||
|
||||
<h1>Fonctionnalités de Nazara</h1>
|
||||
|
||||
<div>Dernière mise à jour : <span class="lastupdate">
|
||||
%DATE%
|
||||
</span></div>
|
||||
|
||||
<h2>Important:</h2>
|
||||
<p>Afin de faciliter la mise à jour, la page que vous voyez ici a été générée automatiquement par un <i>script Lua</i>, ce qui m'oblige néanmoins à encoder les fonctionnalités de chaque module dans un premier temps.
|
||||
C'est un travail assez long (pour vous donner une idée, les données du noyau représentent un fichier de 200 lignes), et il n'est pas encore complet, c'est pourquoi des modules manquent sur cette page.<br>
|
||||
Gardez donc à l'esprit que le moteur possède plus de fonctionnalités que ce qui est décrit actuellement sur cette page.</p>
|
||||
|
||||
<p>Oh et bien sûr je ne suis pas concepteur de site web, c'est pourquoi cette page est moche (j'ai <u>essayé</u> de minimiser les dégâts).<br>
|
||||
Si vous sentez en vous l'irrésistible envie d'améliorer cette page, sachez que votre aide serait grandement appréciée (vous pouvez me contacter via le lien de votre choix plus haut).</p>
|
||||
|
||||
<p>Le pourcentage indiqué est calculé automatiquement en fonction des <u>fonctionnalités</u>, cela signifie qu'une fonctionnalité présente sera comptée à 100% à partir du moment où son implémentation de base est considérée fonctionnelle, <u>cela n'est donc pas une assurance qu'aucun bug n'existe concernant cette fonctionnalité</u> (cependant cela signifie que la fonctionnalité est utilisable).<br>
|
||||
Et bien entendu, un module ou une fonctionnalité ayant atteint les 100% peut toujours évoluer par la suite.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<table>
|
||||
<caption>Sommaire</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Module</th>
|
||||
<th>Avancement</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%MODULELIST%
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
%MODULEDESCRIPTION%
|
||||
<hr>
|
||||
<table>
|
||||
<caption>Sommaire</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Module</th>
|
||||
<th>Pourcentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%MODULELIST%
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,121 +1,121 @@
|
|||
/* Je ne suis pas développeur HTML/CSS, je dois y toucher une fois l'an, désolé pour les quelques atrocités que vous pourrez trouver ici */
|
||||
|
||||
body
|
||||
{
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
#englob {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: white;
|
||||
width: 50%;
|
||||
min-width: 765px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #007ACC;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
color: lightblue;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
h2
|
||||
{
|
||||
display: inline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
ol
|
||||
{
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
border: white groove;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 10px lightblue;
|
||||
}
|
||||
|
||||
th
|
||||
{
|
||||
text-shadow: 2px 2px 4px black;
|
||||
}
|
||||
|
||||
tr
|
||||
{
|
||||
border: 1px solid white;
|
||||
}
|
||||
|
||||
tbody tr:hover
|
||||
{
|
||||
text-shadow: 0px 0px 4px white;
|
||||
}
|
||||
|
||||
.description
|
||||
{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.lastupdate
|
||||
{
|
||||
font-size: x-large;
|
||||
font-weight: bold;
|
||||
color: #f1c40f;
|
||||
}
|
||||
|
||||
.modulename
|
||||
{
|
||||
font-size: x-large;
|
||||
font-weight: bold;
|
||||
text-shadow: 2px 2px 10px #007ACC;
|
||||
}
|
||||
|
||||
.note
|
||||
{
|
||||
margin-left: 20px;
|
||||
color: #007ACC;
|
||||
}
|
||||
|
||||
.notedesc
|
||||
{
|
||||
color: rgb(200, 200, 255);
|
||||
}
|
||||
|
||||
.portability
|
||||
{
|
||||
margin-left: 20px;
|
||||
color: red;
|
||||
/* Je ne suis pas développeur HTML/CSS, je dois y toucher une fois l'an, désolé pour les quelques atrocités que vous pourrez trouver ici */
|
||||
|
||||
body
|
||||
{
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
#englob {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: white;
|
||||
width: 50%;
|
||||
min-width: 765px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #007ACC;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
color: lightblue;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
h2
|
||||
{
|
||||
display: inline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
ol
|
||||
{
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
border: white groove;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 10px lightblue;
|
||||
}
|
||||
|
||||
th
|
||||
{
|
||||
text-shadow: 2px 2px 4px black;
|
||||
}
|
||||
|
||||
tr
|
||||
{
|
||||
border: 1px solid white;
|
||||
}
|
||||
|
||||
tbody tr:hover
|
||||
{
|
||||
text-shadow: 0px 0px 4px white;
|
||||
}
|
||||
|
||||
.description
|
||||
{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.lastupdate
|
||||
{
|
||||
font-size: x-large;
|
||||
font-weight: bold;
|
||||
color: #f1c40f;
|
||||
}
|
||||
|
||||
.modulename
|
||||
{
|
||||
font-size: x-large;
|
||||
font-weight: bold;
|
||||
text-shadow: 2px 2px 10px #007ACC;
|
||||
}
|
||||
|
||||
.note
|
||||
{
|
||||
margin-left: 20px;
|
||||
color: #007ACC;
|
||||
}
|
||||
|
||||
.notedesc
|
||||
{
|
||||
color: rgb(200, 200, 255);
|
||||
}
|
||||
|
||||
.portability
|
||||
{
|
||||
margin-left: 20px;
|
||||
color: red;
|
||||
}
|
||||
|
|
@ -206,8 +206,8 @@ bool Load(Mesh* mesh, Stream& stream, const MeshParams& parameters)
|
|||
{
|
||||
aiVector3D position = iMesh->mVertices[j];
|
||||
aiVector3D normal = iMesh->mNormals[j];
|
||||
aiVector3D tangent = iMesh->mTangents[j];
|
||||
aiVector3D uv = iMesh->mTextureCoords[0][j];
|
||||
aiVector3D tangent = (iMesh->HasTangentsAndBitangents()) ? iMesh->mTangents[j] : aiVector3D(0.f, 1.f, 0.f);
|
||||
aiVector3D uv = (iMesh->HasTextureCoords(0)) ? iMesh->mTextureCoords[0][j] : aiVector3D(0.f);
|
||||
|
||||
vertex->position = parameters.scale * Vector3f(position.x, position.y, position.z);
|
||||
vertex->normal.Set(normal.x, normal.y, normal.z);
|
||||
|
|
@ -246,8 +246,8 @@ bool Load(Mesh* mesh, Stream& stream, const MeshParams& parameters)
|
|||
auto ConvertTexture = [&] (aiTextureType aiType, const char* textureKey, const char* wrapKey = nullptr)
|
||||
{
|
||||
aiString path;
|
||||
aiTextureMapMode mapMode;
|
||||
if (aiGetMaterialTexture(aiMat, aiType, 0, &path, nullptr, nullptr, nullptr, nullptr, &mapMode, nullptr) == aiReturn_SUCCESS)
|
||||
aiTextureMapMode mapMode[3];
|
||||
if (aiGetMaterialTexture(aiMat, aiType, 0, &path, nullptr, nullptr, nullptr, nullptr, &mapMode[0], nullptr) == aiReturn_SUCCESS)
|
||||
{
|
||||
matData.SetParameter(MaterialData::CustomDefined);
|
||||
matData.SetParameter(textureKey, stream.GetDirectory() + String(path.data, path.length));
|
||||
|
|
@ -255,7 +255,7 @@ bool Load(Mesh* mesh, Stream& stream, const MeshParams& parameters)
|
|||
if (wrapKey)
|
||||
{
|
||||
SamplerWrap wrap = SamplerWrap_Default;
|
||||
switch (mapMode)
|
||||
switch (mapMode[0])
|
||||
{
|
||||
case aiTextureMapMode_Clamp:
|
||||
case aiTextureMapMode_Decal:
|
||||
|
|
@ -271,7 +271,7 @@ bool Load(Mesh* mesh, Stream& stream, const MeshParams& parameters)
|
|||
break;
|
||||
|
||||
default:
|
||||
NazaraWarning("Assimp texture map mode 0x" + String::Number(mapMode, 16) + " not handled");
|
||||
NazaraWarning("Assimp texture map mode 0x" + String::Number(mapMode[0], 16) + " not handled");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue