diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-12-08 09:19:08 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-12-08 09:19:55 +0300 |
commit | 6006173f4adb44cefd6fb92e451aef19d69d0ea7 (patch) | |
tree | e86ed139119ff727b955fd926516fbb38a11a9f3 /source/blender/windowmanager/intern/wm_operators.c | |
parent | c013d64a0a2dd1455111d5080fd968561fdad8d0 (diff) |
OpenGL: use sized texture internal formats
Maybe this is pedantic but I read it’s best to explicitly set the
desired component size.
Also append “_ARB” to float texture formats since those need an
extension in GL 2.1.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index f7f2487e49c..a4a56345798 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -4145,7 +4145,7 @@ static void radial_control_set_tex(RadialControl *rc) if ((ibuf = BKE_brush_gen_radial_control_imbuf(rc->image_id_ptr.data, rc->use_secondary_tex))) { glGenTextures(1, &rc->gltex); glBindTexture(GL_TEXTURE_2D, rc->gltex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ibuf->x, ibuf->y, 0, + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA8, ibuf->x, ibuf->y, 0, GL_ALPHA, GL_FLOAT, ibuf->rect_float); MEM_freeN(ibuf->rect_float); MEM_freeN(ibuf); |