<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Ashenwolf (Sergii Gulenok)</title>
	
	<link>http://ashenwolf.info</link>
	<description>Freelancer portfolio</description>
	<lastBuildDate>Wed, 21 Mar 2012 07:33:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ashenwolf-dev" /><feedburner:info uri="ashenwolf-dev" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>ashenwolf-dev</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Using libjingle 0.5 in managed application</title>
		<link>http://feedproxy.google.com/~r/ashenwolf-dev/~3/svk53jp2sT4/</link>
		<comments>http://ashenwolf.info/2011/libjingle-0-5-in-managed-app/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 20:35:13 +0000</pubDate>
		<dc:creator>ashenwolf</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[libjingle]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://ashenwolf.info/?p=197</guid>
		<description><![CDATA[Today I&#8217;ve made first steps in developing the small jabber client that would suite my needs. I know it sounds retarted: just one more client, but I have tried almost all of them and hadn&#8217;t found my &#8220;silver bullet&#8221;. As far as I want it to be GTalk-compatible, the libjingle seems to be the only [...]]]></description>
			<content:encoded><![CDATA[<p><a style="margin: 0 1em 1em 0; float: left;" href="http://xmpp.org/"><img class="alignleft size-full wp-image-198" title="XMPP" src="http://ashenwolf.info/wordpress/wp-content/uploads/2011/06/xmpp.png" alt="XMPP" width="234" height="73" /></a> Today I&#8217;ve made first steps in developing the small jabber client that would suite my needs. I know it sounds retarted: just one more client, but I have tried almost all of them and hadn&#8217;t found my &#8220;silver bullet&#8221;. As far as I want it to be GTalk-compatible, the <a href="http://code.google.com/intl/uk-UA/apis/talk/libjingle/index.html">libjingle</a> seems to be the only choice for the backend. The general build of this library runs smoothly as long as you follow the instructions in readme file <img src='http://ashenwolf.info/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The first problem that had risen was how to use <em>libjingle</em> in the <em>managed application</em>.</p>
<p><span id="more-197"></span><br />
The main issue there is that by default libjingle is built using <em>static runtimes</em>, while <em>/clr</em> option for <em>managed C++</em> requires the DLL runtimes. Thus when you try to link the libjingle&#8217;s <em>&#8220;.lib&#8221;</em> files into the managed app it produces a lot of &#8220;symbol already defined&#8221; errors. The obvious way to solve is to build the libjingle using the dynamic runtimes. To do so you need to make few changes in <em>&#8220;main.scons&#8221;</em> file:</p>
<pre class="brush: python; title: ; notranslate">
win_env.Append(
  COMPONENT_LIBRARY_PUBLISH = True,  # Put dlls in output dir too
  CCFLAGS = [
   # ...skipped...
    '/wd4996',      # ignore POSIX deprecated warnings
    '/wd4275',      # ignore the warning on exporting class that was derived from non-exported (!!!)
   # ...skipped...
  ],

# ...skipped...

win_dbg_env.Prepend(
  CCFLAGS = [
      '/ZI',     # enable debugging
      '/Od',     # disable optimizations
      '/MDd',    # link with MSVCRTD.LIB (multi-threaded, dynamic linked crt) (!!!)
      '/RTC1',   # enable runtime checks
  ],

# ...skipped...

win_opt_env.Prepend(
  CCFLAGS=[
      '/Zi',     # enable debugging
      '/O1',     # optimize for size
      '/MD',     # link with MSVCRT.LIB (multi-threaded, dynamic linked crt) (!!!)
      '/GS',     # enable security checks
  ],
</pre>
<p>Changing the <em>&#8220;/MT&#8221;</em> and <em>&#8220;/MTd&#8221;</em> to <em>&#8220;/MD&#8221;</em> and <em>&#8220;/MDd&#8221;</em> is pretty obvious. Suppressing the <a href="http://msdn.microsoft.com/en-us/library/3tdb471s(v=vs.80).aspx">warning 4275</a> is required because flag to treat warnings as errors is set and there is at least one file that throws this warning. It is a quick hack and I am going to check if it is possible to fix it with changes in the code when I have more time. Then you can run the build again. The output <em>&#8220;.lib&#8221;</em> files are ready to use in managed code, however you will also need to add at least the following libraries to dependencies in managed part to get rid of the <em>&#8220;unresolved external symbol&#8221;</em> errors completely:</p>
<ul>
<li>wsock32.lib</li>
<li>ws2_32.lib</li>
<li>Advapi32.lib</li>
</ul>
<img src="http://feeds.feedburner.com/~r/ashenwolf-dev/~4/svk53jp2sT4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ashenwolf.info/2011/libjingle-0-5-in-managed-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ashenwolf.info/2011/libjingle-0-5-in-managed-app/</feedburner:origLink></item>
		<item>
		<title>My CruiseControl.NET and MSBuild Notes</title>
		<link>http://feedproxy.google.com/~r/ashenwolf-dev/~3/_st2H9KNzG4/</link>
		<comments>http://ashenwolf.info/2010/my-cruisecontrol-net-and-msbuild-notes/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 13:25:56 +0000</pubDate>
		<dc:creator>ashenwolf</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[ccnet]]></category>
		<category><![CDATA[cruisecontrol]]></category>
		<category><![CDATA[installaware]]></category>
		<category><![CDATA[msbuild]]></category>

		<guid isPermaLink="false">http://ashenwolf.info/?p=160</guid>
		<description><![CDATA[I&#8217;ve finally managed to completely rewrite our build script using CruiseControl.NET and MSBuild (previously we used FinalBuilder 5, but decided to leave it because of various reasons). The work itself was really interesting as far as I&#8217;ve never used MSBuild before. Well, ok, we did use it always when building .Net part of our application, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-173" title="CruiseControl.NET logo" src="http://ashenwolf.info/wordpress/wp-content/uploads/2010/10/ccnet_logo.gif" alt="" width="235" height="54" />I&#8217;ve finally managed to completely rewrite our build script using <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET">CruiseControl.NET</a> and <a href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx">MSBuild</a> (previously we used <a href="http://www.finalbuilder.com/home.aspx">FinalBuilder 5</a>, but decided to leave it because of various reasons). The work itself was really interesting as far as I&#8217;ve never used <em>MSBuild</em> before. Well, ok, we did use it always when building <em>.Net</em> part of our application, but that was really behind the scenes and we have never changed anything manually in <em>.vcproj</em> files.</p>
<p>At first I was really optimistic about writing all the stuff for our build solely on <em>CCNet</em>, but it appeared impossible because of its poor handling of user-defined variables and lack of flexibility for custom operations. That was the point where <em>MSBuild</em> helped a lot (take a look at <a href="http://msdn.microsoft.com/en-us/library/ms171479(VS.80).aspx">Simple MSBuild Project tutorial</a> to see what it looks like). I will describe several situations where I had to find own solution below.</p>
<p><span id="more-160"></span></p>
<h4>One CruiseControl.NET server for multiple projects</h4>
<p>I guess it is a common situation when one <em>CCNet server</em> is used to build several different projects (e.g. made by different teams). The projects&#8217; configurations themselves can be rather large and changing one of them in main <em>ccnet.config</em> file might cause problems for others. Also I think that it would be a good practice to have projects&#8217;s own configuration being versioned alongside the whole project. There are two means of including parts of configuration into the main config file: via XML&#8217;s ENTITY and via CCNet&#8217;s preprocessor. I prefer the latter one for two reasons: the code to include external files is much more readable and files included this way are automatically watched for changes (e.g. if you change external part the configuration automatically reloads). So in our case the <em>ccnet.config</em> files looks simply like:</p>
<pre class="brush: xml; title: ; notranslate">&lt;!DOCTYPE cruisecontrol&gt;
&lt;cruisecontrol xmlns:cb=&quot;urn:ccnet.config.builder&quot;&gt;
  &lt;cb:include href=&quot;path_to_project_1\project.config&quot;
    xmlns:cb=&quot;urn:ccnet.config.builder&quot; /&gt;
  &lt;cb:include href=&quot;path_to_project_2\project.config&quot;
    xmlns:cb=&quot;urn:ccnet.config.builder&quot; /&gt;
&lt;/cruisecontrol&gt;</pre>
<p>It&#8217;s really simple and effective.</p>
<h4>Control flow in CruiseControl.NET</h4>
<p>The latest stable version of CCNet (the 1.5 at this moment) I had did not have any means to separate control flow depending on dynamic values. It was announced to be the part of v1.6 release, but I did not want to risk with unstable version, so I had to download the <a href="http://ccnetconditional.codeplex.com/releases/view/36818">CCNet Conditional plugin</a>. The precompiled version did not work for me as far as CCNet did not see the plugin after copying to the rest of the CCNet server files. So I had to download the sources of the plugin and compile it on my work PC. The newly build plugin worked like a charm&#8230; until you need to use the logical operators: &#8220;or&#8221;/&#8221;and&#8221;. It seems to be a mistake in <a href="http://ccnetconditional.codeplex.com/wikipage?title=orConditions&amp;referringTitle=Documentation">plugin documentation</a> as far as it stated that the appropriate conditional tasks to be used in config file were called &#8220;orConditions&#8221;/&#8221;andConditions&#8221; respectively, but config file validation always failed on this element. After couple of hours spent in vain I&#8217;ve made a stupid thing: I removed the plural ending of the keyword, and it worked! So the typical usage of the conditionals in CCNet project would look like:</p>
<pre class="brush: xml; title: ; notranslate">&lt;conditional&gt;
  &lt;conditions&gt;
    &lt;orCondition&gt;
      &lt;conditions&gt;
        &lt;compareCondition value1=&quot;$[Distribution|None]&quot;
          evaluation=&quot;equal&quot; value2=&quot;CD&quot; /&gt;
        &lt;compareCondition value1=&quot;$[Distribution|None]&quot;
          evaluation=&quot;equal&quot; value2=&quot;Both&quot; /&gt;
      &lt;/conditions&gt;
    &lt;/orCondition&gt;
  &lt;/conditions&gt;
  &lt;tasks&gt;
    &lt;!-- primary tasks --&gt;
  &lt;/tasks&gt;
  &lt;elseTasks&gt;
    &lt;!-- alternative tasks --&gt;
  &lt;/elseTasks&gt;
&lt;/conditional&gt;</pre>
<h4>The long path CCNet Build Publisher problem</h4>
<p>I guess it is not a common problem, but we had to handle this case, Our <a href="http://www.installaware.com/">InstallAware</a> installer script generated the uncompressed package that contained .NET redistributables and when we tried to copy it to the server it appeared to have really long path names (e.g. they exceeded the limit of 260 characters) that caused build task to fail. We&#8217;ve tried several solutions (like using <em>xcopy</em>, or performing the copy operation by MSBuild script) but it looks like most of them have the same issue. So the last way we had to resort to is to use <a href="http://en.wikipedia.org/wiki/Robocopy">robocopy</a>. It is an official tool that is a part of Windows OS since <em>Vista</em> (i.e. <em>Server 2008</em> and <em>Win7</em> already have it) but for <em>Server 2003</em> we had to install additional <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en">Windows Resource Kit</a> package. Therefore there are couple of thing I suggest to pay attention to. First use <em>/NP</em> switch because otherwise your build log will be full of worthless copy progress lines. Second <em>robocopy</em> uses exit codes that are usually treated as errors (like 1, 2 etc), so you should ignore them (bad idea), or read <em>robocopy</em> docs and add exit code exceptions.</p>
<h4>MSBuild absolutely necessary plugin</h4>
<p>I cannot imagine having my work done without <a href="http://msbuildtasks.tigris.org/">MSBuildTasks</a> project. It has lots of cool stuff that is not really part of <em>MSBuild</em>, but turns it into the really powerful tool. Just download and install it and add following line in your <em>MSBuild</em> *proj file:</p>
<pre class="brush: xml; title: ; notranslate">&lt;Import Project=&quot;$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&quot; /&gt;</pre>
<h4>Altering properties by conditions in MSBuild</h4>
<p>One of the things that I needed to do was to generate the <em>DefineConstants</em> property for our project configuration depending on <em>CCNet</em> dynamic values. Moreover I needed to alter them according to user input. E.g. we have A/B switch and flag C. If switch is set to A then PROP_FOO should be set, if switch SWITCH_AB is set to B then PROP_BAR, and if FLAG_C is on, then PROP_BLAHBLAHBLAH should be added. It is done via the <em>PropertyGroup</em> item introduced in MSBuild v3.5:</p>
<pre class="brush: xml; title: ; notranslate">&lt;PropertyGroup Condition=&quot;'$(SWITCH_AB)' == 'A'&quot;&gt;
    &lt;DefineConstants&gt;PROP_FOO&lt;/DefineConstants&gt;
&lt;/PropertyGroup&gt;
&lt;PropertyGroup Condition=&quot;'$(SWITCH_AB)' == 'B'&quot;&gt;
  &lt;DefineConstants&gt;PROP_BAR&lt;/DefineConstants&gt;
&lt;/PropertyGroup&gt;
&lt;PropertyGroup Condition=&quot;'$(FLAG_C)' == 'yes'&quot;&gt;
  &lt;DefineConstants&gt;$(DefineConstants);PROP_BLAHBLAHBLAH&lt;/DefineConstants&gt;
&lt;/PropertyGroup&gt;</pre>
<p>Moreover with <em>PropertyGroup</em> the <em>CreateProperty</em> task is not needed anymore (in my cases at least).</p>
<h4>Autogenerating AssemblyInfo.cs with version info passed from CCNet</h4>
<p>As easy as pie:</p>
<pre class="brush: xml; title: ; notranslate">&lt;Import Project=&quot;$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&quot; /&gt;
&lt;Target Name=&quot;BeforeBuild&quot;&gt;
  &lt;AssemblyInfo
    Condition=&quot;'$(CCNetLabel)' != ''&quot; CodeLanguage=&quot;CS&quot;
    OutputFile=&quot;Properties\AssemblyInfo.cs&quot;
    AssemblyTitle=&quot;Software Name&quot;
    AssemblyCompany=&quot;My Company&quot;
    AssemblyProduct=&quot;Software Title&quot;
    AssemblyDescription=&quot;Software Description&quot;
    AssemblyCopyright=&quot;Copyright&quot;
    ComVisible=&quot;false&quot; Guid=&quot;xxxx-whatever&quot;
    AssemblyVersion=&quot;$(CCNetLabel)&quot;
    AssemblyFileVersion=&quot;$(CCNetLabel)&quot; /&gt;
&lt;/Target&gt;</pre>
<p>Magic!</p>
<h4>Passing values to MSBuild task</h4>
<p>It appears that only pre-defined CCNet values values (like <em>$CCNetLabel</em>) are passed to MSBuld task automatically. I wonder if there is a best solution, but if I needed to pass dynamic or custom values to MSBuild project, did it like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;msbuild&gt;
  &lt;executable&gt;C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe&lt;/executable&gt;
  &lt;projectFile&gt;MyReleaseScripts\so_something.proj&lt;/projectFile&gt;
  &lt;buildArgs&gt;/noconsolelogger
             /p:Distribution=0 &lt;!-- static value --&gt;
             /p:VersionShort=$(ProjectVersion) &lt;!-- custom value defined with cb:define --&gt;
             /p:BuildKind=$[BuildKind|nightly] &lt;!-- dynamic value --&gt;
             /p:CustomFlag=$[CustomFlag|yes] &lt;!-- dynamic value --&gt;
  &lt;/buildArgs&gt;
  &lt;targets&gt;$[Project|None]&lt;/targets&gt;
  &lt;timeout&gt;3600&lt;/timeout&gt;
  &lt;logger&gt;$(CCNetPath)\server\ThoughtWorks.CruiseControl.MsBuild.dll&lt;/logger&gt;
&lt;/msbuild&gt;</pre>
<img src="http://feeds.feedburner.com/~r/ashenwolf-dev/~4/_st2H9KNzG4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ashenwolf.info/2010/my-cruisecontrol-net-and-msbuild-notes/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://ashenwolf.info/2010/my-cruisecontrol-net-and-msbuild-notes/</feedburner:origLink></item>
		<item>
		<title>QModelIndex lookup</title>
		<link>http://feedproxy.google.com/~r/ashenwolf-dev/~3/8QBuOWnP6UQ/</link>
		<comments>http://ashenwolf.info/2010/qmodelindex-lookup/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 15:22:05 +0000</pubDate>
		<dc:creator>ashenwolf</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[qmodelindex]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://ashenwolf.info/?p=109</guid>
		<description><![CDATA[The MVC architecture of Qt *View classes is brilliant except one little thing that is not pretty obvious from the beginning: how to find the QModelIndex instance corresponding to specific internal pointer. I wonder why, but I&#8217;ve searched the Internet pretty much until I&#8217;ve found the possible solutions on Qt developer FAQ page: &#8220;How can [...]]]></description>
			<content:encoded><![CDATA[<p>The <em>MVC</em> architecture of Qt *View classes is brilliant except one little thing that is not pretty obvious from the beginning: how to find the <em>QModelIndex</em> instance corresponding to specific internal pointer. I wonder why, but I&#8217;ve searched the Internet pretty much until I&#8217;ve found the possible solutions on Qt developer FAQ page: <a href="http://developer.qt.nokia.com/faq/answer/how_can_a_qmodelindex_be_retrived_from_the_model_for_an_internal_data_item">&#8220;How can a QModelIndex be retrived from the model for an internal data item?&#8221;</a>. There are three possible solutions. I&#8217;ve chosen the first and the simplest one: &#8220;Use unique identifiers&#8221; as far as it matched our requirements. The main idea of this option is that when you create the instance of a <em>QModelIndex</em> you pass the pointer to some internal data, but you should be sure that there will be no <em>QModelIndex</em>&#8216;es pointing to the same data. So how to implement this approach?</p>
<p><span id="more-109"></span>There are only two simple steps to implement this approach. First of all you need to modify the <em>data()</em> overload of your <em>QAbstractItemModel</em> derived model class to return the pointer to the internal data on request for <em>Qt::UserRole</em> role.</p>
<pre class="brush: cpp; title: ; notranslate">// ... skipped
else if (role == Qt::UserRole)
{
return QVariant::fromValue(parent(index).internalPointer());
}
// ... skipped</pre>
<div>The second part is performing <em>match()</em> over your model:</div>
<pre class="brush: cpp; title: ; notranslate">QModelIndexList list = yourModel.match(
    yourModel.index(0,0),    // starting index for traverse
    Qt::UserRole,            // data source for comparison
    QVariant::fromValue((void*) yourInternalDataClass),    // searched value
    1,                       // maximum number of matched items, use -1 to return all
    Qt::MatchFlags(Qt::MatchRecursive)    // match flags
);</pre>
<p>Works like a charm&#8230;</p>
<img src="http://feeds.feedburner.com/~r/ashenwolf-dev/~4/8QBuOWnP6UQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ashenwolf.info/2010/qmodelindex-lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ashenwolf.info/2010/qmodelindex-lookup/</feedburner:origLink></item>
		<item>
		<title>OSG Marginalia</title>
		<link>http://feedproxy.google.com/~r/ashenwolf-dev/~3/Dx61bq2HUsY/</link>
		<comments>http://ashenwolf.info/2010/osg-marginalia/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 13:26:24 +0000</pubDate>
		<dc:creator>ashenwolf</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[gl extensions]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[osg]]></category>

		<guid isPermaLink="false">http://ashenwolf.info/?p=106</guid>
		<description><![CDATA[?While working with the OpenSceneGraph rendering engine I needed to test the possibility of using &#8220;true transparency&#8221; via Depth Peeling algorithm (here&#8217;s the PDF document for more details). Unfortunately it uses several non-common OpenGL extensions that may be unavailable on some graphic cards. Trying to perform DP on those cards causes application to crash and [...]]]></description>
			<content:encoded><![CDATA[<p>?<a href="http://ashenwolf.info/wordpress/wp-content/uploads/2010/09/dp.png"><img class="alignright size-medium wp-image-107" title="Depth Peeling dragon" src="http://ashenwolf.info/wordpress/wp-content/uploads/2010/09/dp-295x300.png" alt="" width="295" height="300" /></a>While working with the <a href="http://www.openscenegraph.org/">OpenSceneGraph</a> rendering engine I needed to test the possibility of using &#8220;true transparency&#8221; via <em>Depth Peeling</em> algorithm (here&#8217;s the <a href="http://developer.nvidia.com/attach/6545">PDF document</a> for more details). Unfortunately it uses several non-common OpenGL extensions that may be unavailable on some graphic cards. Trying to perform DP on those cards causes application to crash and to turn DP off on unsupported hardware some checks need to be done. So how to make it more stable and enable <em>Depth Peeling</em> only on supported hardware?</p>
<p><span id="more-106"></span></p>
<p>Following extensions need to be supported by your graphic adapter:</p>
<ul>
<li><tt>GL_ARB_depth_texture</tt> or OpenGL&gt;=1.4</li>
<li><tt>GL_ARB_shadow</tt> or OpenGL&gt;=1.4</li>
<li><tt>GL_EXT_shadow_funcs</tt> or OpenGL&gt;=1.5</li>
<li><tt>GL_ARB_vertex_shader</tt> or OpenGL&gt;=2.0</li>
<li><tt>GL_ARB_fragment_shader</tt> or OpenGL&gt;=2.0</li>
<li><tt>GL_ARB_shader_objects</tt> or OpenGL&gt;=2.0</li>
<li><tt>GL_ARB_occlusion_query</tt> or OpenGL&gt;=1.5</li>
<li><tt>GL_ARB_multitexture</tt> or OpenGL&gt;=1.3</li>
<li><tt>GL_ARB_texture_rectangle</tt></li>
<li><tt>GL_SGIS_texture_edge_clamp</tt> or <tt>GL_EXT_texture_edge_clamp</tt> or OpenGL&gt;=1.2</li>
</ul>
<p>When using <em>OSG</em> it is not necessary to perform direct <em>OpenGL</em> calls as far as <em>OSG</em> has own wrappers. To check <em>GL extensions</em> you can use the following function:</p>
<pre class="brush: cpp; title: ; notranslate">bool osg::isGLExtensionSupported(contextID, extensionName);</pre>
<p>You will probably want to check all those things on application startup or something like that, but using the <em>GL context</em> of your <em>OSG viewer</em> instance. Beware: the <em>context</em> is not valid outside the <em>OSG</em> frame loop. However guys from OSG users mailing list suggest to avoid doing OpenGL calls directly in the frame loop, and instead use a Camera initial/pre/post/final draw callback to do extra OpenGL calls.  This approach works for all threading models and viewer configurations. It works indeed, but in my case we need to perform the checks only once on startup, so while this solution is working it has some overhead. I wonder if we will have to create another GL context just to perform this operation without using OSG? Uh, what a bother&#8230;</p>
<img src="http://feeds.feedburner.com/~r/ashenwolf-dev/~4/Dx61bq2HUsY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ashenwolf.info/2010/osg-marginalia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ashenwolf.info/2010/osg-marginalia/</feedburner:origLink></item>
		<item>
		<title>Unofficial Win32 Binaries for Python Extensions</title>
		<link>http://feedproxy.google.com/~r/ashenwolf-dev/~3/PUKoICOUC7Q/</link>
		<comments>http://ashenwolf.info/2010/unofficial-win32-binaries-for-python-extensions/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 09:32:32 +0000</pubDate>
		<dc:creator>ashenwolf</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://ashenwolf.info/?p=103</guid>
		<description><![CDATA[I am kinda lazy and don&#8217;t like to waste time to build python packages from scratch. Well, easy_install handles most of the cases perfectly but only when the extension does not require some external tool or library. The typical example is PycUrl library. You have to download the cURL itself, do this, than do that&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>I am kinda lazy and don&#8217;t like to waste time to build python packages from scratch. Well, <a href="http://pypi.python.org/pypi/setuptools">easy_install</a> handles most of the cases perfectly but only when the extension does not require some external tool or library. The typical example is PycUrl library. You have to download the cURL itself, do this, than do that&#8230; and it is quite bothersome. Hopefully I have found the amazing place where lots of packages are prebuilt for Python 2.6 and 2.7: <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/">&#8220;Unofficial Windows Binaries for Python Extension Packages&#8221;</a>. It is a real time-saver&#8230;</p>
<img src="http://feeds.feedburner.com/~r/ashenwolf-dev/~4/PUKoICOUC7Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ashenwolf.info/2010/unofficial-win32-binaries-for-python-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ashenwolf.info/2010/unofficial-win32-binaries-for-python-extensions/</feedburner:origLink></item>
		<item>
		<title>Portfolio site launched</title>
		<link>http://feedproxy.google.com/~r/ashenwolf-dev/~3/nQTT0SDAfgM/</link>
		<comments>http://ashenwolf.info/2010/ashenwolf-portfolio-site-launched/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 11:38:22 +0000</pubDate>
		<dc:creator>ashenwolf</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ashenwolf.info/?p=15</guid>
		<description><![CDATA[Finally I&#8217;ve found some time to spend on the portfolio site I wanted to have for a long time. Well, I have the blog of mine, but it is not connected with my professional side for the most part and is written in Ukrainian that is my native language while my customers are usually English-speaking. [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I&#8217;ve found some time to spend on the portfolio site I wanted to have for a long time. Well, I have the blog of mine, but it is not connected with my professional side for the most part and is written in Ukrainian that is my native language while my customers are usually English-speaking. So here is the place where I will collect the showcases of my capabilities and also I&#8217;ll try to make the blog here be useful to other fellow developers by sharing my experience. Hope it will also help me improve my English which is not my native language. So &#8220;do your best!&#8221; to me and &#8220;welcome!&#8221; to you!</p>
<img src="http://feeds.feedburner.com/~r/ashenwolf-dev/~4/nQTT0SDAfgM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ashenwolf.info/2010/ashenwolf-portfolio-site-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ashenwolf.info/2010/ashenwolf-portfolio-site-launched/</feedburner:origLink></item>
	</channel>
</rss>

