summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-15 11:43:14 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-15 11:43:14 -0600
commit6e02b4c7c3c6efc05ead2ffd46b0928f7c9316bf (patch)
tree67666f6feb32371cdc7c5f76cefbaf86865a659c /src/mesa
parentc431a22f520c9685e9da37bfdd6b6b2b0af03800 (diff)
comments
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/pipe/p_state.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 5051ebbfc0..4878cb41bd 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -320,23 +320,35 @@ struct pipe_mipmap_tree
};
-
+/**
+ * A vertex buffer. Typically, all the vertex data/attributes for
+ * drawing something will be in one buffer. But it's also possible, for
+ * example, to put colors in one buffer and texcoords in another.
+ */
struct pipe_vertex_buffer
{
- unsigned pitch:11;
- unsigned max_index;
- struct pipe_buffer_handle *buffer;
- unsigned buffer_offset;
+ unsigned pitch:11; /**< stride to same attrib in next vertex, in bytes */
+ unsigned max_index; /**< number of vertices in this buffer */
+ unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */
+ struct pipe_buffer_handle *buffer; /**< the actual buffer */
};
-
+/**
+ * Information to describe a vertex attribute (position, color, etc)
+ */
struct pipe_vertex_element
{
- unsigned src_offset:11;
- unsigned vertex_buffer_index:5;
+ /** Offset of this attribute, in bytes, from the start of the vertex */
+ unsigned src_offset:11;
+
+ /** Which vertex_buffer (as given to pipe->set_vertex_buffer()) does
+ * this attribute live in?
+ */
+ unsigned vertex_buffer_index:5;
+
unsigned dst_offset:8;
- unsigned src_format:8; /* PIPE_FORMAT_* */
+ unsigned src_format:8; /**< PIPE_FORMAT_* */
};