Vulkan

11 2012 档案

程序运行时间
摘要:/***用高精度计时器,毫秒为单位***/#include #include using namespace std ;int main(void){ LARGE_INTEGER BegainTime ; LARGE_INTEGER EndTime ; LARGE_INTEGER Frequen... 阅读全文

posted @ 2012-11-30 19:25 Vulkan 阅读(262) 评论(0) 推荐(0)

CUDA与C++
摘要:1.使用thrust:http://stackoverflow.com/questions/13185221/cuda-host-object-to-devicehttp://blog.csdn.net/shenlan282/article/details/8237576http://blog.cs... 阅读全文

posted @ 2012-11-30 19:07 Vulkan 阅读(1046) 评论(0) 推荐(0)

Thrust快速入门教程(三)——迭代器与静态调度
摘要:http://blog.csdn.net/dreampursue/article/details/6278752在这节中我们曾使用了这样的表达式,H.begin() 、H.end()、D.begin() + 7。begin()与end()的返回值在C++中被称为迭代器。vector的迭代器类似于数组... 阅读全文

posted @ 2012-11-29 10:41 Vulkan 阅读(451) 评论(0) 推荐(0)

Thrust快速入门教程(二)——Vector的使用
摘要:http://blog.csdn.net/dreampursue/article/details/6278737Trust 提供了两个vector容器:host_vector 与 device_vector。按照命名规则,host_vector位于主机端,device_vector位于GPU设备端。... 阅读全文

posted @ 2012-11-29 10:40 Vulkan 阅读(770) 评论(0) 推荐(0)

Thrust快速入门教程(一)——简介
摘要:http://blog.csdn.net/dreampursue/article/details/6278726thrust网站 http://thrust.github.com/ <<<-----------very good!!Thrust 是一个类似于STL的针对CUDA的C++模板库。T... 阅读全文

posted @ 2012-11-29 10:39 Vulkan 阅读(340) 评论(0) 推荐(0)

cuda的PACK
摘要:https://devtalk.nvidia.com/default/topic/387841/structure-pack-issue/When I copy an instance of the following structurefrom Visual Studio C++ code to ... 阅读全文

posted @ 2012-11-27 20:16 Vulkan 阅读(145) 评论(0) 推荐(0)

Homogeneous Coordinates
摘要:Problem: Two parallel lines can intercept. Railroad gets narrower and meets at horizon.In Euclidean space (geometry), two parallel lines on the same p... 阅读全文

posted @ 2012-11-20 17:19 Vulkan 阅读(251) 评论(0) 推荐(0)

OpenGL Projection Matrix
摘要:http://www.songho.ca/opengl/gl_projectionmatrix.htmlRelated Topics: OpenGL TransformationOverviewPerspective ProjectionOrthographic ProjectionOverview... 阅读全文

posted @ 2012-11-20 17:02 Vulkan 阅读(553) 评论(0) 推荐(0)

II. Positioning---Chapter 5----Depth Clamping
摘要:Depth ClampingThat's all well and good, but this:This is never a good thing. Sure, it keeps the hardware from dividing by zero, which I guess is impor... 阅读全文

posted @ 2012-11-19 19:12 Vulkan 阅读(268) 评论(0) 推荐(0)

II. Positioning---Chapter 5----Boundaries and Clipping
摘要:Boundaries and ClippingIf you recall back to the Perspective projection tutorial, we choose to use some special hardware in the graphics chip to do th... 阅读全文

posted @ 2012-11-19 19:11 Vulkan 阅读(210) 评论(0) 推荐(0)

II. Positioning---Chapter 5----Overlap and Depth Buffering
摘要:Overlap and Depth BufferingRegardless of how we render the objects, there is a strange visual problem with what we're rendering:If the smaller object ... 阅读全文

posted @ 2012-11-19 19:10 Vulkan 阅读(238) 评论(0) 推荐(0)

II. Positioning---Chapter 5----Optimization: Base Vertex
摘要:Optimization: Base VertexUsing VAOs can dramatically simplify code. However, VAOs are not always the best case for performance, particularly if you us... 阅读全文

posted @ 2012-11-19 19:10 Vulkan 阅读(156) 评论(0) 推荐(0)

II. Positioning---Chapter 5----Multiple Objects in OpenGL
摘要:In this tutorial, we will look at how to deal with rendering multiple objects, as well as what happens when multiple objects overlap.Multiple Objects ... 阅读全文

posted @ 2012-11-19 19:09 Vulkan 阅读(138) 评论(0) 推荐(0)

II. Positioning---Chapter 4----Aspect of the World
摘要:Aspect of the WorldIf you run the last program, and resize the window, the viewport resizes with it. Unfortunately, this also means that what was once... 阅读全文

posted @ 2012-11-19 11:52 Vulkan 阅读(247) 评论(0) 推荐(0)

II. Positioning---Chapter 4----Perspective Projection
摘要:Perspective ProjectionRecall that our destination image, the screen, is just a two dimensional array of pixels. The 3D rendering pipeline we are using... 阅读全文

posted @ 2012-11-19 11:35 Vulkan 阅读(393) 评论(0) 推荐(0)

II. Positioning---Chapter 4----The Unreal World
摘要:Chapter 4. Objects at RestThus far, we have seen very flat things. Namely, a single triangle. Maybe the triangle moved around or had some colors.This ... 阅读全文

posted @ 2012-11-19 11:34 Vulkan 阅读(217) 评论(0) 推荐(0)

II. Positioning---Chapter 3----Multiple Shaders
摘要:Multiple ShadersWell, moving the triangle around is nice and all, but it would also be good if we could do something time-based in the fragment shader... 阅读全文

posted @ 2012-11-18 19:42 Vulkan 阅读(157) 评论(0) 推荐(0)

II. Positioning---Chapter 3----More Power to the Shaders
摘要:More Power to the ShadersIt's all well and good that we are no longer having to transform vertices manually. But perhaps we can move more things to th... 阅读全文

posted @ 2012-11-18 19:42 Vulkan 阅读(133) 评论(0) 推荐(0)

II. Positioning---Chapter 3----A Better Way
摘要:A Better WayThis is fine for a 3-vertex example. But imagine a scene involving millions of vertices (and no, that's not an exaggeration for high-end a... 阅读全文

posted @ 2012-11-18 19:40 Vulkan 阅读(149) 评论(0) 推荐(0)

II. Positioning---Chapter 3----Moving the Vertices
摘要:Chapter 3. OpenGL's Moving TriangleThis tutorial is about how to move objects around. It will introduce new shader techniques.Moving the VerticesThe s... 阅读全文

posted @ 2012-11-18 19:39 Vulkan 阅读(196) 评论(0) 推荐(0)

坑爹的GLSL
摘要:#version 400layout(location = 0) in vec4 position;void main(){gl_Position= vec4(position);}#version 400out vec4 outputColor;void main(){outputColor=ve... 阅读全文

posted @ 2012-11-18 14:37 Vulkan 阅读(373) 评论(0) 推荐(0)

glVertexAttribPointer()
摘要:NameglVertexAttribPointer — 定义顶点属性数组C Specificationvoid glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei str... 阅读全文

posted @ 2012-11-17 20:40 Vulkan 阅读(755) 评论(0) 推荐(0)

I. The Basics---Chapter 2----Vertex Attributes
摘要:原文地址http://www.arcsynthesis.org/gltut/Basics/Tut02%20Vertex%20Attributes.htmlVertex AttributesUsing the fragment position in a fragment shader is quit... 阅读全文

posted @ 2012-11-16 19:53 Vulkan 阅读(266) 评论(0) 推荐(0)

I. The Basics---Chapter 2----Fragment Position Display
摘要:http://www.arcsynthesis.org/gltut/Basics/Tutorial%2002.html#FragPositionChapter 2. Playing with ColorsThis tutorial will show how to provide some colo... 阅读全文

posted @ 2012-11-16 19:52 Vulkan 阅读(162) 评论(0) 推荐(0)

I. The Basics---Chapter 1----Making Shaders
摘要:http://www.arcsynthesis.org/gltut/Basics/Tut01%20Making%20Shaders.htmlMaking ShadersWe glossed over exactly how these text strings called shaders actu... 阅读全文

posted @ 2012-11-16 19:42 Vulkan 阅读(132) 评论(0) 推荐(0)

I. The Basics---Chapter 1----Following the Data
摘要:http://www.arcsynthesis.org/gltut/Basics/Tut01%20Following%20the%20Data.htmlFollowing the DataIn the basic background section, we described the functi... 阅读全文

posted @ 2012-11-16 19:42 Vulkan 阅读(135) 评论(0) 推荐(0)

I. The Basics---Chapter 1----Dissecting Display
摘要:http://www.arcsynthesis.org/gltut/Basics/Tut01%20Dissecting%20Display.htmlDissecting DisplayThe display function seems on the surface to be fairly sim... 阅读全文

posted @ 2012-11-16 19:37 Vulkan 阅读(136) 评论(0) 推荐(0)

I. The Basics---Introduction----Graphics and Rendering
摘要:http://www.arcsynthesis.org/gltut/Basics/Intro%20Graphics%20and%20Rendering.htmlGraphics and RenderingThis is an overview of the process of rendering.... 阅读全文

posted @ 2012-11-16 15:18 Vulkan 阅读(147) 评论(0) 推荐(0)

OPenGL中的缓冲区对象
摘要:在许多OpenGL操作中,我们都向OpenGL发送一大块数据,例如向它传递需要处理的顶点数组数据。传输这种数据可能非常简单,例如把数据从系统的内存中复制到图形卡。但是,由于OpenGL是按照客户机-服务器模式设计的,在OpenGL需要数据的任何时候,都必须把数据从客户机内存传输到服务器。如果数据并没... 阅读全文

posted @ 2012-11-15 21:53 Vulkan 阅读(379) 评论(0) 推荐(0)

VBO,VAO、glVertexPointer()、glVertexAttribPointer()
摘要:一个三角形顶点数据float position[9]={ -0.8f, -0.8f, 0.0f, 0.8f, -0.8f, 0.0f, 0.0f, 0.8f, 0.0f}; 一、 /***单独vao绘制***/ glEnableClientState(GL_VERTEX_ARRAY); glVe... 阅读全文

posted @ 2012-11-15 20:25 Vulkan 阅读(641) 评论(0) 推荐(0)

OpenGL Vertex Buffer Object (VBO)
摘要:http://www.songho.ca/opengl/gl_vbo.htmlOpenGL Vertex Buffer Object (VBO)Related Topics: Vertex Array, Display List, Pixel Buffer Object Download: vbo.... 阅读全文

posted @ 2012-11-15 11:41 Vulkan 阅读(392) 评论(0) 推荐(0)

OpenGL Vertex Array
摘要:原文地址http://www.songho.ca/opengl/gl_vertexarray.html make -f Makefile.linux 阅读全文

posted @ 2012-11-15 11:38 Vulkan 阅读(433) 评论(0) 推荐(0)

实现C++中的事件委托机制
摘要:http://www.189works.com/article-12359-1.html摘要: 介绍了事件委托机制的需求,各种解决方案的演变,最终提出模板化的事件委托机制,并给出较详细的进化过程和原理说明。关键词: C++,委托,委托器,事件器,模板第一章 基础版实现在平时的工作中,我们经常会遇到以... 阅读全文

posted @ 2012-11-09 09:34 Vulkan 阅读(170) 评论(0) 推荐(0)

C#委托(delegate)与事件(event)
摘要:http://blog.csdn.net/shan9liang/article/details/6784747===================================================================== c++实现类似c#事件机制的链接一:http://... 阅读全文

posted @ 2012-11-08 21:43 Vulkan 阅读(287) 评论(0) 推荐(0)

浅拷贝与深拷贝
摘要:对于普通类型的对象来说,它们之间的复制是很简单的,例如:int a=88;int b=a; 而类对象与普通对象不同,类对象内部结构一般较为复杂,存在各种成员变量。下面看一个类对象拷贝的简单例子。 #include using namespace std;class CExample {private... 阅读全文

posted @ 2012-11-07 11:36 Vulkan 阅读(152) 评论(0) 推荐(0)

函数运行到结尾 _BLOCK_TYPE_IS_VALID(pHead->nBlockUse
摘要:原因:未实现拷贝构造函数,错误原错误:BoundingBox boxArray[2]={box,box2};这里要调用拷贝构造函数,而且在拷贝构造函数中我未给成员指针分配空间。原文:http://hi.baidu.com/yanbizhu/item/e25da7165eb02cddbf9042fe指... 阅读全文

posted @ 2012-11-01 16:38 Vulkan 阅读(271) 评论(0) 推荐(0)

导航