上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: (2016-05-10)xnamath.h 报错: 在标识符“XMConvertToRadians”的前面 报错如下: 1>d:\program files\microsoft directx sdk (june 2010)\include\xnamath.h(159): error C2146: 语法错误: 缺少“;”(在标识符“XMConvertToRadians”的前面) 1>d:\prog... 阅读全文
posted @ 2016-06-17 11:52 zhangbaochong 阅读(3533) 评论(0) 推荐(0) 编辑
摘要: 原文地址http://www.cnblogs.com/flytrace/p/3387748.html 我算个笨人吧.笨人以前弄懂一些东西后,讲给笨人听往往更有效.看之前请自行具备图形学关于光照的基础知识. >> world/object space normal map 我们先讲基于世界或模型坐标的法线贴图(world/object space normal map).不常用,但是基... 阅读全文
posted @ 2016-06-15 20:38 zhangbaochong 阅读(2806) 评论(0) 推荐(0) 编辑
摘要: 本文由zhangbaochong原创,转载请注明出处http://www.cnblogs.com/zhangbaochong/p/5579289.html 在之前的场景绘制中我们都是给每个顶点指定了单一颜色 ,然后由系统插值计算各个部分颜色,最终显示出来。接下来我们将学习dx11中比较有意思的一部分 阅读全文
posted @ 2016-06-13 23:50 zhangbaochong 阅读(6008) 评论(5) 推荐(3) 编辑
摘要: C++11开始支持多线程编程,之前多线程编程都需要系统的支持,在不同的系统下创建线程需要不同的API如pthread_create(),Createthread(),beginthread()等,使用起来都比较复杂,C++11提供了新头文件<thread>、<mutex>、<atomic>、<fut 阅读全文
posted @ 2016-06-12 20:42 zhangbaochong 阅读(1126) 评论(0) 推荐(0) 编辑
摘要: 本文由zhangbaochong原创,转载请注明出处http://www.cnblogs.com/zhangbaochong/p/5573970.html 前面实现简单地形的教程,我们只是绘制了一个网格,这一次我们来学习一下几种基本几何体的绘制,包括平面网格、立方体、圆柱和球体等。 原来在Geome 阅读全文
posted @ 2016-06-10 17:35 zhangbaochong 阅读(8640) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3  阅读全文
posted @ 2016-06-09 20:21 zhangbaochong 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 对于COM对象来说使用传统指针比较麻烦,还要记得Release()防止内存泄漏,一不小心就会出现各种各样的问题。针对这种问题微软提供了对于COM对象的智能指针ComPtr,这里是官方文档https://github.com/Microsoft/DirectXTK/wiki/ComPtr 举个例子,原 阅读全文
posted @ 2016-05-31 18:01 zhangbaochong 阅读(3998) 评论(0) 推荐(0) 编辑
摘要: 由于之前一直在看directx11龙书学习,因此sdk一直用的Microsoft DirectX SDK (June 2010) 版本,最近在stackoverflow上问dx11相关问题时,一直被大神吐槽为何还用已经废弃的directx sdk,由于directx sdk现在已经和windows 阅读全文
posted @ 2016-05-28 15:00 zhangbaochong 阅读(4906) 评论(0) 推荐(0) 编辑
摘要: 本文由zhangbaochong原创,转载请注明出处http://www.cnblogs.com/zhangbaochong/p/5510294.html 上一个教程我们实现了渲染一个会旋转的立方体,这次我们来实现一个简单地形。 先来看看最终实现效果吧(蓝色是背景色,地形的不同高度分别渲染了不同颜色 阅读全文
posted @ 2016-05-19 21:51 zhangbaochong 阅读(4259) 评论(1) 推荐(3) 编辑
摘要: 题目: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). 阅读全文
posted @ 2016-05-17 20:00 zhangbaochong 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: But the 阅读全文
posted @ 2016-05-14 17:29 zhangbaochong 阅读(539) 评论(0) 推荐(0) 编辑
摘要: 对于一颗二叉树,深度优先搜索(Depth First Search)是沿着树的深度遍历树的节点,尽可能深的搜索树的分支。以上面二叉树为例,深度优先搜索的顺序 为:ABDECFG。怎么实现这个顺序呢 ?深度优先搜索二叉树是先访问根结点,然后遍历左子树接着是遍历右子树,因此我们可以利用堆栈的先进后出的特 阅读全文
posted @ 2016-05-14 16:54 zhangbaochong 阅读(78119) 评论(0) 推荐(4) 编辑
摘要: 题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the 阅读全文
posted @ 2016-05-12 21:32 zhangbaochong 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 上一次我们学习了如何画一个2D三角形,现在让我们进一步学习如何画一个旋转的彩色立方体吧。 具体流程同画三角形类似,因此不再给出完整代码了,不同的部分会再说明。 由于我们要画彩色的立方体,所以顶点结构体中加入颜色变量 着色器代码 定义了一个矩阵gWorldViewProj,后面我们会利用它进行旋转立方 阅读全文
posted @ 2016-05-11 22:38 zhangbaochong 阅读(3663) 评论(1) 推荐(0) 编辑
摘要: 题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given  阅读全文
posted @ 2016-05-10 19:45 zhangbaochong 阅读(235) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页