[Slimdx]顶点和索引缓冲,绘制了2个分离的三角形
2015-04-07 18:27
309 查看
定义网格顶点和索引缓冲,绘制了2个分离的三角形。
CreateIndexBuffer
效果图:
public static IndexBuffer CreateIndexBuffer(Device device, short[] indicesData) { IndexBuffer indexBuffer = new IndexBuffer(device, 16 * indicesData.Length, Usage.WriteOnly, Pool.Default, true); DataStream ds = indexBuffer.Lock(0, 16 * indicesData.Length, LockFlags.None); ds.WriteRange(indicesData); indexBuffer.Unlock(); ds.Dispose(); return indexBuffer; }
CreateIndexBuffer
效果图:
相关文章推荐
- DirectX 3D_基础之模型表示 顶点格式 三角形 索引 虚拟摄像机 投影窗口 绘制流水线 局部坐标系 观察坐标系 世界坐标系 背面消隐 光照 裁剪 投影 视口变换 光栅化
- DX编程(3) —— 使用索引缓冲 创建2个三角形
- OpenGL绘制四边形以及索引缓冲对象
- AutoCAD LISP利用直角顶点斜边和一条直角边绘制直角三角形
- Direct3D使用顶点缓存和索引缓存进行绘制
- AutoCAD LISP利用一顶点和三边长绘制三角形
- HTML5 canvas标签绘制正三角形 鼠标按下点为中间点,鼠标抬起点为其中一个顶点
- OpenGL ES 使用顶点索引绘制立方体
- 基于一个顶点缓冲和一个索引缓冲创建一个地形
- 处理顶点——使用顶点缓冲和索引缓冲将顶点和索引保存在显存中
- android 使用OPENGL ES绘制三角形(一) (顶点方法)
- DirectX 3D_基础之地形绘制基础 高度图 创建高度图 加载RAW文件 访问和修改高度图 创建地形的几何信息(顶点计算,索引计算,纹理映射,光照,着色,地形中行走)
- OpenGL----绘制立方体,定点数组与顶点缓冲
- 处理顶点——基于一个顶点缓冲和一个索引缓冲创建一个地形
- XNA学习笔记——用顶点缓冲和索引缓冲创建地形
- [ActionScript 3.0] AS3 绘制任意三角形任意顶点到对边的高
- android 使用ONPENGL ES 绘制三角形 (二)(索引方法)
- DX中使用顶点缓存和索引缓存绘制图形
- GL_TRIANGLE_STRIP 绘制三角形顶点参数详解
- 处理顶点——绘制三角形,线和点