mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-13 02:29:10 -04:00
added gpuready check to gentexturemipmaps (#5747)
This commit is contained in:
@ -3685,6 +3685,8 @@ void rlUnloadTexture(unsigned int id)
|
|||||||
// NOTE: Only supports GPU mipmap generation
|
// NOTE: Only supports GPU mipmap generation
|
||||||
void rlGenTextureMipmaps(unsigned int id, int width, int height, int format, int *mipmaps)
|
void rlGenTextureMipmaps(unsigned int id, int width, int height, int format, int *mipmaps)
|
||||||
{
|
{
|
||||||
|
if (!isGpuReady) { TRACELOG(RL_LOG_WARNING, "GL: GPU is not ready to load data, trying to load before InitWindow()?"); return; }
|
||||||
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
glBindTexture(GL_TEXTURE_2D, id);
|
glBindTexture(GL_TEXTURE_2D, id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user