<?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>Visual-Experiments.com &#187; nvidia</title>
	<atom:link href="http://www.visual-experiments.com/tag/nvidia/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visual-experiments.com</link>
	<description>ASTRE Henri experiments with Ogre3D and web stuff</description>
	<lastBuildDate>Mon, 16 Jan 2017 18:59:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Cuda integration with Ogre3D</title>
		<link>http://www.visual-experiments.com/2010/04/26/cuda-integration-with-ogre3d/</link>
		<comments>http://www.visual-experiments.com/2010/04/26/cuda-integration-with-ogre3d/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 07:17:57 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[ogre3d]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[nvidia]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=85</guid>
		<description><![CDATA[If you already start to play with Cuda you know that graphic interop is not an easy task. Indeed you need to register graphic ressources using different methods accordings to the Ogre::RenderSytem (DX9, DX10, GL). As Ogre3D main objective is to hide DirectX and OpenGL &#8220;specificities&#8221;,  I have decided to create a tiny lib for Ogre3D [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.visual-experiments.com/blog/wp-content/uploads/2010/03/nvidia-cuda.jpg"><img class="alignleft size-full wp-image-86" title="nvidia cuda" src="http://www.visual-experiments.com/blog/wp-content/uploads/2010/03/nvidia-cuda.jpg" alt="" width="130" height="79" /></a>If you already start to play with Cuda you know that graphic interop is not an easy task. Indeed you need to register graphic ressources using different methods accordings to the Ogre::RenderSytem (DX9, DX10, GL). As Ogre3D main objective is to hide DirectX and OpenGL &#8220;specificities&#8221;,  I have decided to create a tiny lib for Ogre3D to help registering and mapping ressources for Cuda. This tiny lib, named <a href="http://www.visual-experiments.com/demos/ogrecuda/">Ogre::Cuda</a>, helps registering Ogre::Texture and Ogre::HardwareVertexBuffer for Cuda.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="290" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/0KkB38CB3vY&amp;hl=fr_FR&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="290" src="http://www.youtube.com/v/0KkB38CB3vY&amp;hl=fr_FR&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This video is just a very basic example showing an integration of two Cuda samples inside Ogre3D. The vertex buffer and the 2D texture cuda kernels are part of the Nvidia GPU Computing SDK.</p>
<p>This library is in beta stage, there is still room for improvement, but the base are settled for a cross-platform and cross-graphics API way to use Cuda thanks to Ogre3D.</p>
<p>Source code and binary demo available on the <a href="http://www.visual-experiments.com/demos/ogrecuda/">demo page</a>.</p>
<h3>Utilisation example :</h3>
<pre class="brush: cpp; title: ;">
Ogre::TexturePtr texture;
Ogre::Cuda::Root* mCudaRoot = Ogre::Cuda::Root::createRoot(renderWindow, renderSystem);
mCudaRoot-&gt;init();
Ogre::Cuda::Texture* mCudaTex;
mCudaTex = mCudaRoot-&gt;getTextureManager()-&gt;createTexture(texture);
//init
mCudaTex-&gt;registerForCudaUse();
//on each Cuda update
mCudaTex-&gt;map();
Ogre::Cuda::TextureDeviceHandle textureHandle;
textureHandle = mCudaTex-&gt;getDeviceHandle(0, 0);
cudaFunction(textureHandle-&gt;getPointer());
mCudaTex-&gt;update(textureHandle); //reflect changes to the Ogre::Texture
mCudaTex-&gt;unmap();
//shutdown
mCudaTex-&gt;unregister();
mCudaRoot-&gt;shutdown();
</pre>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2010%2F04%2F26%2Fcuda-integration-with-ogre3d%2F&amp;title=Cuda%20integration%20with%20Ogre3D"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2010/04/26/cuda-integration-with-ogre3d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
