QML apply a texture to a Mesh

筅森魡賤 提交于 2019-12-11 04:42:08

问题


I am trying to apply an image texture to a Mesh in QML (Qt 5.6.2). I started from the sample "Shadow Map QML" and I want to texture the GroundPlane. Material and Effect qml classes are applied to that GroundPlane mesh but I can't see how to apply an image texture. In QML, there is TextureImage, ShaderEffect but nothing about how they can be applied to a Mesh. Any ideas?

EDIT: Qt 5.6.2 is not the good version to work with to use Qt3D as the first "fully supported release of a stable Qt 3D module" was in Qt 5.7. So, I'll have a look at Qt 5.7, maybe 5.8 now! And at first glance, there is some texture propperties for the mesh.


回答1:


there is a simple example for you https://github.com/tripolskypetr/simpleqml3d Watch on IronMan.qml



来源:https://stackoverflow.com/questions/42907586/qml-apply-a-texture-to-a-mesh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!