Vertex Buffer Object Manager

Posted on 2008-02-27 18:32 SigEric 阅读(79) 评论(0)  编辑 收藏 所属分类: 工作日志

It has been a long time that no update shows up here. Sorry....
I have been working on the requirement on a new Demo Engine, which is small and flexible.
After doing some survey all these days, I found that it is very necessary to support both GL and D3D to my engine.

For GL, it is state machine based so that an encapsulation for VBO is very vital for the rendering pipe line.

Here are the diagrams to show the class relationships:

Buffer diagram

Both vertex buffer and index buffer are inheritant from the buffer object class.
They provide  both reading and writing to the buffer object, bind/unbind, size calculation, etc.

VertexElement and VertexDeclaration are util class that helps to utilize the format of the rendering vertices. The user(programmer) can declare attribute of vertex, like position, normal, diffuse color, specular color, tangent, etc.

 



All the operation including creation, modification and deletion of buffer objects are calling from the BufferManager, which is a singelton class.

Here is the source code: VBO Manager


标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2008-02-27 21:40 编辑过


相关链接: