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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user