[gluon] Re: Review Request: New VertexBuffer and VertexAttribute classes

[ Thread Index | Date Index | More lists.tuxfamily.org/gluon Archives ]


This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100392/

Ship it!

Looking good now.

- Arjen


On January 14th, 2011, 11:13 p.m., Giulio Camuffo wrote:

Review request for Gluon.
By Giulio Camuffo.

Updated Jan. 14, 2011, 11:13 p.m.

Description

This patch adds the VertexAttribute and VertexBuffer classes, moving the rendering out of Mesh. It allows a Mesh subclass to use more vertex attributes adding them to the buffer provided by the method Mesh::vertexBuffer.

There is the singleDataSize method in VertexAttribute which name is basically a placeholder because i could not find a better one. It returns the number of fields for each vertex. E.g 3 for the vertex position (x,y,z), 4 for the color (r,g,b,a), etc. Suggestions welcome!

Testing

I tested it with a sprite component and my TerrainMesh. It works right.

Diffs

  • graphics/CMakeLists.txt (984fe25)
  • graphics/mesh.h (95d1230)
  • graphics/mesh.cpp (d367c62)
  • graphics/vertexattribute.h (PRE-CREATION)
  • graphics/vertexattribute.cpp (PRE-CREATION)
  • graphics/vertexbuffer.h (PRE-CREATION)
  • graphics/vertexbuffer.cpp (PRE-CREATION)

View Diff



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/