Hello everyone, so recently, I’ve been trying to generate a procedural texture using panda3d.core.PNMImage
, and it works great, for the most part, that is. Setting R, G and B values are easy enough, via PNMImage.set_red()
, and so on and so forth, however, setting the alpha value via PNMImage.set_alpha()
raises this error:
proc_img.set_alpha(x, z, 1)
AssertionError: _alpha != nullptr && x >= 0 && x < _x_size && y >=
0 && y < _y_size at line 560 of built1.10/include/pnmImage.
Any help would be appreciated, and please tell me if this is a stupid question, or something along the lines of an embarassingly obvious question. Also, this isn’t related to me trying to write a pixel beyond the texture’s size, by the way. set_red()
and others work just fine on the same iteration, it’s just set_alpha()
.
Thanks,
Trayambak.