2008年11月14日

C++ command buffer

摘要: 以下代码实现了一个C++ command buffer,代码在VC80调试通过,支持_cdecl,_stdcall,_thiscall三种调用1)参数存储:为了便于参数压栈,参数采用DWORD块存储,并且按照从右到左的顺序排列2)参数进栈:使用计数循环,让每一个DWORD进栈3)函数执行:对于_cdecl 需要手动退栈,_stdcall 和 _thiscall 自动退栈4)未实现 check es... 阅读全文

posted @ 2008-11-14 16:22 cgwolver 阅读(1102) 评论(1) 推荐(0) 编辑

SGI opengl source code download

摘要: OpenGL® Sample ImplementationURL: http://oss.sgi.com/projects/ogl-sample 下载地址:ftp://oss.sgi.com/projects/ogl-sample/download另一个开源的OpenGL 实现是mesa3dhttp://www.mesa3d.org最近听说 SGI把OpenGL改为自由软件了...htt... 阅读全文

posted @ 2008-11-14 12:01 cgwolver 阅读(1998) 评论(0) 推荐(1) 编辑

2008年11月13日

About OpenGL vsync ( OpenGL垂直同步 )

摘要: OpenGL VSync (垂直同步) 阅读全文

posted @ 2008-11-13 16:44 cgwolver 阅读(8461) 评论(0) 推荐(0) 编辑

2008年11月11日

OpenGL vs D3D

摘要: Comparision of OpenGL and Direct3D From Wikipedia,the free encyclopedia ... http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D 阅读全文

posted @ 2008-11-11 16:23 cgwolver 阅读(520) 评论(0) 推荐(0) 编辑

2008年11月6日

OpenGL Multiple Display Monitors

摘要: 在Direct3D中使用Multiple Adapter 很容易,对硬件的控制支持上,ms似乎更有得天独厚的便利;OpenGL更偏重于跨平台,似乎并不注重平台的硬件接口;但是Multiple Display Monitors需求却是一定存在的;如何在OpenGL中能够容易实现Multiple Display Monitors也是一个重要的需求;这将影响3D阵营中对OpenGL的支持率。 OpenG... 阅读全文

posted @ 2008-11-06 16:42 cgwolver 阅读(482) 评论(0) 推荐(0) 编辑

2008年11月5日

How to show the content of renderbufferobject?

摘要: 假设fbo1用作渲染目标,GL_COLOR_ATTACHMENT0_EXT 是一个RenderBufferObject,渲染结果输出到了RenderBufferObject中, 现在要把渲染的内容在屏幕上显示出来: screen.w,screen.h 是屏幕或窗口的大小: glBindFramebufferEXT( GL_READ_FRAMEBUFFER_EXT, fbo1.fboId ); gl... 阅读全文

posted @ 2008-11-05 10:35 cgwolver 阅读(404) 评论(0) 推荐(0) 编辑

2008年11月4日

About texture atlas

摘要: lightmap的情结源自q3和cs;2002年,dx9刚刚出炉,显卡还是NV30,R300时代,那个时候像DOOM3那样的全动态实时光影,还是很奢侈的东西,q3,cs的lightmap处于热火阶段。 更有n多的q3,half-life的各种viewer; 如今,bake,或者叫Render To Texture,已经是3dsmax/maya/blender等软件的标配功能,可以很容易的渲染出li... 阅读全文

posted @ 2008-11-04 11:36 cgwolver 阅读(4102) 评论(0) 推荐(1) 编辑

2008年10月30日

MESA3D debug

摘要: 也许你也very 喜欢OpenGL,也许你也想知道OpenGL32.dll内部是如何工作的...那就用去下载mesa3d吧 www.mesa3d.org 网上许多的介绍都是把mesa3d 生成的OpenGL32.DLL和GLU32.DLL覆盖system32 文件夹下的对应文件,甚至对于系统的保护,还要进行解除,窃以为此举实在过于野蛮,,,虽然他把原有文件也backup了... 废话不多说... 阅读全文

posted @ 2008-10-30 17:16 cgwolver 阅读(969) 评论(0) 推荐(0) 编辑

2008年10月29日

OPENGL share textures between rendering context

摘要: 在opengl 不同context中共享纹理的方法是wgl函数中的wglShareLists(其他非win32平台我不知道);wglShareLists 用法很简单: BOOL wglShareLists( HGLRC hglrc1, //OpenGL rendering context with which to share ... 阅读全文

posted @ 2008-10-29 11:21 cgwolver 阅读(2008) 评论(0) 推荐(0) 编辑

2008年10月26日

GLSL per-pixel lighting + spot texture (聚光灯贴图)

摘要: 聚光灯贴图,就是聚光灯照射在表面上的那个光圈,准备一张spot texture的亮度图,采用“GLSL projective texture ”一文中介绍的投影贴图方法把spot texture 投射到聚光灯方向。 unsigned char* pixels = (unsigned char*)malloc( 64*64 ); for (int j = 0; j < 64; j++... 阅读全文

posted @ 2008-10-26 10:18 cgwolver 阅读(928) 评论(0) 推荐(0) 编辑

导航