- 博客(4)
- 资源 (2)
- 收藏
- 关注
转载 给struct或union成员两个名称,其中一个用数组元素表示
#include struct Point2d{ union { float pos[3]; struct { float x, y, w; }; };};void main(){ // 1.pos[]数组和x, y, w使用同一片区域,这就使每个分量有了两个名字pos[0] = x, pos[1] = y, pos[2] = w Point2d p2
2016-12-23 19:19:10 645
转载 stl中的全排列算法
1. 需先排序,从小到大用next_permutation float c[] = {1.2f, 32.2f, -1.3f}; std::sort(c, c + 3); do { printf("%.2f %.2f %.2f\n", c[0], c[1], c[2]); } while (std::next_permutation(c, c + 3));2. 从大到小
2016-12-18 09:45:28 295
原创 四面体简单光照渲染+漫游(使用多个ConstantBuffer减小带宽)
建立了三个ConstantBuffer,一个是每一帧都需要从cpu传过来的用来旋转的world矩阵,一个是摄影机操作后传过来的view矩阵,还有一个是只传过来一次的projection矩阵和两个方向光的向量1.lighting.fx// Constant Buffer Variablescbuffer CBChangesEveryFrame : register( b0 ){ mat
2016-12-13 13:15:47 1864
原创 D3D11四面体简单方向光光照渲染
初始化设备大致分这几个步骤:1.Create device2.Create swap chain3.Create a render target view4.Create depth stencil texture5.Create the depth stencil view6.Setup the viewport7.Compile and create the ver
2016-12-12 13:36:32 1120
MySQL-8.0.12下载安装配置方法
2018-10-17
MySQL8.0.12下载安装配置方法
2018-10-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人