Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Check the return value of glGenTextures()

  • Loading branch information
slouken committed Aug 10, 2013
1 parent be730de commit 2a36e610645aeb9f9e04794dbabf2262acff6d31

File 1 of 3 in 2a36e61

@@ -633,6 +633,10 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)

GL_CheckError("", renderer);
renderdata->glGenTextures(1, &data->texture);
if (GL_CheckError("glGenTexures()", renderer) < 0) {
SDL_free(data);
return -1;
}
if ((renderdata->GL_ARB_texture_rectangle_supported)
/*&& texture->access != SDL_TEXTUREACCESS_TARGET*/){
data->type = GL_TEXTURE_RECTANGLE_ARB;

0 comments on commit 2a36e61

Please sign in to comment.