Just curious, how is this done in ogre? Suppose I have a mesh, I'd like to attach some attributes to each vertex. I'd like to do a little manipulation of (gl_Vertex + attribute) before I calculate gl_Position.
1. how do I create an attribute
2. most important, how do I assign values to attributes. These are going to be changed every frame.
In fact, I'm curious, I see that in scripts you can hard code uniforms/attributes/etc, how do I programmatically change the values. All of my work will be in opengl.
Thanks
vertex attributes how to?
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: vertex attributes how to?
See binding vertex attributes.
In HLSL, you just use the POSITION, NORMAL, TANGENT, COLOR and TEXCOORDn semantics.
To modify them you need to map a HardwareVertexBuffer pointer. This can be quite a large topic.
See the wiki.
In HLSL, you just use the POSITION, NORMAL, TANGENT, COLOR and TEXCOORDn semantics.
An "attribute" is a component of the vertex. Their values come from vertex buffers (i.e. the meshes).hall wrote:2. most important, how do I assign values to attributes. These are going to be changed every frame.
To modify them you need to map a HardwareVertexBuffer pointer. This can be quite a large topic.
See the wiki.