02 2012 档案

摘要:转载请注明出处!http://www.cnblogs.com/pulas/ 在Ogre里有两种方法来创建自定义网格。第一种是继承SimpleRenderable,并直接提供给它顶点和索引缓存。这是最直接的创建方式,但也是最不直观的。为了使事情更简单,Ogre提供了一个更棒的接口叫做ManualObject,它能让你用一些简单的函数来定义一个网格,而不用往缓存里写原始数据。仅仅调用"posi... 阅读全文
posted @ 2012-02-25 23:16 Pulaski 阅读(1501) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/cppguru/archive/2009/11/25/1610626.html 简要说Ogre渲染主流程分三步使用渲染队列:清空、构造和访问,这个过程在每一帧的绘制过程中重复执行。 渲染队列的清空 Ogre在每一帧渲染前都会先清空渲染队列。熟悉Ogre渲染流程的很容易看到在SceneManager::_renderScene() ... 阅读全文
posted @ 2012-02-23 14:18 Pulaski 阅读(317) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/cppguru/archive/2009/11/19/1605970.html 渲染队列在Ogre中是一个重要的概念,在场景中的所有物体都会在绘制前被Ogre放入到一个特定的渲染队列中。渲染队列主要起两个作用:1.确保正确的绘制顺序。比如先绘制天空盒再绘制一般物体,最后绘制界面。2.提高渲染效率。Ogre将具有相同pass的物体放在一起进行绘制... 阅读全文
posted @ 2012-02-23 13:58 Pulaski 阅读(277) 评论(0) 推荐(0) 编辑
摘要:http://hi.baidu.com/litterbug23/blog/item/5c1afed083158216a18bb7ea.html 在Ogre中如何关联textunit 与 cg/hlsl/glsl 语言中的 uniform sampler 关联: cg 和 hlsl 中基本上通用: pass { textunit { textname... 阅读全文
posted @ 2012-02-23 11:44 Pulaski 阅读(774) 评论(0) 推荐(0) 编辑
摘要:1 函数都是获取文件(普通文件,目录,管道,socket,字符,块()的属性。 函数原型 #include <sys/stat.h> int stat(const char *restrict pathname, struct stat *restrict buf); 提供文件名字,获取文件对应属性。 int fstat(int filedes, struct stat... 阅读全文
posted @ 2012-02-23 11:38 Pulaski 阅读(309) 评论(0) 推荐(0) 编辑
摘要:如果只有客户端的话,可以考虑用gamebryo,技术好一点,用ogre也可以,如果规模不大,用unity3d,如果很有钱,要效果很好的,用unreal3,bigworld是带服务器的,如果能力不够,最好不要自己写。 如果使用Ogre需要投入较多的人力和物力,因为Ogre是开源的,工具不齐全,使用其他流行的引擎需要购买授权,可以在Ogre的基础上做东西,并且可以宣称是自主研发的,没有人会追究,如果... 阅读全文
posted @ 2012-02-22 16:35 Pulaski 阅读(2457) 评论(0) 推荐(0) 编辑
摘要:http://www.cppblog.com/xiaowugui/archive/2010/01/06/104962.htmlDirectX中,如何获取深度值,然后将它存储在一个txt文件中?其实只要修改两个地方:第一个地方是:创建Direct3D设备时,将D3DPRESENT_PARAMETERS类型表示变量的AutoDepthStencilFormat设置为D3DFMT_D32F_LOCKABLE,代码如下: D3DPRESENT_PARAMETERS d3dpp; d3dpp.BackBufferWidth = width; d3dpp.BackB... 阅读全文
posted @ 2012-02-22 16:29 Pulaski 阅读(681) 评论(0) 推荐(0) 编辑
摘要:行程编码(Run-Length Encoding) 仅存储一个像素值以及具有相同颜色的像素数目的图象数据编码方式称为行程编码,或称游程编码,常用RLE(Run-Length Encoding)表示。该压缩编码技术相当直观和经济,运算也相当简单,因此解压缩速度很快。RLE压缩编码尤其适用于计算机生成的图形图像,对减少存储容量很有效果。 在此方式下每两个字节组成一个信息单元。第一个字节给出... 阅读全文
posted @ 2012-02-22 16:10 Pulaski 阅读(8544) 评论(0) 推荐(1) 编辑
摘要:正态分布 概率论中最重要的一种分布,也是自然界最常见的一种分布。该分布由两个参数——平均值和方差决定。概率密度函数曲线以均值为对称中线,方差越小,分布越集中在均值附近。 正态分布(normal distribution)又名高斯分布(Gaussian distribution),是一个在数学、物理及工程等领域都非常重要的概率分布,在统计学的许多方面有着重大的影响... 阅读全文
posted @ 2012-02-22 15:58 Pulaski 阅读(718) 评论(0) 推荐(0) 编辑
摘要:http://www.ogre3d.org/tikiwiki/Intermediate+Tutorial+7As RTTs are often used with shaders, you have to know how to pass the RenderTexture to one. Fortunately, this is really simple.The most simple case is one where you never change the texture for the shader during runtime. If it remains constant, y 阅读全文
posted @ 2012-02-21 13:49 Pulaski 阅读(254) 评论(0) 推荐(0) 编辑
摘要:http://www.cppblog.com/sunicdavy/archive/2012/02/14/165566.html 默认的, VC调试器只能正常显示ANSI字符串及UNICODE字符串, 而UTF-8字符串及其他格式则无法显示 这里无需编写插件及修改配置文件,只需要将要显示的字符串拉到Watch中,并在变量后面添加,s8即可显示 --> 同样类型的功能也应该很熟悉 ... 阅读全文
posted @ 2012-02-21 09:40 Pulaski 阅读(300) 评论(0) 推荐(0) 编辑
摘要:上次说了多线程管理的设计方案,这里再整理下OGRE中多线程的使用方法,由于新的WorkQueue设计是通用型的,因此对于我们来说,只需要使用好这个结构即可方便地实现多线程功能。 1、继承WorkQueue::RequestHandler、WorkQueue::ResponseHandler,准备一个uint16 mWorkQueueChannel,在类的构造函数中通过以下代码初始化: W... 阅读全文
posted @ 2012-02-19 12:02 Pulaski 阅读(1093) 评论(0) 推荐(0) 编辑
摘要:转载请注明出处!http://www.cnblogs.com/pulas/场景管理器SceneManager还默认提供了创建场景查询的功能,下图为场景查询类继承关系图。其中,射线场景查询RaySceneQuery可以用来拾取场景中的物体、地形碰撞检测和地形选择。下面示范如何在四叉树场景管理器中实现自定义的射线场景查询类。1. QuadtreeSceneManager覆盖其基类SceneManager的createRayQuery()方法,在其中创建四叉树射线场景查询QuadtreeRaySceneQuery类的实例。RaySceneQuery* QuadtreeSceneManager::cr 阅读全文
posted @ 2012-02-18 22:33 Pulaski 阅读(715) 评论(0) 推荐(0) 编辑
摘要:转载请注明出处!http://www.cnblogs.com/pulas/下面开始讲述怎样在一个插件中实现一个自定义的场景管理器。Ogre的场景管理器都是通过工厂方法创建的,所以它不仅提供了SceneManager基类,还提供了SceneManagerFactory基类。 /** Class which will create instances of a given SceneManager. */ class _OgreExport SceneManagerFactory : public SceneMgtAlloc { protected: mutable SceneMan... 阅读全文
posted @ 2012-02-18 22:23 Pulaski 阅读(601) 评论(0) 推荐(0) 编辑
摘要:转载请注明出处!Pulashttp://www.cnblogs.com/pulas/archive/2012/02/18/2357663.html Ogre的插件可以是动态链接库,也可以是静态链接库。若是动态链接库,则可通过在插件配置文件(默认为plugins.cfg)里添加插件名称,然后在创建Root时,会在Root的构造函数里通过Root::loadPlugin(const String& pluginName)方法遍历加载每一个插件。也可通过Root::loadPlugin(const String& pluginName)方法手动加载自定义插件。 当Root::load 阅读全文
posted @ 2012-02-18 21:55 Pulaski 阅读(875) 评论(0) 推荐(0) 编辑
摘要:转载请注明出处!Pulashttp://www.cnblogs.com/pulas/archive/2012/02/18/2357144.html1. 下载源代码、依赖库和构建工具:Ogre:ogre_src_v1-7-2.exe;Dependencies: OgreDependencies_MSVC_20100501.zipBoost: boost_1_44_0.zipDirectX: DXSDK_Jun10.exeCMake: cmake-2.8.3-win32-x86.zip2. 运行“ogre_src_v1-7-2.exe”,将其解压缩到自定义的目录。官方建议的目录结构如下:Ogre 阅读全文
posted @ 2012-02-18 15:11 Pulaski 阅读(2547) 评论(3) 推荐(0) 编辑
摘要:转载请注明出处!Pulashttp://www.cnblogs.com/pulas/archive/2012/02/16/2354542.html首先自定义一个场景管理器的监听器.头文件:#ifndef __CustomSceneManagerListener_H__#define __CustomSceneManagerListener_H__#include <Ogre.h>class CCustomSceneManagerListener : public Ogre::SceneManager::Listener{public: CCustomSceneManagerList 阅读全文
posted @ 2012-02-16 16:44 Pulaski 阅读(769) 评论(0) 推荐(2) 编辑
摘要:http://blog.csdn.net/qq18052887/article/details/4837981 OGRE的程序由于大量使用STL,加上我们也喜欢STL.所以在debug模式下,如果程序稍微大一点,要想调试几乎不可能,那速度不是人可以忍受的 所以好用的断点啊,快速监视啊,assert啊,基本不能用.为了速度,只有在release模式下用log打印日志的方式自己输出重要信息.... 阅读全文
posted @ 2012-02-15 15:33 Pulaski 阅读(435) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/butwang/article/details/6219424 在OgreConfig.h文件中有关于Ogre使用多线程的配置 1. 多线程支持的级别 /** Support for multithreading, there are 3 options OGRE_THREAD_SUPPORT = 0 ... 阅读全文
posted @ 2012-02-15 10:51 Pulaski 阅读(607) 评论(0) 推荐(0) 编辑
摘要:http://ogre3d.org/forums/viewtopic.php?f=2&t=30450I am currently working on a small project where I have to render objects back-to-front, and clear the depth buffer between each rendered object. After some digging on the wiki and the forum, I was led to believe that a combination of a frame list 阅读全文
posted @ 2012-02-14 17:08 Pulaski 阅读(673) 评论(0) 推荐(0) 编辑
摘要:http://hi.baidu.com/litterbug23/blog/item/e563454af5c09fdfd0c86a06.html RenderQueue提供了一个监听事件,使用户可以自定义设置每个Renderalbe使用的technique; 在RenderQueue的addRenderable函数中,有如下一段代码,提供给用户替换renderable中固有techniqu... 阅读全文
posted @ 2012-02-14 16:54 Pulaski 阅读(298) 评论(0) 推荐(0) 编辑
摘要:http://www.ogre3d.org/tikiwiki/Script+Cache+PluginTable of contentsIntroductionScript CacheShader CacheCompilingSetupBenchmarkAdvantagesDrawbacksLicenseReferencesIntroductionScript CacheThe Script Cache plugin attempts to speed up the time taken to parse resource script (like *.material, *.program e 阅读全文
posted @ 2012-02-14 15:51 Pulaski 阅读(567) 评论(0) 推荐(0) 编辑
摘要:-Twinsen编写 -本人水平有限,疏忽错误在所难免,还请各位数学高手、编程高手不吝赐教 -email: popyy@netease.com 透视投影是3D固定流水线的重要组成部分,是将相机空间中的点从视锥体(frustum)变换到规则观察体(Canonical View Volume)中,待裁剪完毕后进行透视除法的行为。在算法中它是通过透视矩阵乘法和透视除法两步完成的。 透... 阅读全文
posted @ 2012-02-13 17:37 Pulaski 阅读(430) 评论(0) 推荐(0) 编辑
摘要:http://paulbourke.net/miscellaneous/stereographics/stereorender/ Introduction The following discusses computer based generation of stereo pairs as used to create a perception of depth. Such depth... 阅读全文
posted @ 2012-02-13 15:26 Pulaski 阅读(483) 评论(0) 推荐(0) 编辑
摘要:http://hi.baidu.com/twjblog/blog/item/1bc6e71f6ec638148718bf1a.html 1.下载CEGUI0.7.1 2.下载CEGUI0.7.1的依赖库 (以上两个我们可以在CEGUI官网下载,http://www.cegui.org.uk/wiki/index.php/Main_Page) 3.解压CEGUI,例如我们解压到F:\C... 阅读全文
posted @ 2012-02-13 15:13 Pulaski 阅读(363) 评论(0) 推荐(0) 编辑
摘要:http://hi.baidu.com/janxhuilk/blog/item/6b041b66d534b53eaa184c52.html Ogre真的很强大,它为使用者提供了类似: mWindow->getCustomAttribute("D3DDEVICE", &m_pD3dDevice); assert( m_pD3dDevice ); 的方法让开发人员方便直... 阅读全文
posted @ 2012-02-13 15:06 Pulaski 阅读(276) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/lookof/archive/2010/03/21/1690769.html 好吧,在被这个算法折腾了许多天之后,我终于对它竖起了中指。这几天的经历让我明白了一个道理:对于数学基础不好的人来说,对待图形学最好远观不可亵玩焉;如果坚持硬闯却又碰巧E文不咋地,那受罪程度真叫人生不如死。最后,看待算法最好别太坚持“追求极致”,如果付出了太多而收获了太... 阅读全文
posted @ 2012-02-08 15:06 Pulaski 阅读(296) 评论(0) 推荐(0) 编辑
摘要:软阴影 http://www.gamedev.net/ 作者:Anirudh.S Shastry http://www.gamedev.net/reference/articles/article2193.asp 译者:赟赟 介绍... 1 近况... 1 软阴影... 2 那么它如何工作?... 2 步骤一:渲染阴影映射图(shadow map)... 2 步骤... 阅读全文
posted @ 2012-02-08 14:50 Pulaski 阅读(322) 评论(0) 推荐(0) 编辑
摘要:版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明 http://phoenixzz.blogbus.com/logs/121660419.html Shadowing is a key component for convincing, solid-looking rendering. Whether hard or soft, physically correc... 阅读全文
posted @ 2012-02-08 09:50 Pulaski 阅读(463) 评论(0) 推荐(0) 编辑
摘要:http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html By Steve Baker We British pronounce the letter 'Z' as "zed" - but Americans pronounce it "zee". ...although that's just to make ... 阅读全文
posted @ 2012-02-07 15:05 Pulaski 阅读(338) 评论(0) 推荐(0) 编辑
摘要:The Problem with Z-Buffer If you are a graphics programmer, you are bound to deal with the use of z-buffer for effects. For example, the depth buffer can be used for per pixel fog, soft particles, mo... 阅读全文
posted @ 2012-02-07 14:30 Pulaski 阅读(1423) 评论(0) 推荐(0) 编辑
摘要:《GPU Gems 3》Chapter 10http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.htmlFan Zhang The Chinese University of Hong KongHanqiu Sun The Chinese University of Hong KongOskari Nyman Helsinki University of TechnologyShadow mapping (Williams 1978) has been used extensively in 3D games and applicat 阅读全文
posted @ 2012-02-02 12:12 Pulaski 阅读(722) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示