<?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>silvermace.com</title>
	<atom:link href="http://silvermace.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://silvermace.com</link>
	<description>Danushka &#34;silvermace&#34; Abeysuriya</description>
	<lastBuildDate>Thu, 08 Dec 2011 00:36:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Understanding EXT_separate_shader_objects (OpenGLES 2.0.x)</title>
		<link>http://silvermace.com/2011/11/understanding-ext_separate_shader_objects-opengles-2-0-x/</link>
		<comments>http://silvermace.com/2011/11/understanding-ext_separate_shader_objects-opengles-2-0-x/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 04:09:11 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Business as usual]]></category>

		<guid isPermaLink="false">http://silvermace.com/?p=177</guid>
		<description><![CDATA[Traditionally, an OpenGLES shader-program (SP) consisted of 2 shader-objects (SO) precisely one vertex shader and one fragment shader which get attached and linked into some GPU executable format, if either SO is missing or invalid the SP can&#8217;t be used. More annoyingly, in many situations a common vertex shader is used in combination with different fragment shaders, [...]]]></description>
			<content:encoded><![CDATA[<p>Traditionally, an OpenGLES shader-program (SP) consisted of 2 shader-objects (SO) precisely one vertex shader and one fragment shader which get attached and linked into some GPU executable format, if either SO is missing or invalid the SP can&#8217;t be used. More annoyingly, in many situations a common vertex shader is used in combination with different fragment shaders, but a program must exist for each unique pair of VPs and FPs.</p>
<p>This new extension in its current form allows two new changes that relax this requirement to make re-use and organisation of shaders at runtime easier for developers, to paraphrase the spec it allows developers to &#8220;mix-and-match&#8221; stages to create more flexible shader pipelines.</p>
<h2>Seperable Programs</h2>
<p>The first change is that a SP doesn&#8217;t need to have both vertex &amp; fragment shaders bound at link time for it to be considered valid, however this means that an SP that only has either a vertex shader or fragment shader bound (and not both) may not be consdered &#8220;complete&#8221; in a semantic sense; as-per the spec, using a SP that is missing a stage will produce results that are undefined for the missing stages. </p>
<p>Setting a SP to be &#8220;seperable&#8221; is done by setting it&#8217;s GL_PROGRAM_SEPARABLE_EXT parameter to GL_TRUE (just before linking):</p>
<blockquote><p>glProgramParameteriEXT( shaderProgramId, GL_PROGRAM_SEPARABLE_EXT, GL_TRUE );</p></blockquote>
<p>otherwise the SP object behaves as per the unextended spec, i.e. both the vertex and fragment stages must be specified before linking the SP.</p>
<p><em>SIDE NOTE: The glCreateShaderProgramvEXT API is provided to greatly reduce boilerplate and simplifies creation of a seperable shader, and should be your preferred way of creating seperable SP&#8217;s.</em></p>
<h2>Program Pipeline Object</h2>
<p>The second offering of this extension is the Program Pipeline Object (PPO). After linking a set of SP&#8217;s these are consolidated and named by a PPO to allow you to bind a permutation of SP&#8217;s using one named OpenGL object &#8211; the PPO. The PPO also allows uniforms to be set while bypassing the currently bound program object. The <em>glProgramUniform</em>* set  of functions take a PPO name as an argument, and the program to apply the uniform to.</p>
<h2>GLSL level attribute binding</h2>
<p>Supplemental improvements to the GLSL model included in this extension are the ability to set (and override application set) vertex attribute stream locations in GLSL source text. Without this extension, developers currently have to know the attribute identifier used in GLSL code to correctly bind it at runtime e.g.:</p>
<pre style="font-size: 7pt;"><code>// GLSL code:
attribute vec4 myPostion;
attribute vec3 myNormal;
void main() { ... }

// Application Code:
const int POSITION_ATTRIB_INDEX = 0;
const int NORMAL_ATTRIB_INDEX = 1;
...
glBindAttribLocation( prog, POSITION_ATTRIB_INDEX, "myPosition" );
glBindAttribLocation( prog, NORMAL_ATTRIB_INDEX, "myNormal" );
...
glVertexAttribPointer( POSITION_ATTRIB_INDEX, ... )
glVertexAttribPointer( NORMAL_ATTRIB_INDEX, ... )
...
</code></pre>
<p>When the <em>EXT_seperate_shader_objects</em> extension is available, the location index can be specified in shader source text, and also takes precedence over any <em>glBindAttribLocation</em> calls in application code, the above code is simplified by not needing the <em>glBindAttribLocation</em> calls and few changes in the GLSL text e.g.:</p>
<pre style="font-size: 7pt;"><code>// GLSL code:
#extension GL_EXT_separate_shader_objects : enable
layout(location = 0) attribute vec4 myPostion;
layout(location = 1) attribute vec3 myNormal;
void main() { ... }

// Application Code:
const int POSITION_ATTRIB_INDEX = 0;
const int NORMAL_ATTRIB_INDEX = 1;
...
glVertexAttribPointer( POSITION_ATTRIB_INDEX, ... )
glVertexAttribPointer( NORMAL_ATTRIB_INDEX, ... )
...
</code></pre>
<p>The main caveat to this is while is simplifies application code, developers will need to be consistent across several shader files for attribute location binding, though this isn&#8217;t hard and any conflicting layout(location) indexes will cause a GLSL-linker error.</p>
<h2>Example Usage (C++)</h2>
<pre style="font-size: 7pt;"><code>const GLchar* VertexProgramCode =
{
  //tell the driver we need to enable particular GLSL extensions
  //note that the \n is important here
  "#extension GL_EXT_separate_shader_objects : enable\n" 

  //use the layout(location) syntax extension
  "layout(location = 0) attribute vec4 position;"
  "uniform mat4 mvp;"
  "uniform vec4 custom_color;"
  "varying lowp vec4 color;"

  "void main() {"
  "  color = custom_color;"
  "  gl_Position = mvp * position;"
  "}"
};

const GLchar* FragmentProgramCode =
{
  "varying lowp vec4 color;"
  "void main() {"
  "  gl_FragColor = color;"
  "}"
};

class Effect
{
protected:
  void log_status(GLuint prog)
  {
    int len(0);
    const bool is_ppo(glIsProgramPipelineEXT(prog) == GL_TRUE);
    //if this looks odd, it's just an ternary function pointer select
    (is_ppo ? glGetProgramPipelineivEXT : glGetProgramiv)(prog, GL_INFO_LOG_LENGTH, &#038;len);
    if( len > 0 ) {
      GLchar log[len];//gcc extension: non-const array size
      (is_ppo ? glGetProgramPipelineInfoLogEXT : glGetProgramInfoLog)(prog, len, &#038;len, log);
      std::cerr << log << "\n";
    }
  }

  GLuint m_vp;
  GLuint m_fp;
  GLuint m_ppo;

  //vertex program variable locations
  GLint m_mvp_location;
  GLint m_custom_color_location;

public:
  float m_mvp[16];
  float m_custom_color[4];

  Effect() : m_vp(0), m_fp(0), m_ppo(0)
  {
    //identity
    for(int i=0; i<16; ++i)
      m_mvp[i] = (i%5==0)?1.0f:0.0f;

    //default to red
    m_custom_color[0] = 1;
    m_custom_color[1] = 0;
    m_custom_color[2] = 0;
    m_custom_color[3] = 1;
  }

  ~Effect() {
    unload_all();
  } 

  bool load_shaders()
  {
    //in a well designed system you would pick these out of an e.g. vertex/fragment effect pool
    m_vp = glCreateShaderProgramvEXT(GL_VERTEX_SHADER, 1, &#038;VertexProgramCode);
    log_status( m_vp );

    //bind the vertex program variables we need
    m_mvp_location = glGetUniformLocation( m_vp, "mvp");
    m_custom_color_location = glGetUniformLocation( m_vp, "custom_color");
    assert(m_mvp_location > -1);
    assert(m_custom_color_location > -1);

    m_fp = glCreateShaderProgramvEXT(GL_FRAGMENT_SHADER, 1, &#038;FragmentProgramCode);
    log_status( m_fp );

    //generate and construct our PPO
    glGenProgramPipelinesEXT(1, &#038;m_ppo);  

    //this is where you would "mix-and-match" using the bitmask
    //in the 2nd parameter
    glUseProgramStagesEXT(m_ppo, GL_VERTEX_SHADER_BIT_EXT, m_vp);
    glUseProgramStagesEXT(m_ppo, GL_FRAGMENT_SHADER_BIT_EXT, m_fp);

    glValidateProgramPipelineEXT(m_ppo);
    log_status( m_ppo );

    int status(0);
    glGetProgramPipelineivEXT(m_ppo, GL_VALIDATE_STATUS, &#038;status);
    if( status == 0 )
      std::cerr << "unable to create program pipeline\n";
    return status != 0;
  }

  void unload_all()
  {
    glUseProgram(0);
    glBindProgramPipelineEXT(0);
    glDeleteProgramPipelinesEXT(1, &#038;m_ppo);
    glDeleteProgram(m_vp);
    glDeleteProgram(m_fp);
  }

  void bind_pipeline()
  {
    assert(m_ppo);
    glBindProgramPipelineEXT(m_ppo);
    glProgramUniformMatrix4fvEXT(m_vp, m_mvp_location, 1, 0, &#038;m_mvp[0]);
    glProgramUniform4fvEXT(m_vp, m_custom_color_location, 1, &#038;m_custom_color[0]);
  }
};
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2011/11/understanding-ext_separate_shader_objects-opengles-2-0-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>One liner to convert windows line endings to unix</title>
		<link>http://silvermace.com/2011/07/one-liner-to-convert-windows-line-endings-to-unix/</link>
		<comments>http://silvermace.com/2011/07/one-liner-to-convert-windows-line-endings-to-unix/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 23:27:05 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://silvermace.com/?p=171</guid>
		<description><![CDATA[I was looking for an easy, in place solution to do this and came up with this for OSX &#8211; other OSs YMMV (the sed implementation is a little temperamental on OSX). You can fire this in a single line in terminal and can easily extend the find command to suite your match criteria e.g. find -iname "*.cpp" [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>I was looking for an easy, in place solution to do this and came up with this for OSX &#8211; other OSs YMMV (the sed implementation is a little temperamental on OSX). You can fire this in a single line in terminal and can easily extend the find command to suite your match criteria e.g. <tt>find -iname "*.cpp" -or -iname "*.h" -or -iname "*.inl"</tt></p>
<p><code>for FILE in $(find . -iname "*.cpp"); do sed -i '' 's/.$//' $FILE; done;</code></p>
</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2011/07/one-liner-to-convert-windows-line-endings-to-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple explanations when you look closer</title>
		<link>http://silvermace.com/2011/06/simple-explanations-when-you-look-closer/</link>
		<comments>http://silvermace.com/2011/06/simple-explanations-when-you-look-closer/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 20:26:50 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://silvermace.com/?p=142</guid>
		<description><![CDATA[Say you have a project where you&#8217;re creating a static lib file, and sharing the header files on projects which use this new lib file of yours, with a simple header like this (Foo.h): struct Foo { #ifdef MY_PREPROCESSOR_FLAG int myFlags; #endif int myInteger; int myOtherInteger; }; I know this might seem obvious, but make sure that [...]]]></description>
			<content:encoded><![CDATA[<p>Say you have a project where you&#8217;re creating a static lib file, and sharing the header files on projects which use this new lib file of yours, with a simple header like this (Foo.h):</p>
<p><code> <strong>struct</strong> Foo {<br />
#ifdef MY_PREPROCESSOR_FLAG<br />
<strong> int</strong> myFlags;<br />
#endif<br />
<strong> int</strong> myInteger;<br />
<strong> int</strong> myOtherInteger;<br />
};</code></p>
<p>I know this might seem obvious, but make sure that if you define MY_PREPROCESSOR_FLAG in one project, that it is also defined at compile time of the other project! What caught me out was that the static lib and the project which uses the static lib share the same physical header file, but don&#8217;t share project settings in the same nature. So now you can easily see what happens if you have MY_PREPROCESSOR_FLAG defined in one project and not the other &#8211; in one of the projects sizeof(Foo) is 12 bytes, and in the other sizeof(Foo) is 8 bytes (on a 32bit machine).</p>
<p>The interesting thing &#8211; that might catch you out (it got me), is that assignments and copies will probably still work without crashing if you&#8217;re only writing to member variables directly (i.e. no function calls or vtable to crash over). In my case, I was only writing to members between this and this+8 (8 being the smaller size struct, so writes never really went out of bounds). Where the caller was expecting to have provided a Foo object where myInteger was 2 and myOtherInteger was 3, having a look at the disassembly output for myStaticLibApiFunc gives you the face palm moment (it gave me mine, I always prefer to look at assembler output, its not the most productive but I find I never have to second guess what the code is meant to be doing vs. what is actually running).</p>
<p>Anyway, from the assembly listing you can easily see the constant offsets on the stack register are off by the size of the #def guarded members.</p>
<p>(in dependant project, where MY_PREPROCESSOR_FLAG is defined)</p>
<p><code>myStaticLibApiFunc( Foo(1, 2, 3) )</code></p>
<p>(the function in the static project where MY_PREPROCESSOR_FLAG isn&#8217;t defined)<code>void myStaticLibApiFunc( Foo f )<br />
{<br />
Foo x = f;<br />
print("%d", f.myInteger, f.myOtherInteger);<br />
}</code><br />
if the two compiled version of Foo matched and were 12 bytes, the generated assembly might be something like not the offsets in bold (this is just an quick hand coded approx, not compiler output so please forgive the assumptions!):<code>void myStaticLibApiFunc( Foo f )<br />
{<br />
mov $esp,$ebp<br />
<span style="color: #339966;"> //Assuming Foo x is located 24 bytes before esp,</span><br />
<span style="color: #339966;"> //and f is the 12 bytes following x</span><br />
<span style="color: #339966;"> //x.myFlags = f.myFlags</span><br />
mov 0x0c($ebp), $edx<br />
mov $edx, <strong>0x18</strong>($ebp)<br />
<span style="color: #339966;"> //x.myInteger = f.myInteger</span><br />
mov 0x08($ebp), $edx<br />
mov $edx, <strong>0x14</strong>($ebp)<br />
<span style="color: #339966;"> //x.myOtherInteger = f.myOtherInteger</span><br />
mov 0x04($ebp), $edx<br />
mov $edx, <strong>0x10</strong>($ebp)<br />
}</code></p>
<p>but what you&#8217;ve ended up with is this suspicously shorter version (missing the first assignment, and having the &#8220;wrong&#8221; offsets for myInteger and myOtherInteger<br />
<code>void myStaticLibApiFunc( Foo f )<br />
{<br />
mov $esp,$ebp<br />
<span style="color: #339966;"> //Assuming Foo x is located 16 bytes before esp,</span><br />
<span style="color: #339966;"> //and f is the 8 bytes following x</span><br />
<span style="color: #339966;"> //x.??? = f.myFlags</span><br />
<span style="color: #339966;"> //x.myInteger = f.myInteger</span><br />
mov 0x08($ebp), $edx<br />
mov $edx, <strong>0x10</strong>($ebp)<br />
<span style="color: #339966;">//x.myOtherInteger = f.myOtherInteger</span><br />
mov 0x04($ebp), $edx<br />
mov $edx, <strong>0x08</strong>($ebp)<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2011/06/simple-explanations-when-you-look-closer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS Crashlog symbolication</title>
		<link>http://silvermace.com/2011/04/ios-crashlog-symbolication/</link>
		<comments>http://silvermace.com/2011/04/ios-crashlog-symbolication/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 06:40:44 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://silvermace.com/?p=125</guid>
		<description><![CDATA[We recently had to take a look at some crashlogs that only had offsets in them (Symbolication didn&#8217;t happen for whatever reason &#8211; it usually does when XCode&#8217;s Organiser window downloads the logs of the device) Quick command line way of finding is using the atos tool. For our app CubeGame, you cd your way [...]]]></description>
			<content:encoded><![CDATA[<p>We recently had to take a look at some crashlogs that only had offsets in them (Symbolication didn&#8217;t happen for whatever reason &#8211; it usually does when XCode&#8217;s Organiser window downloads the logs of the device)</p>
<p>Quick command line way of finding is using the <em><a href="http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html">atos</a></em> tool. For our app CubeGame, you <em>cd</em> your way inside CubeGame.app (inside the app package, you have your actual binary executable called CubeGame) then fire off this command:</p>
<pre><a href="http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html">atos</a> -o CubeGame -arch armv7 0x000421ec</pre>
<p>0x000421ec is obviously the last code address in the stack trace that is inside your code. this is the output that was produced:</p>
<pre>WaveSet::createWaveSet(int, int) (in CubeGame) (WaveSet.cpp:58) </pre>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2011/04/ios-crashlog-symbolication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XCode Header Path Confusion</title>
		<link>http://silvermace.com/2011/03/xcode-header-path-confusion/</link>
		<comments>http://silvermace.com/2011/03/xcode-header-path-confusion/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:40:37 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Business as usual]]></category>

		<guid isPermaLink="false">http://silvermace.com/?p=117</guid>
		<description><![CDATA[XCode&#8217;s search rules for header paths are a strange beast. The most obvious aspects to take into consideration: Correct SDK root &#8220;Header Search Paths&#8221; (Project Settings) &#8220;User Header Search Paths&#8221; (Project Settings) &#8220;Always search user headers&#8221; (Project Settings) But there is one more element that will throw a spanner-of-confusing-impending-doom into the works: Header Maps. This nifty and [...]]]></description>
			<content:encoded><![CDATA[<p>XCode&#8217;s search rules for header paths are a strange beast. The most obvious aspects to take into consideration:</p>
<ul>
<li>Correct SDK root</li>
<li>&#8220;Header Search Paths&#8221; (Project Settings)</li>
<li>&#8220;User Header Search Paths&#8221; (Project Settings)</li>
<li>&#8220;Always search user headers&#8221; (Project Settings)</li>
</ul>
<p>But there is one more element that will throw a spanner-of-confusing-impending-doom into the works: Header Maps.</p>
<p>This <em>nifty</em> and <strong><em>undocumented </em></strong>feature is basically a dictionary of all the filenames in your project (just the filename, not a fully qualified path), supposedly to speed up building, but it definitely gets in the way (in a big way) sometimes.</p>
<p>To keep a long story really short, if your build looks like the header search paths are very confused for example #include &lt;math.h&gt; actually includes a file in your project named Math.h regardless of folder depth that resides somewhere in your project (you can check this using  &#8221;Build&#8221; &gt; &#8220;Preprocess&#8221; and check which files its actually #included&#8217;ed)</p>
<p>Project &gt; Edit Project Settings &gt; (Cog Button Bottom Left) &gt; Add User-Defined Setting</p>
<p>Name the setting <strong>USE_HEADERMAP </strong>and set its value to <strong>NO </strong>(EDIT 24/11/11: this was incorrectly USE_HEADERMAP<em>S &#8211; should not be plural, thanks Simon for pointing this out)</em></p>
<p>Now all header includes MUST be relative to the file they are included from OR be explicitly relative from any of your specified header search paths.</p>
<p>More reading provided below:</p>
<p><a href="http://web.archiveorange.com/archive/v/JT06F65y3o5h2vjWtjBo">http://web.archiveorange.com/archive/v/JT06F65y3o5h2vjWtjBo</a></p>
<p><a href="http://web.archiveorange.com/archive/v/JT06F65y3o5h2vjWtjBo"></a><a href="http://www.openradar.me/7840694">http://www.openradar.me/7840694</a></p>
<p><a href="http://www.omnigroup.com/mailman/archive/macosx-dev/2005-March/056049.html">http://www.omnigroup.com/mailman/archive/macosx-dev/2005-March/056049.html</a></p>
<p><a href="http://stackoverflow.com/questions/2596695/controlling-which-project-header-file-xcode-will-include">http://stackoverflow.com/questions/2596695/controlling-which-project-header-file-xcode-will-include</a></p>
<p>Excuse the keyword dump here, it was hard to find this out so I hope this will help others looking:<br />
cannot find correct system headers, header path order, include path order, search path order, Xcode include file quotes, header maps, hmap, import directive, include confused, incorrect include search path</p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2011/03/xcode-header-path-confusion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Qt Creator Debugger Not Displaying QString</title>
		<link>http://silvermace.com/2010/09/qt-creator-debugger-not-displaying-qstring/</link>
		<comments>http://silvermace.com/2010/09/qt-creator-debugger-not-displaying-qstring/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 21:54:59 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://silvermace.com/?p=95</guid>
		<description><![CDATA[So on MacOS Qt Creator&#8217;s debugger (Qt 4.6) has been driving me nuts because for some reason it refused to display QString&#8217;s and other known internal types properly. After hunting around I found this bug report which refers to the 2010.04 SDK which is the one I have installed. The dylib with the gdb extensions [...]]]></description>
			<content:encoded><![CDATA[<p>So on MacOS Qt Creator&#8217;s debugger (Qt 4.6) has been driving me nuts because for some reason it refused to display QString&#8217;s and other known internal types properly.</p>
<p>After hunting around I found this bug report which refers to the 2010.04 SDK which is the one I have installed. The dylib with the gdb extensions that ships with this SDK is broken, but it&#8217;s amazingly simple to fix because Qt Creator allows you to rebuild the dylib from the preference panel with one click (now thats a totally new height in open source software!).</p>
<ol>
<li>sudo rm /usr/local/Qt4.6/qtc-debugging-helper/libgdbmacros.dylib</li>
<li>Start Qt Creator</li>
<li>Qt Creator -&gt; Preferences -&gt; Select the &#8220;Qt&#8221; tab -&gt; Select &#8220;Qt in PATH&#8221; under &#8220;Auto-detect&#8221;</li>
<li>There should be a red cross next to the label &#8220;Debugging Helper.&#8221; On the right of that there&#8217;s a rebuild button &#8211; hit it and wait.</li>
<li>The red cross should turn into a green tick.</li>
<li>Clean &amp; Build your project.</li>
</ol>
<p>More Reading: <a href="http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1799">Bug report with the official solution: QTCREATORBUG-1799</a></p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2010/09/qt-creator-debugger-not-displaying-qstring/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finding UID&#8217;s in MacOS X 10.5/10.6</title>
		<link>http://silvermace.com/2010/03/finiding-uids-in-macos-x-105106/</link>
		<comments>http://silvermace.com/2010/03/finiding-uids-in-macos-x-105106/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 23:50:46 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Business as usual]]></category>

		<guid isPermaLink="false">http://www.silvermace.com/?p=86</guid>
		<description><![CDATA[Was helping setup a VM/NFS share on a friends OSX machine using all_squash to remap the UID and GID. Unfortunately OSX doesn&#8217;t like using the /etc/group file as traditional linux, doesn&#8217;t provide uid and gid commands or the Netinfo utility. So to cut to the chase, to list the UIDs of the local users: dscl [...]]]></description>
			<content:encoded><![CDATA[<p>Was helping setup a VM/NFS share on a friends OSX machine using all_squash to remap the UID and GID. Unfortunately OSX doesn&#8217;t like using the /etc/group file as traditional linux, doesn&#8217;t provide uid and gid commands or the Netinfo utility. So to cut to the chase, to list the UIDs of the local users:</p>
<p><code>dscl /Local/Default -list /Users UniqueID</code></p>
<p>I&#8217;m sure altering the last &#8220;UniqueID&#8221; value (as it&#8217;s referred to as a &#8216;key&#8217;) will yeild more interesting info, this is left as an excercise to the reader <img src='http://silvermace.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2010/03/finiding-uids-in-macos-x-105106/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Postfix SMTPD with SASL and AUTHMYSQL</title>
		<link>http://silvermace.com/2010/01/postfix-smtpd-with-sasl-and-authmysql/</link>
		<comments>http://silvermace.com/2010/01/postfix-smtpd-with-sasl-and-authmysql/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 07:17:34 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Business as usual]]></category>

		<guid isPermaLink="false">http://www.silvermace.com/?p=81</guid>
		<description><![CDATA[Setting up Postfix can be a bit of a jungle of information, I was left scratching my head wondering why Postfix refused to relay an email to an external address even when provided valid user credentials. The issue seemed to be that Postfix SMTPD wasn&#8217;t paying any attention to the /etc/postfix/sasl/smtpd.conf file (which contained the [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up Postfix can be a bit of a jungle of information, I was left scratching my head wondering why Postfix refused to relay an email to an external address even when provided valid user credentials. The issue seemed to be that Postfix SMTPD wasn&#8217;t paying any attention to the /etc/postfix/sasl/smtpd.conf file (which contained the auxprop mysql authentication plugin configuration) and hence was falling back to its default PAM based system.</p>
<p>The fix was the most paintfully simple addition to the Postfix main.cf, highlighted bold. This fix seems to only apply to Ubuntu based environments and means that the smtpd daemon will actually pay attention to the contents of /etc/postfix/sasl/smtpd.conf</p>
<p><code>smtpd_sasl_auth_enable = yes<br />
smtpd_sasl_security_options = noanonymous<br />
smtpd_sasl_local_domain = $myhostname<br />
<em><strong>smtpd_sasl_application_name = smtpd</strong></em><br />
broken_sasl_auth_clients = yes<br />
</code></p>
<p>more reading: <a href="http://ubuntuforums.org/showthread.php?t=297462">http://ubuntuforums.org/showthread.php?t=297462</a></p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2010/01/postfix-smtpd-with-sasl-and-authmysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handy VC2008 Macro</title>
		<link>http://silvermace.com/2009/11/handy-vc2008-macro/</link>
		<comments>http://silvermace.com/2009/11/handy-vc2008-macro/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 23:34:56 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Business as usual]]></category>

		<guid isPermaLink="false">http://www.silvermace.com/?p=79</guid>
		<description><![CDATA[So, if you&#8217;ve ever tried to drag a folder from the filesystem into VS Solution Explorerer, sure it&#8217;ll recursively add all the files, but it wont mirror the folders in the solution, so you end up with every file placed at the root level of whatever &#8220;filter-folder&#8221; you dragged it into. This is very annoying [...]]]></description>
			<content:encoded><![CDATA[<p>So, if you&#8217;ve ever tried to drag a folder from the filesystem into VS Solution Explorerer, sure it&#8217;ll recursively add all the files, but it wont mirror the folders in the solution, so you end up with every file placed at the root level of whatever &#8220;filter-folder&#8221; you dragged it into. This is very annoying when you have a project with say ~1,500 files.</p>
<p>I thought about how I could get around this and have the Solution Explorer folders mirror the filesystem, first obvious option was write a shell script or macro to do it. So I fired up VS macro explorer and lo-and-behold theres a Sample macro which ships with VS called &#8220;AddDirAsSlnFolder&#8221;.</p>
<p>Looking very promising I checked out the source code, and sure enough it does exactly what I needed. The only thing I had to do to get it working exactly right was add &#8220;.svn&#8221; to the exclusions list (this is down the bottom of the source file and should be clearly visible next to all the other exclusions in the list)</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2009/11/handy-vc2008-macro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting FCollada to compile with VC++ 2008</title>
		<link>http://silvermace.com/2009/07/getting-fcollada-to-compile-with-vc-2008/</link>
		<comments>http://silvermace.com/2009/07/getting-fcollada-to-compile-with-vc-2008/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 00:41:25 +0000</pubDate>
		<dc:creator>Danushka</dc:creator>
				<category><![CDATA[Business as usual]]></category>

		<guid isPermaLink="false">http://www.silvermace.com/?p=73</guid>
		<description><![CDATA[When trying to build from the converted VC2005 solution file, you will encounter quite a few errors regarding mismatching declaration of _vsnprintf. error C3163: '_vsnprintf': attributes inconsistent with previous declaration the last post in this thread clarifies how this error arrises in common practice. To get it to compile I commented out these lines: FUtils\Platforms.h:145 [...]]]></description>
			<content:encoded><![CDATA[<p>When trying to build from the converted VC2005 solution file, you will encounter quite a few errors regarding mismatching declaration of _vsnprintf.</p>
<p><code>error C3163: '_vsnprintf': attributes inconsistent with previous declaration</code></p>
<p>the last post in <a href="http://social.msdn.microsoft.com/Forums/en-US/vsexpress2008installationandsetup/thread/24f0a7d9-d068-41f0-8827-fef35cd545de">this thread</a> clarifies how this error arrises in common practice. To get it to compile I commented out these lines:</p>
<ul>
<li> FUtils\Platforms.h:145</li>
<li>LibXML\config.h:92</li>
<li>LibXML\include\win32config.h:90</li>
<li>DLLEntry:40 (this one was just a missing symbol or something deprecated in new the PSDK shipping with VC9, the case statement is empty so commenting it out should have no effect)</li>
</ul>
<p>I should clearly note that I haven&#8217;t tested it (running etc.), I simply got it to build to help save our tools guy a bit of time. I should also note that the Unit Tests (FColladaTest) project builds but returns about 60 linker errors. I just thought I&#8217;d post here to save someone a bit of hassle if they should run into this error.</p>
<p>FCollada version was 3.05B Win32</p>
<p>-Danu</p>
]]></content:encoded>
			<wfw:commentRss>http://silvermace.com/2009/07/getting-fcollada-to-compile-with-vc-2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

