Comments (1)
可配置化实现的方法:
经过无数次总结--和unity3d的借鉴--
渲染一个物体基本需要两个部分:
- 几何数据
- 着色器
目前着色器和几何数据都有对应的类,但是实际上几何数据结构被定死了,这就带来一个问题:它渲染的时候有时候有不需要的数据,有时候又多出了数据
所以我建立一个描述结构,用来描述这个几何结构的配置方式,诸如有几个buffer,每个buffer中一个节点由多少byte组成,每个节点有多少个attribute,然后在shader里做好对应的attribute就行
由于OpenGL对attribute数量有限制,实现这个描述结构不会很复杂(一个数组就解决了)
描述结构可以由VMGS来配置,也可以用VM76直接获取结构体内存然后直接写入
那么如此之后,渲染就会有两条指令缓冲,一条是切换着色器,一条是绘图
from vm-76.
Related Issues (15)
- 是否要引入模型加载库 Assimp HOT 12
- 声音自动销毁和多重instance的。。bug? HOT 4
- Windows上黑屏 HOT 8
- ASM76 HOT 9
- 是否要设计一个基于ASM76的高级语言,或者说底层实现? HOT 17
- Vulkan : Should we support it? HOT 2
- 添加了RenderBuffer之后又炸了 HOT 12
- 纪念用issue(III) HOT 1
- 纪念用issue HOT 3
- VMDE的公开讨论 HOT 3
- 讨论代码命名规范 HOT 1
- 纪念用issue(II) HOT 3
- 令人头痛的构建系统 HOT 2
- 声音模块的float → int之旅 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vm-76.