<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>numb3r23 &#187; Doxygen</title>
	<atom:link href="https://www.numb3r23.net/tag/doxygen/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.numb3r23.net</link>
	<description>&#039;bout coding grafx &#38; more</description>
	<lastBuildDate>Tue, 27 Oct 2015 00:22:25 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>Doxygen and GLSL shader</title>
		<link>https://www.numb3r23.net/2012/02/15/doxygen-and-glsl-shader/</link>
		<comments>https://www.numb3r23.net/2012/02/15/doxygen-and-glsl-shader/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 19:01:26 +0000</pubDate>
		<dc:creator><![CDATA[numb3r23]]></dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Doxygen]]></category>
		<category><![CDATA[GLSL]]></category>

		<guid isPermaLink="false">http://www.grasmo.de/?p=46</guid>
		<description><![CDATA[As I&#8217;ve finished the documentation-madness I stumbled over my GLSL shader. Doxygen, _the_ documentation tool of choice, reads them (as they are very c-like) but dumps them rather unfancy. Doxygen is not only very flexible &#8211; it is also extensible with filters to process other languages. Idea Write a small filter, that pads every shader [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>As I&#8217;ve finished the documentation-madness I stumbled over my GLSL shader. <a title="Doxygen" href="http://www.doxygen.org/" target="_blank">Doxygen</a>, _the_ documentation tool of choice, reads them (as they are very c-like) but dumps them rather unfancy. Doxygen is not only very flexible &#8211; it is also extensible with <a title="Filters for Doxygen" href="http://www.stack.nl/~dimitri/doxygen/helpers.html" target="_blank">filters</a> to process other languages.</p>
<h5>Idea</h5>
<p>Write a small filter, that pads every shader into a class and set a namespace that acts kinda like a category (e.g. class <code>Gauss</code> in namespace <code>GLSL::FILTER::BLUR</code>). The result is my glslfilter.py python-script.</p>
<h5>Usage</h5>
<ol>
<li>Make Doxygen aware of the filter and the newly supported file extensions. To do this, edit your Doxyfile:
<ul>
<li>Add <code>FILE_PATTERNS: *.frag, *.vert</code></li>
<li>Add <code>FILTER_PATTERNS: "*.frag=./glslfilter.py", "*.vert=./glslfilter.py"</code></li>
<li>Add <code>EXTENSION_MAPPING=.frag=C++, .vert=C++</code> (thanks the_summer)</li>
</ul>
</li>
<li>If you want, add annotations to your shader:
<ul>
<li>Use <code>@class</code> to set the class name</li>
<li>Use <code>@namespace</code> to set the namespace &#8211; a category</li>
</ul>
<p>If you set no name, the script will use the bare filename and the default namespace is &#8220;GLSL&#8221;.</p>
<p>Of course you can further document your shader with doxytags &#8211; they are fully processed by Doxygen. The only limitation here (blame my lazyness or my thought it just wasn&#8217;t worth it) is that you have to put the &#8220;<em>class</em>&#8221; comment (= the shader information) at the very beginning in one big blockcomment starting with <code>/*</code> or <code>/**</code>. But seriously &#8211; why would you comment it in any other way? <img src="https://www.numb3r23.net/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /></li>
</ol>
<p>To better illustrate the procedure here&#8217;s a little GLSL fragment shader:</p>
<h5>Example</h5>
<pre class="brush: cpp; title: ; notranslate">
/**
 * A simple 3x3 gaussian convolution filter, non-separated version
 * @author Sebastian Schaefer
 * @date 2012
 * @namespace GLSL::FILTER::BLUR
 * @class Gauss3x3
 */
#version 150 core

uniform sampler2D image; ///&lt; the input image

in vec2 tex;	///&lt; texture coordinated
out vec4 color; ///&lt; the color output

/**
 * The main routine: read the 3x3 neighbours and multiply with kernel
 */
void main()
{
    ...
}
</pre>
<p>Click <a title="glslfilter example" href="http://www.grasmo.de/download/glslfilter/glslfilter_example.html" target="_blank">here</a> to see how the above example can look like.</p>
<h5>Download</h5>
<p>Grab the filter at my github-repository <a href="https://github.com/numb3r23/glslAdditions" target="_new">github.com/numb3r23/glslAdditions</a><br />
<em>This page might get updated so please link to this page only, not the direct download. thank you!</em></p>
<p>&#8212;<br />
edit: moved source to github</p>
]]></content:encoded>
			<wfw:commentRss>https://www.numb3r23.net/2012/02/15/doxygen-and-glsl-shader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
