Functions mostly useful for Unit Testing.
More...
#include <TestUtils.h>
|
| TestUtils () |
|
void | generateRandomBlankTextures (Ogre::uint32 numTextures, Ogre::uint16 minWidth, Ogre::uint16 maxWidth, Ogre::PixelFormatGpu pixelFormat=Ogre::PFG_RGBA8_UNORM_SRGB) |
| Generates N random textures with names like 'UnitTestTex/0' where 0 is in range [mNumGenTextures; mNumGenTextures + numTextures) More...
|
|
void | generateDuplicateTextures (Ogre::uint32 numTextures, const Ogre::StringVector &sourceTex) |
| Generates N random duplicates of the textures in sourceTex[] with names like 'UnitTestTex/0' where 0 is in range [mNumGenTextures; mNumGenTextures + numTextures) More...
|
|
Ogre::StringVector | getSourceTexList (void) const |
|
void | generateUnlitDatablocksWithTextures (Ogre::uint32 numDatablocks, Ogre::uint32 firstTextureIdx, Ogre::uint32 numTextures) |
| Generates N random datablocks of Unlit type with names like: 'UnitTestUnlit/0' where 0 is in range [mNumGenTextures; mNumGenTextures + numDatablocks) More...
|
|
void | generatePbsDatablocksWithTextures (Ogre::uint32 numDatablocks, Ogre::uint32 firstTextureIdx, Ogre::uint32 numTextures) |
| See TestUtils::generateUnlitDatablocksWithTextures. More...
|
|
Functions mostly useful for Unit Testing.
◆ TestUtils()
Demo::TestUtils::TestUtils |
( |
| ) |
|
◆ generateDuplicateTextures()
void Demo::TestUtils::generateDuplicateTextures |
( |
Ogre::uint32 |
numTextures, |
|
|
const Ogre::StringVector & |
sourceTex |
|
) |
| |
Generates N random duplicates of the textures in sourceTex[] with names like 'UnitTestTex/0' where 0 is in range [mNumGenTextures; mNumGenTextures + numTextures)
- Parameters
-
numTextures | Number of textures to generate |
sourceTex | List of textures to clone. Must be non-empty. Use TestUtils::getSourceTexList if you don't know what to enter |
◆ generatePbsDatablocksWithTextures()
void Demo::TestUtils::generatePbsDatablocksWithTextures |
( |
Ogre::uint32 |
numDatablocks, |
|
|
Ogre::uint32 |
firstTextureIdx, |
|
|
Ogre::uint32 |
numTextures |
|
) |
| |
◆ generateRandomBlankTextures()
void Demo::TestUtils::generateRandomBlankTextures |
( |
Ogre::uint32 |
numTextures, |
|
|
Ogre::uint16 |
minWidth, |
|
|
Ogre::uint16 |
maxWidth, |
|
|
Ogre::PixelFormatGpu |
pixelFormat = Ogre::PFG_RGBA8_UNORM_SRGB |
|
) |
| |
Generates N random textures with names like 'UnitTestTex/0' where 0 is in range [mNumGenTextures; mNumGenTextures + numTextures)
They're all filled with 0xFF
◆ generateUnlitDatablocksWithTextures()
void Demo::TestUtils::generateUnlitDatablocksWithTextures |
( |
Ogre::uint32 |
numDatablocks, |
|
|
Ogre::uint32 |
firstTextureIdx, |
|
|
Ogre::uint32 |
numTextures |
|
) |
| |
Generates N random datablocks of Unlit type with names like: 'UnitTestUnlit/0' where 0 is in range [mNumGenTextures; mNumGenTextures + numDatablocks)
- Parameters
-
numDatablocks | Number of unlit datablocks to create |
firstTextureIdx | Value in range [0; mNumGenTextures) |
numTextures | Number of textures to shuffle across the created datablocks. firstTextureIdx + numTextures must be < mNumGenTextures |
◆ getSourceTexList()
Ogre::StringVector Demo::TestUtils::getSourceTexList |
( |
void |
| ) |
const |
The documentation for this class was generated from the following files: