MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY ilBindImage

Function ILAPIENTRY ilBindImage

DevIL/src-IL/src/il_stack.cpp:92–119  ·  view source on GitHub ↗

Makes Image the current active image - similar to glBindTexture().

Source from the content-addressed store, hash-verified

90
91//! Makes Image the current active image - similar to glBindTexture().
92void 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().

Callers

nothing calls this directly

Calls 1

iEnlargeStackFunction · 0.85

Tested by

no test coverage detected