Documentation for module: Graphics

Former-commit-id: 1757c33318443aade1dc38e16d053240d7dc885c
This commit is contained in:
Gawaboumga
2016-05-30 14:21:36 +02:00
parent 7721fd2284
commit 2c941827ed
94 changed files with 4858 additions and 504 deletions

View File

@@ -9,11 +9,32 @@
namespace Nz
{
/*!
* \ingroup graphics
* \class Nz::GuillotineTextureAtlas
* \brief Graphics class that represents an atlas texture for guillotine
*/
/*!
* \brief Gets the underlying data storage
* \return Value of the enumeration of the underlying data storage
*/
UInt32 GuillotineTextureAtlas::GetStorage() const
{
return DataStorage_Hardware;
}
/*!
* \brief Resizes the image
* \return Updated texture
*
* \param oldImage Old image to resize
* \param size New image size
*
* \remark Produces a NazaraError if resize failed
*/
AbstractImage* GuillotineTextureAtlas::ResizeImage(AbstractImage* oldImage, const Vector2ui& size) const
{
std::unique_ptr<Texture> newTexture(new Texture);
@@ -23,8 +44,8 @@ namespace Nz
{
Texture* oldTexture = static_cast<Texture*>(oldImage);
// Copie des anciennes données
///TODO: Copie de texture à texture
// Copy of old data
///TODO: Copy from texture to texture
Image image;
if (!oldTexture->Download(&image))
{
@@ -43,8 +64,7 @@ namespace Nz
}
else
{
// Si on arrive ici c'est que la taille demandée est trop grande pour la carte graphique
// ou que nous manquons de mémoire
// If we are here, it is that the size is too big for the graphic card or we don't have enough
return nullptr;
}
}