From 1080c2900e2fce740297ab90a18ae0d8681412b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 1 Dec 2011 16:47:48 +0100 Subject: [PATCH] Texture now allows user-specified target in addition to automagic. --- src/Texture.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Texture.h b/src/Texture.h index a0540d47f..18c2003e1 100644 --- a/src/Texture.h +++ b/src/Texture.h @@ -108,10 +108,13 @@ template class Texture { /** * @brief Constructor + * @param target Target, e.g. GL_TEXTURE_2D. If not set, target is + * based on dimension count (GL_TEXTURE_1D, GL_TEXTURE_2D, + * GL_TEXTURE_3D). * * Creates one OpenGL texture. */ - inline Texture(): target(GL_TEXTURE_1D + dimensions - 1) { + inline Texture(GLenum target = GL_TEXTURE_1D + dimensions - 1): target(target) { glGenTextures(1, &texture); }