| 195 | } |
| 196 | |
| 197 | CachedTexture * CachedTexture::Create( const TextureInfo & ti ) |
| 198 | { |
| 199 | if( ti.GetWidth() == 0 || ti.GetHeight() == 0 ) |
| 200 | { |
| 201 | #ifdef DAEDALUS_DEBUG_CONSOLE |
| 202 | DAEDALUS_ERROR( "Trying to create 0 width/height texture" ); |
| 203 | #endif |
| 204 | return nullptr; |
| 205 | } |
| 206 | |
| 207 | CachedTexture * texture = new CachedTexture( ti ); |
| 208 | if (!texture->Initialise()) |
| 209 | { |
| 210 | return nullptr; |
| 211 | } |
| 212 | |
| 213 | return texture; |
| 214 | } |
| 215 | |
| 216 | CachedTexture::CachedTexture( const TextureInfo & ti ) |
| 217 | : mTextureInfo( ti ) |
nothing calls this directly
no test coverage detected