aboutsummaryrefslogtreecommitdiff
path: root/mesalib/docs/devinfo.html
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-08-29 08:51:20 +0200
committermarha <marha@users.sourceforge.net>2011-08-29 08:51:20 +0200
commit01df5d59e56a1b060568f8cad2e89f7eea22fc70 (patch)
tree9db83037fd85d0974b60fc1a05e0665083f26000 /mesalib/docs/devinfo.html
parentfd1f4d9fe3ea67fa6def8ee4927a8f71e0440f12 (diff)
downloadvcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.tar.gz
vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.tar.bz2
vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.zip
xwininfo libX11 libXmu libxcb mesa xserver xkeyboard-config git update 29
aug 2011
Diffstat (limited to 'mesalib/docs/devinfo.html')
-rw-r--r--mesalib/docs/devinfo.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/mesalib/docs/devinfo.html b/mesalib/docs/devinfo.html
index 8887dd026..d9e82e29d 100644
--- a/mesalib/docs/devinfo.html
+++ b/mesalib/docs/devinfo.html
@@ -72,6 +72,13 @@ If you use tabs, set them to 8 columns
</p>
<p>
+Line width: the preferred width to fill comments and code in Mesa is 78
+columns. Exceptions are sometimes made for clarity (e.g. tabular data is
+sometimes filled to a much larger width so that extraneous carriage returns
+don't obscure the table).
+</p>
+
+<p>
Brace example:
</p>
<pre>
@@ -81,10 +88,26 @@ Brace example:
else {
bar;
}
+
+ switch (condition) {
+ case 0:
+ foo();
+ break;
+
+ case 1: {
+ ...
+ break;
+ }
+
+ default:
+ ...
+ break;
+ }
</pre>
<p>
Here's the GNU indent command which will best approximate my preferred style:
+(Note that it won't format switch statements in the preferred way)
</p>
<pre>
indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
@@ -114,6 +137,16 @@ Function name examples:
_mesa_foo_bar() - an internal non-static Mesa function
</pre>
+<p>
+Places that are not directly visible to the GL API should prefer the use
+of <tt>bool</tt>, <tt>true</tt>, and
+<tt>false</tt> over <tt>GLboolean</tt>, <tt>GL_TRUE</tt>, and
+<tt>GL_FALSE</tt>. In C code, this may mean that
+<tt>#include &lt;stdbool.h&gt;</tt> need to be added. The
+<tt>try_emit_</tt>* methods in src/mesa/program/ir_to_mesa.cpp and
+src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as an example.
+</p>
+
<H2>Making a New Mesa Release</H2>