mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-22 11:18:15 +00:00
REVIEW: rlLoadTexture()
Corrected bug when loading a RenderTexture texture passing NULL data.
This commit is contained in:
@@ -1887,12 +1887,6 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi
|
|||||||
#endif
|
#endif
|
||||||
#endif // GRAPHICS_API_OPENGL_11
|
#endif // GRAPHICS_API_OPENGL_11
|
||||||
|
|
||||||
if (data == NULL)
|
|
||||||
{
|
|
||||||
TraceLog(LOG_WARNING, "Got asked to load texture from a NULL pointer!");
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||||
|
|
||||||
glGenTextures(1, &id); // Generate texture id
|
glGenTextures(1, &id); // Generate texture id
|
||||||
|
Reference in New Issue
Block a user