Makes Image the current active image - similar to glBindTexture().
| 90 | |
| 91 | //! Makes Image the current active image - similar to glBindTexture(). |
| 92 | void ILAPIENTRY ilBindImage(ILuint Image) |
| 93 | { |
| 94 | if (ImageStack == NULL || StackSize == 0) { |
| 95 | if (!iEnlargeStack()) { |
| 96 | return; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | // If the user requests a high image name. |
| 101 | while (Image >= StackSize) { |
| 102 | if (!iEnlargeStack()) { |
| 103 | return; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | if (ImageStack[Image] == NULL) { |
| 108 | ImageStack[Image] = ilNewImage(1, 1, 1, 1, 1); |
| 109 | if (Image >= LastUsed) // >= ? |
| 110 | LastUsed = Image + 1; |
| 111 | } |
| 112 | |
| 113 | iCurImage = ImageStack[Image]; |
| 114 | CurName = Image; |
| 115 | |
| 116 | ParentImage = IL_TRUE; |
| 117 | |
| 118 | return; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | //! Deletes Num images from the image stack - similar to glDeleteTextures(). |
nothing calls this directly
no test coverage detected