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

Function ILAPIENTRY ilutGLBuildMipmaps

DevIL/src-ILUT/src/ilut_opengl.cpp:394–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393
394ILboolean ILAPIENTRY ilutGLBuildMipmaps()
395{
396 ILimage *Image;
397
398 ilutCurImage = ilGetCurImage();
399 if (ilutCurImage == NULL) {
400 ilSetError(ILUT_ILLEGAL_OPERATION);
401 return IL_FALSE;
402 }
403
404 Image = MakeGLCompliant2D(ilutCurImage);
405 if (Image == NULL)
406 return IL_FALSE;
407
408 gluBuild2DMipmaps(GL_TEXTURE_2D, ilutGLFormat(Image->Format, Image->Bpp), Image->Width,
409 Image->Height, Image->Format, Image->Type, Image->Data);
410
411 if (Image != ilutCurImage)
412 ilCloseImage(Image);
413
414 return IL_TRUE;
415}
416
417
418ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff)

Callers

nothing calls this directly

Calls 4

ilSetErrorFunction · 0.85
MakeGLCompliant2DFunction · 0.85
ilutGLFormatFunction · 0.85
ilCloseImageFunction · 0.85

Tested by

no test coverage detected