Used for setting the current face if it is a cubemap.
| 378 | |
| 379 | //! Used for setting the current face if it is a cubemap. |
| 380 | ILboolean ILAPIENTRY ilActiveFace(ILuint Number) |
| 381 | { |
| 382 | ILuint Current; |
| 383 | ILimage *iTempImage; |
| 384 | |
| 385 | if (iCurImage == NULL) { |
| 386 | ilSetError(IL_ILLEGAL_OPERATION); |
| 387 | return IL_FALSE; |
| 388 | } |
| 389 | |
| 390 | if (Number == 0) { |
| 391 | return IL_TRUE; |
| 392 | } |
| 393 | |
| 394 | iTempImage = iCurImage; |
| 395 | iCurImage = iCurImage->Faces; |
| 396 | if (iCurImage == NULL) { |
| 397 | iCurImage = iTempImage; |
| 398 | ilSetError(IL_ILLEGAL_OPERATION); |
| 399 | return IL_FALSE; |
| 400 | } |
| 401 | |
| 402 | //Number--; // Skip 0 (parent image) |
| 403 | for (Current = 1; Current < Number; Current++) { |
| 404 | iCurImage = iCurImage->Faces; |
| 405 | if (iCurImage == NULL) { |
| 406 | ilSetError(IL_ILLEGAL_OPERATION); |
| 407 | iCurImage = iTempImage; |
| 408 | return IL_FALSE; |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | ParentImage = IL_FALSE; |
| 413 | |
| 414 | return IL_TRUE; |
| 415 | } |
| 416 | |
| 417 | |
| 418 |
nothing calls this directly
no test coverage detected