Graphics: Clear instances in Clear method
Former-commit-id: f6314967bf15544b530db2252aa5531d78554381 [formerly 47e880626a186e8b4cd59a2d0328cdb2667af86f] [formerly 319af73dbe6f3a5cbac3bdd7e2add637c6a16ea3 [formerly a1f223482cb27227c8255d5842a38b2506ae3496]] Former-commit-id: abae215139aadb2a1e6fd2b842db9ffafdeb326e [formerly 4e2c1dd62cf0d02982e786231b15774fb07589e0] Former-commit-id: 16bd3eb0a451653b05b813ed8921db2746c4aaa0
This commit is contained in:
parent
60ac889640
commit
41ed0395d5
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -187,18 +187,11 @@ namespace Nz
|
|||
drawFunc(meshData.primitiveMode, 0, indexCount);
|
||||
}
|
||||
}
|
||||
|
||||
instances.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// And we set it back data to zero
|
||||
matEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
pipelineEntry.maxInstanceCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,6 +278,36 @@ namespace Nz
|
|||
Layer& layer = it->second;
|
||||
if (layer.clearCount++ >= 100)
|
||||
it = layers.erase(it);
|
||||
else
|
||||
{
|
||||
for (auto& pipelinePair : layer.opaqueModels)
|
||||
{
|
||||
const MaterialPipeline* pipeline = pipelinePair.first;
|
||||
auto& pipelineEntry = pipelinePair.second;
|
||||
|
||||
if (pipelineEntry.maxInstanceCount > 0)
|
||||
{
|
||||
for (auto& materialPair : pipelineEntry.materialMap)
|
||||
{
|
||||
auto& matEntry = materialPair.second;
|
||||
|
||||
if (matEntry.enabled)
|
||||
{
|
||||
MeshInstanceContainer& meshInstances = matEntry.meshMap;
|
||||
|
||||
for (auto& meshIt : meshInstances)
|
||||
{
|
||||
auto& meshEntry = meshIt.second;
|
||||
|
||||
meshEntry.instances.clear();
|
||||
}
|
||||
matEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
pipelineEntry.maxInstanceCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -527,6 +527,62 @@ namespace Nz
|
|||
layers.erase(it++);
|
||||
else
|
||||
{
|
||||
for (auto& pipelinePair : layer.basicSprites)
|
||||
{
|
||||
auto& pipelineEntry = pipelinePair.second;
|
||||
|
||||
if (pipelineEntry.enabled)
|
||||
{
|
||||
for (auto& materialPair : pipelineEntry.materialMap)
|
||||
{
|
||||
auto& matEntry = materialPair.second;
|
||||
|
||||
if (matEntry.enabled)
|
||||
{
|
||||
auto& overlayMap = matEntry.overlayMap;
|
||||
for (auto& overlayIt : overlayMap)
|
||||
{
|
||||
const Texture* overlay = overlayIt.first;
|
||||
auto& spriteChainVector = overlayIt.second.spriteChains;
|
||||
|
||||
spriteChainVector.clear();
|
||||
}
|
||||
|
||||
matEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
pipelineEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& pipelinePair : layer.opaqueModels)
|
||||
{
|
||||
auto& pipelineEntry = pipelinePair.second;
|
||||
|
||||
if (pipelineEntry.maxInstanceCount > 0)
|
||||
{
|
||||
for (auto& materialPair : pipelineEntry.materialMap)
|
||||
{
|
||||
const Material* material = materialPair.first;
|
||||
auto& matEntry = materialPair.second;
|
||||
|
||||
if (matEntry.enabled)
|
||||
{
|
||||
MeshInstanceContainer& meshInstances = matEntry.meshMap;
|
||||
|
||||
for (auto& meshIt : meshInstances)
|
||||
{
|
||||
auto& meshEntry = meshIt.second;
|
||||
|
||||
meshEntry.instances.clear();
|
||||
}
|
||||
matEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
pipelineEntry.maxInstanceCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
layer.otherDrawables.clear();
|
||||
layer.transparentModels.clear();
|
||||
layer.transparentModelData.clear();
|
||||
|
|
|
|||
|
|
@ -386,17 +386,12 @@ namespace Nz
|
|||
vertexMapper.Unmap();
|
||||
|
||||
Renderer::DrawIndexedPrimitives(PrimitiveMode_TriangleList, 0, spriteCount * 6);
|
||||
} while (spriteChain < spriteChainCount);
|
||||
|
||||
spriteChainVector.clear();
|
||||
}
|
||||
while (spriteChain < spriteChainCount);
|
||||
}
|
||||
}
|
||||
|
||||
// We set it back to zero
|
||||
matEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
pipelineEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -781,12 +776,8 @@ namespace Nz
|
|||
instances.clear();
|
||||
}
|
||||
}
|
||||
|
||||
matEntry.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
pipelineEntry.maxInstanceCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue