[gameprogrammer] is safe this?

Is safe to create a GL texture and return it as function result?
Im thinking to implement an image loading and conversion function like this:

GLuint load(char *file)
{
 GLuint tmp
 load image ***
 glGenTexture(1,&tmp)
 convert surface to texture

 return tmp

}

But Im not sure if the returned value can be safely used as a texture.


--
http://dsgp.blogspot.com | Linux, programación, juegos
Have no place I can be since I found Serenity
But you can’t take the sky from me

                
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: