[Interest] Quick3D mapping of png textures onto Item 3D
thomas.senyk at pelagicore.com
Wed Sep 19 13:43:05 CEST 2012
As he is using QtQuick3D, the answer is simpler:
On Tue, September 18, 2012 08:57:55 AM Till Oliver Knoll wrote:
> 2012/9/18 Satya Praveen Ganapathi <praveen.s at hmie.co.in>:
> > ...
> > However, the png image is not getting displayed properly in 3D space i.e.
> > transparent area of the png file is
> > shown as black shaded.
> Most probably you simply need to enable "alpha blending": In OpenGL
> terms that usually means
> a) Turn blending on: glEnable(GL_BLEND)
> b) Define a blend function, e.g.: glBlendFunc(GL_SRC_ALPHA,
> Note: "Premultiplied alpha" textures (refer to Wikipedia or the Qt
> docs about the same topic) are to be preferred, in which case you
> would say glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)
> Here is a guy who is trying /exactly/ the same thing as you:
> Depending on what you are trying to achieve the function glTexEnv()
> with argument GL_BLEND might be useful too (if you want to apply alpha
> blending at the moment when applying the texture - and if you want
> that the underlying surface colour shines through). Refer to the
> (possibly outdated) FAQ:
> How you apply all this to Qt 3D I don't know - but I'm sure there must
> be this big "Enable blending" switch somewhere, too - refer to the
> docs (and if not, to my little understanding you can still mix in your
> own "raw OpenGL" code as above, no?).
> Cheers, Oliver
> Interest mailing list
> Interest at qt-project.org
More information about the Interest