QML将纹理应用于网格 [英] QML apply a texture to a Mesh

查看:199
本文介绍了QML将纹理应用于网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将图像纹理应用于QML(Qt 5.6.2)中的网格.我从示例"Shadow Map QML"开始,我想对GroundPlane进行纹理处理.材质和效果qml类应用于该GroundPlane网格,但是我看不到如何应用图像纹理.在QML中,有TextureImage,ShaderEffect,但没有关于如何将它们应用到Mesh的任何信息. 有什么想法吗?

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?

Qt 5.6.2并不是使用Qt3D的理想版本,因为Qt 5.7中的第一个完全支持的稳定Qt 3D模块发行版"是使用Qt3D的.因此,我来​​看看Qt 5.7,也许现在是5.8!乍看之下,网格具有一些纹理属性.

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.

推荐答案

有一个简单的示例适合您 https://github.com/tripolskypetr/simpleqml3d 在IronMan.qml上观看

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

这篇关于QML将纹理应用于网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆