Use <literal> not <pre> in the comments

Comments are interpreted as docbook snippets and <pre> is from html. The
closest maching tag for inline content seems to be <literal>.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 66c9f26dfb3133f43d319128d6636f793a1ceb4a)
This commit is contained in:
Damien Lespiau 2012-06-20 14:30:03 +01:00 committed by Robert Bragg
parent 829aafce98
commit 4ad1e9b83a
2 changed files with 12 additions and 13 deletions

View File

@ -56,10 +56,10 @@ G_BEGIN_DECLS
* @name: The name of the attribute (used to reference it from GLSL) * @name: The name of the attribute (used to reference it from GLSL)
* @stride: The number of bytes to jump to get to the next attribute * @stride: The number of bytes to jump to get to the next attribute
* value for the next vertex. (Usually * value for the next vertex. (Usually
* <pre>sizeof (MyVertex)</pre>) * <literal>sizeof (MyVertex)</literal>)
* @offset: The byte offset from the start of @attribute_buffer for * @offset: The byte offset from the start of @attribute_buffer for
* the first attribute value. (Usually * the first attribute value. (Usually
* <pre>offsetof (MyVertex, component0)</pre> * <literal>offsetof (MyVertex, component0)</literal>
* @components: The number of components (e.g. 4 for an rgba color or * @components: The number of components (e.g. 4 for an rgba color or
* 3 for and (x,y,z) position) * 3 for and (x,y,z) position)
* @type: FIXME * @type: FIXME
@ -95,23 +95,22 @@ G_BEGIN_DECLS
* ]| * ]|
* *
* In this case, to describe either the position or texture coordinate * In this case, to describe either the position or texture coordinate
* attribute you have to move <pre>sizeof (MyVertex)</pre> bytes to * attribute you have to move <literal>sizeof (MyVertex)</literal> bytes to
* move from one vertex to the next. This is called the attribute * move from one vertex to the next. This is called the attribute
* @stride. If you weren't interleving attributes and you instead had * @stride. If you weren't interleving attributes and you instead had
* a packed array of float x, y pairs then the attribute stride would * a packed array of float x, y pairs then the attribute stride would
* be <pre>(2 * sizeof (float))</pre>. So the @stride is the number of * be <literal>(2 * sizeof (float))</literal>. So the @stride is the number of
* bytes to move to find the attribute value of the next vertex. * bytes to move to find the attribute value of the next vertex.
* *
* Normally a list of attributes starts at the beginning of an array. * Normally a list of attributes starts at the beginning of an array.
* So for the <pre>MyVertex</pre> example above the @offset is the * So for the <literal>MyVertex</literal> example above the @offset is the
* offset inside the <pre>MyVertex</pre> structure to the first * offset inside the <literal>MyVertex</literal> structure to the first
* component of the attribute. For the texture coordinate attribute * component of the attribute. For the texture coordinate attribute
* the offset would be <pre>offsetof (MyVertex, s)</pre> or instead of * the offset would be <literal>offsetof (MyVertex, s)</literal> or instead of
* using the offsetof macro you could use <pre>sizeof (float) * 3</pre>. * using the offsetof macro you could use <literal>sizeof (float) *
* If you've divided your @array into blocks of non-interleved * 3</literal>. If you've divided your @array into blocks of non-interleved
* attributes then you will need to calculate the @offset as the * attributes then you will need to calculate the @offset as the number of
* number of bytes in blocks preceding the attribute you're * bytes in blocks preceding the attribute you're describing.
* describing.
* *
* An attribute often has more than one component. For example a color * An attribute often has more than one component. For example a color
* is often comprised of 4 red, green, blue and alpha @components, and a * is often comprised of 4 red, green, blue and alpha @components, and a

View File

@ -59,7 +59,7 @@ G_BEGIN_DECLS
* component. The scalar component is normally referred to as w and the * component. The scalar component is normally referred to as w and the
* vector might either be referred to as v or a (for axis) or expanded * vector might either be referred to as v or a (for axis) or expanded
* with the individual components: (x, y, z) A full quaternion would * with the individual components: (x, y, z) A full quaternion would
* then be written as <pre>[w (x, y, z)]</pre>. * then be written as <literal>[w (x, y, z)]</literal>.
* *
* Quaternions can be considered to represent an axis and angle * Quaternions can be considered to represent an axis and angle
* pair although sadly these numbers are buried somewhat under some * pair although sadly these numbers are buried somewhat under some