acowley / GLUtil

Utility functions for working with OpenGL BufferObjects, GLSL shaders, and textures.
BSD 3-Clause "New" or "Revised" License
40 stars 16 forks source link

Supply texture target to reloadTexture #22

Open triplepointfive opened 9 years ago

triplepointfive commented 9 years ago

I'd like to handle cubemap textures, but reloadTexture function is supposed to be applied only for Texture2D targets. Can we provide to it one more argument with a type TwoDimensionalTextureTarget t, so it will be more generalized?

acowley commented 9 years ago

I'd rather not break existing users of reloadTexture. Is TexInfo enough for working with cubemaps? If not, perhaps we could replace that concrete argument with a type subject to a class constraint. That way, we could have something like a TexInfoCube type from which we could pull out the right texture target.