多语言展示
当前在线:579今日阅读:26今日分享:39

ORGE学习:Per renderable transparency

Per renderable transparency 可以改变指定mesh的材质特征,并且不影响使用该材质的其它mesh。
方法/步骤
1

首先,翻译网页上的说明部分,这部分阐明了“什么是Per renderable transparency?”、“Per renderable transparency有什么作用”,说明部分如下图

2

按照网页中的要求,向Solution中添加MaterialInstance.h、MaterialInstance.cpp、SubEntityMaterialInstance.h、SubEntityMaterialInstance.cpp、EntityMaterialInstance.h、EntityMaterialInstance.cpp

3

添加之前的Solution Explorer

4

添加之后的Solution Explorer

5

在新添加的MaterialInstance.cpp、SubEntityMaterialInstance.cpp、EntityMaterialInstance.cpp三个函数中,分别在最开始处加入#include 'stdafx.h'语句

6

复制网页教程中Prerequisites部分的语句。

7

粘贴到MFCTestView.cpp文件的开始处。

8

根据网页教程中Creating the scene部分修改MFCTestView.cpp文件中的void CMFCTestView::createScene()函数

9

MFCTestView.cpp文件中的void CMFCTestView::createScene()函数

推荐信息