<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with scenix - NVIDIA Developer Forums</title>
      <link>http://forums.developer.nvidia.com/devforum/discussions/tagged/scenix/feed.rss</link>
      <pubDate>Wed, 16 May 12 17:36:46 -0400</pubDate>
         <description>Tagged with scenix - NVIDIA Developer Forums</description>
   <language>en-CA</language>
   <atom:link href="/devforum/discussions/taggedscenix/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Cg Runtime : CG_FILE_READ_ERROR</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/8126/cg-runtime-cg_file_read_error</link>
      <pubDate>Sun, 13 May 2012 08:34:27 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">8126@/devforum/discussions</guid>
      <description><![CDATA[Hi all, <br />Im having a trouble with CG context error: <br />when trying to create an effect I get :<br />err = "Cg runtime error: The file could not be read."<br />What Is necessarily needed for the success of creating an effect?<br /><br />Im trying to create the effect from the lump code i pasted down, <br />but for some reason it fails.<br />(The problem occurs only when trying to compile it from a specific call stack order)<br /><br />std::string test= <br />"// Vertex attribute interface:\n"<br />"struct APP2VP\n"<br />"{\n"<br />"  float4 position : POSITION;\n"<br />"  float4 Normal	: NORMAL;\n"<br />"  float4 UV		: TEXCOORD0;\n"<br />"};\n"<br />"// Varyings interface:\n"<br />"struct VP2FP \n"<br />"{\n"<br />"  float4 position : POSITION;\n"<br />"  float2 UV : TEXCOORD4;\n"<br />"};\n"<br /><br />"// VERTEX PROGRAM\n"<br />"VP2FP vp(APP2VP IN)\n"<br />"{\n"<br />"  VP2FP OUT;\n"<br />"  OUT.position = IN.position;\n"<br />"  OUT.UV = IN.UV.xy;\n"<br />"  return OUT;\n"<br />"}\n"<br />"// FRAGMENT PROGRAM\n"<br /><br /><br />"float4 fp(VP2FP IN) : COLOR\n"<br />"{\n"   <br />"  \n"<br />"  return float4(1,0,0,0);\n"<br />"}\n"<br />"technique render\n"<br />"{\n"<br />"  pass both\n"<br />"  {\n"<br />"    VertexProgram   = compile latest vp();\n"<br />"    FragmentProgram = compile latest fp();\n"<br />"  }\n"<br />"}\n";<br /><br />Thanks!<br /><br />Update:<br />If I paste the create from lump call :<br /><br /><code><br />cgfxHdl = CgFx::createFromLump( test ,m_searchPaths,err,failOnTexLoad );<br /></code>	<br /><code><br />cgfxHdl = CgFx::createFromLump( test ,m_searchPaths,err2,failOnTexLoad );<br /></code>	<br /><br />Than the second call succeeds! ]]></description>
   </item>
      <item>
      <title>Performance advices?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/8081/performance-advices</link>
      <pubDate>Fri, 11 May 2012 11:28:55 -0400</pubDate>
      <dc:creator>jamesclarke</dc:creator>
      <guid isPermaLink="false">8081@/devforum/discussions</guid>
      <description><![CDATA[Hi, it's me again. Sorry for so many questions these days.<br /><br />I am working on a project of terrain rendering. I need some performance advices, please help me. Thank you!<br /><br />I am using Quadtree for LOD with two graph trees, one for rendering and the other for preparing. However, I found switching between these two trees comsumes a lot of time. I have tried "Switch" class, and it seems not a good choice. Would hints (NVSG_HINT_ALWAYS_INVISIBLE) or the TraversalMask mechanism be useful?<br /><br />ps: <br />the whole process is : when viewpoint moves, find the terrain nodes which are not changed, from the rendering tree, and reuse them in the preparing tree; read new terrain data and build new nodes into the preparing tree; switch the rendering tree and the preparing tree.]]></description>
   </item>
      <item>
      <title>&quot;isPtrTo&quot; and &quot;sharedPtr_cast&quot; problems</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7921/isptrto-and-sharedptr_cast-problems</link>
      <pubDate>Sun, 06 May 2012 00:04:08 -0400</pubDate>
      <dc:creator>jamesclarke</dc:creator>
      <guid isPermaLink="false">7921@/devforum/discussions</guid>
      <description><![CDATA[when I derived the class Group, I had some problems. I made a new class called CTerrainGroup deriving from Group. However, when I traversered the scene graph, it was hard for me to get the right judgement of which class it was and couldn't sharedPtr_cast it. The code is as followed:<br /><code><br />GroupReadLock roGroup(root);    <br />for ( Group::ChildrenConstIterator it = roGroup-&gt;beginChildren(); it != roGroup-&gt;endChildren(); ++it )    <br />{      	 <br />	 if ( isPtrTo&lt;CTerrainGroup&gt;(*it) )    // --&gt; can't work   	 <br />	 {        	 	<br />	 	 CTerrainGroupSharedPtr bbt1 =  sharedPtr_cast&lt;CTerrainGroup&gt;(*it) ;   //--&gt; can't work   	 	 <br />	 	 CTerrainGroupWeakPtr bbt2 =  weakPtr_cast&lt;CTerrainGroup&gt;(*it.get()) ;	 <br />	 }    <br />}</code><br />It is really weird that "isPtrTo" and "sharedPtr_cast" can't deal with user derived classes. With SceniX own classes they work well. However "weakPtr_cast" works well. Could experts please help me with these problems? ]]></description>
   </item>
      <item>
      <title>How to get the parent node pointer?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7786/how-to-get-the-parent-node-pointer</link>
      <pubDate>Wed, 02 May 2012 12:50:57 -0400</pubDate>
      <dc:creator>jamesclarke</dc:creator>
      <guid isPermaLink="false">7786@/devforum/discussions</guid>
      <description><![CDATA[Is there any way to get the parent node pointer from the current node? I didn't find any function in node class for querying. Could someone give me some clues? Thank u very much!]]></description>
   </item>
      <item>
      <title>how to make picking with a selection box?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7986/how-to-make-picking-with-a-selection-box</link>
      <pubDate>Wed, 09 May 2012 15:21:16 -0400</pubDate>
      <dc:creator>illogiccode</dc:creator>
      <guid isPermaLink="false">7986@/devforum/discussions</guid>
      <description><![CDATA[Hello,<br /><br />Did anyone knows what is the path to make this feature works?<br />I need to select every object that falls inside a selection box create on the fly by the user, much like the image attached here.<br /><br />I can already create and draw the selection box. Can make the picking of a single clicked point in the screen, BUT don't have any ideia on how to make the entire area inside the selection box to be selected.<br />In the single clicked picking only the near object is picked, but with this selection box ALL objects that lies inside would be selected regard of the depth.<br />In the attached image, the first 4 objects, from left to rigth, need to be selected.<br /><br />Any ideas how i can do this?<br /><br />Just an extension of this feature would be making a "laço-tool" for selection of irregular areas but perhaps it would be too difficult. (secondaries for now)<br /><br />Can anyone help?<br /><br />thanks,<br />Luis<br /><br />]]></description>
   </item>
      <item>
      <title>Real-time soft shadows in SceniX Optix using shadow maps issue?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7791/real-time-soft-shadows-in-scenix-optix-using-shadow-maps-issue</link>
      <pubDate>Wed, 02 May 2012 13:01:21 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">7791@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I am implementing a hybrid solution of ray-tracing soft shadows that relies on shadows maps to speed things up. I have my shadow maps (depth) stored in sampler2DARRAY layers generated from CgFX shader code.<br /><br />It works fine for primary rays as I can keep most of the visibility work in CgFX. The problem comes when rendering reflections and refractions as my renderer then crosses over to the RTFx shader code to do its work. I then would need access to the sampler2DARRAY shadow maps, from within RTFx.<br /><br />I've asked a similar question before and the answer was to use demandUpload; meaning a GPU to CPU copy and then a CPU to GPU copy to give RTFx access to CGFx samplers. Because of the number of shadow maps this would quickly saturate, not a possible solution in this case.<br /><br />Is there a GPU to GPU solution to enable TextureGL2DArray textures created in OpenGL that can be read directly by Optix in Scenix?<br /><br />Thanks for any help,<br />Jules<br />]]></description>
   </item>
      <item>
      <title>max texture size</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7776/max-texture-size</link>
      <pubDate>Wed, 02 May 2012 09:56:09 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">7776@/devforum/discussions</guid>
      <description><![CDATA[Hi all, <br />I wish to produce a 8K*6K snapshots (TextureGL FBO).<br /><br />My Graphic card: Geforce GTX 470 <br />driver version: 296.10<br />Windows 7 64 bit<br /><br />I'm able to produce a max of 5K*5K snap shots (FBO texture size)<br />larger than that produces black snap shots.<br />I also get this Nvidia massage:  <br /><a href="http://nvidia.custhelp.com/app/answers/detail/a_id/3008"><br />hardware does not meet minimum specifications</a><br />when tweaking shadowmap sizes or snap shot size.<br />(occurs inconsistently)<br /><br /><br />Do I need a better graphic card for 8K*6K texture size?<br />How can I tell machine max texture size? <br /><br />I tried:<br />GLint texSize;<br />GLGetIntegerv(GL_MAX_TEXTURE_SIZE, &amp;texSize);<br />and got : 16384 , does that mean max size in pixels^2 ? i.e width*height ..? <br /><br />What machines Can produce such higher texture size?<br /><br /><br />Also,<br />I tested another machine<br />a Quadro FX 5800<br />driver version: 275.89<br />there i get even smaller texture size: 8192<br />and i get black snap shots at 2K*2K <br />Thanks!]]></description>
   </item>
      <item>
      <title>Should user-defined data be deleted manually?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7781/should-user-defined-data-be-deleted-manually</link>
      <pubDate>Wed, 02 May 2012 12:44:27 -0400</pubDate>
      <dc:creator>jamesclarke</dc:creator>
      <guid isPermaLink="false">7781@/devforum/discussions</guid>
      <description><![CDATA[I have noticed that there is a parameter of user-defined data in Node class which can be used for store user relevant data. I am wondering whether it should be deleted manually? Because Node is a smart pointer, we can use it freely without considering its deconstruction explicitly. Can it deal with the user-defined data smartly? Thanks!]]></description>
   </item>
      <item>
      <title>Scenix deadlock</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7596/scenix-deadlock</link>
      <pubDate>Thu, 26 Apr 2012 15:16:07 -0400</pubDate>
      <dc:creator>cdechenne</dc:creator>
      <guid isPermaLink="false">7596@/devforum/discussions</guid>
      <description><![CDATA[I'm having a deadlock issue, which I'm hoping someone can fill me in on the error.  When the deadlock issue occurs, there are two threads that are working with the scene graph.  One thread is calling the apply of a search traverser, and the other thread is setting the transformation of a transform node.  <br /><br />Thread 1:<br /><code>	// Set the name to look for<br />	searchTraverser-&gt;setObjectName((LPCTSTR)in_name);<br />    searchTraverser-&gt;setClassName( "class nvsg::Group" );<br />    searchTraverser-&gt;setBaseClassSearch( true );<br /><br />	// Do the search<br />	searchTraverser-&gt;apply(m_sceneHdl);  // Deadlocks here<br /><br />	// Get the results<br />	const vector&lt;ObjectHandle*&gt; &amp;searchResults = searchTraverser-&gt;getResults();<br /></code><br /><br />Thread 2:<br /><code>		// Set the transform<br />		{<br />			WritableObject&lt;Transform&gt; digitXform(digitXformHandles[i]);  // Deadlocks here<br />			digitXform-&gt;setTrafo(digitTrafo[i]);<br />		}</code><br /><br />I'm using Scenix 6.  Anyone have any ideas?]]></description>
   </item>
      <item>
      <title>Is there any example or document about &quot;manipulate&quot; and &quot;hid&quot; in MFC with SceniX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7306/is-there-any-example-or-document-about-manipulate-and-hid-in-mfc-with-scenix</link>
      <pubDate>Thu, 19 Apr 2012 06:28:44 -0400</pubDate>
      <dc:creator>jamesclarke</dc:creator>
      <guid isPermaLink="false">7306@/devforum/discussions</guid>
      <description><![CDATA[Hey guys, when I started to learn programming with SceniX 7.2, I found it was quite different from the previous editions. And there is little information about how to respond mouse and key messages and how to control cameras, especially in MFC environments. Indeed, I found some examples in the dir "samples", like "manipulate.h" and "hid.h". However, there is no explanation about how to use them. Since I am not familiar with wxWidget and Qt, it is really difficult for me to read the codes. So I come to ask for help. Does anyone have some information about how to deal with the HID in MFC? Plz help me or give me some instructions. Really preciate! Sorry for my poor English...]]></description>
   </item>
      <item>
      <title>Multithreading a SceneLoader</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7481/multithreading-a-sceneloader</link>
      <pubDate>Tue, 24 Apr 2012 15:01:29 -0400</pubDate>
      <dc:creator>cdechenne</dc:creator>
      <guid isPermaLink="false">7481@/devforum/discussions</guid>
      <description><![CDATA[I'm trying to multithread the scene loading for my Scenix based application.  I have eight threads working to load different portions of the scene.  Every once in a while I get a crash on the load function of the SceneLoader, and it seems to be somewhere in the std::string (which is not thread safe).  Since I'm using local variables as arguments to the load function for each thread, I'm guessing that the SceneLoader plugin itself somehow is not thread safe?  I'm actually creating (getting) a SceneLoader for each thread too, but I'm guessing that it is referencing one pointer behind the scenes.  Can anyone confirm this?<br /><br />Thanks!]]></description>
   </item>
      <item>
      <title>Mapping textures on a digital terrain model</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7636/mapping-textures-on-a-digital-terrain-model</link>
      <pubDate>Fri, 27 Apr 2012 09:10:44 -0400</pubDate>
      <dc:creator>marionantony</dc:creator>
      <guid isPermaLink="false">7636@/devforum/discussions</guid>
      <description><![CDATA[Hi all,<br /><br />I am using scenix to map tiles on a digital terrain model.<br /><br />I have got the following arrays to describe the vertices, normals, faces and textures :<br /><br /><code>		long nTotalPoints = hGroup.dwNumFaces * 3;<br />		Vec3f * v = new Vec3f[nTotalPoints];<br />		Vec3f * n = new Vec3f[nTotalPoints];<br />		Vec2f * t = new Vec2f[nTotalPoints];<br />		Face3 * f = new Face3[hGroup.dwNumFaces*2];<br /></code><br /><br />When I first build my arrays in the following loop and then map the texture (like below)<br />I have got no trouble: <br /><br /><code>	<br /><br />				long nKF=0, nKV=0;<br />				for (DWORD nF=0,nPt=0; nF&lt;hGroup.dwNumFaces; nF++,nPt+=3)<br /><br />				{<br /><br />						v0 = pSceneVertices[hGroup.pSceneFaces[nF].x];<br />						v1 = pSceneVertices[hGroup.pSceneFaces[nF].y];<br />						v2 = pSceneVertices[hGroup.pSceneFaces[nF].z];<br /><br />						d0 = v1 - v0;<br />						d1 = v2 - v0;<br /><br />						fn = d0^d1;<br />						fn.normalize();<br /><br />						hGroup.pSceneNormals[nF].x = fn[0];<br />						hGroup.pSceneNormals[nF].y = fn[1];<br />						hGroup.pSceneNormals[nF].z = fn[2]<br /><br />						f[nKF][0] = nKV;<br />						f[nKF][1] = nKV+1;<br />						f[nKF][2] = nKV+2;<br /><br />						v[nKV]    = v0;<br />						v[nKV+1]  = v1;<br />						v[nKV+2]  = v2;<br /><br />						n[nKV]    = fn; <br />						n[nKV+1]  = fn; <br />						n[nKV+2]  = fn;<br /><br />						t[nKV]    = texCoordsF[nPt  ]; <br />						t[nKV+1]  = texCoordsF[nPt+1]; <br />						t[nKV+2]  = texCoordsF[nPt+2]; <br /><br /><br />						nKF++;<br />						nKV += 3;<br /><br />	 	 	 	 }<br /></code>	<br />...<br /><code>	<br />					// Create a VertexAttributeSet with vertices and normals<br />					VertexAttributeSetHandle * vasHdl = CreateHandle(VertexAttributeSetHandle);<br />					{<br />						WritableObject&lt;VertexAttributeSet&gt; vas(vasHdl);<br />						vas-&gt;setVertices( v, nKV );<br />						vas-&gt;setNormals( n, nKV );<br />						if (pTexture) <br />						{<br />						vas-&gt;setTexCoords( 0, t, nKV );<br />						}<br />					}<br /><br />					// Create a PrimitiveSet, in this case triangles.<br />					TrianglesHandle * shapeHdl = CreateHandle(TrianglesHandle);<br />					{<br />						WritableObject&lt;Triangles&gt; triangles(shapeHdl);<br />						triangles-&gt;setVertexAttributeSet( vasHdl );<br />						triangles-&gt;setFaces(f, nKF );<br />						triangles-&gt;generateNormals();<br />					}<br /><br /></code>	<br /><br />If I want to map a specific texture on each Triangle, <br />then I rewrite the code as following, and I get a "vector subscript out of range" error:<br /><code><br />                      long nKF=0, nKV=0;<br />				for (DWORD nF=0,nPt=0; nF&lt;hGroup.dwNumFaces; nF++,nPt+=3)<br />				{<br /><br /><br />						v0 = pSceneVertices[hGroup.pSceneFaces[nF].x];<br />						v1 = pSceneVertices[hGroup.pSceneFaces[nF].y];<br />						v2 = pSceneVertices[hGroup.pSceneFaces[nF].z];<br /><br />						d0 = v1 - v0;<br />						d1 = v2 - v0;<br /><br />						fn = d0^d1;<br />						fn.normalize();<br /><br />						hGroup.pSceneNormals[nF].x = fn[0];<br />						hGroup.pSceneNormals[nF].y = fn[1];<br />						hGroup.pSceneNormals[nF].z = fn[2]<br /><br />						f[nKF][0] = nKV;<br />						f[nKF][1] = nKV+1;<br />						f[nKF][2] = nKV+2;<br /><br />						v[nKV]    = v0;<br />						v[nKV+1]  = v1;<br />						v[nKV+2]  = v2;<br /><br />						n[nKV]    = fn; <br />						n[nKV+1]  = fn; <br />						n[nKV+2]  = fn;<br /><br />						t[nKV]    = texCoordsF[nPt  ]; <br />						t[nKV+1]  = texCoordsF[nPt+1]; <br />						t[nKV+2]  = texCoordsF[nPt+2]; <br /><br /><br />						nKF++;<br />						nKV += 3;<br /><br /><br />					// Create a VertexAttributeSet with vertices and normals<br />					VertexAttributeSetHandle * vasHdl = CreateHandle(VertexAttributeSetHandle);<br />					{<br />						WritableObject&lt;VertexAttributeSet&gt; vas(vasHdl);<br />						vas-&gt;setVertices(&amp;(v[nKV-3]), 3 );<br />						vas-&gt;setNormals(&amp;(n[nKV-3]), 3 );<br />						if (pTexture) <br />						{<br />						vas-&gt;setTexCoords( 0, &amp;(t[nKV-3]), 3 );<br />						}<br />					}<br /><br />					// Create a PrimitiveSet, in this case triangles.<br /><br />					TrianglesHandle * shapeHdl = CreateHandle(TrianglesHandle);<br />					{<br />						WritableObject&lt;Triangles&gt; triangles(shapeHdl);<br />						triangles-&gt;setVertexAttributeSet( vasHdl );<br />						triangles-&gt;setFaces(&amp;(f[nKF-1]), 1 );<br />						triangles-&gt;generateNormals();<br />					}<br /><br /><br />                                       ...<br /><br /><br />	                            }<br /><br /></code><br /><br /><br />When I debug the code, I get this error just after the right bracket } following the TrianglesHandle * shapeHdl = CreateHandle(TrianglesHandle); {<br /><br />Any help would be greatly appreciated!<br /><br />Cheers,]]></description>
   </item>
      <item>
      <title>Help, can&#039;t find docs/sample on using unsized arrays in SceniX CgFX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7531/help-cant-find-docssample-on-using-unsized-arrays-in-scenix-cgfx</link>
      <pubDate>Wed, 25 Apr 2012 13:34:04 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">7531@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I see NVSGLight lights[] in CgFX code, but this is set internally by the SceniX traverser.<br /><br />How would I, for example, set-up my own unsized array? E.g.<br />MyLightStruct myLights[];<br /><br />Can't seem to find any examples anywhere.<br /><br />Thanks for any help,<br />Jules<br /><br />P.S. I've looked at CgFx.h and nothing obvious springs to mind<br /><br />]]></description>
   </item>
      <item>
      <title>rtDeclareVariable vs rtBuffer performance in SceniX OptiX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7391/rtdeclarevariable-vs-rtbuffer-performance-in-scenix-optix</link>
      <pubDate>Sun, 22 Apr 2012 16:32:29 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">7391@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I have custom materials with up to 80 parameters (in each RTFx) declared using rtDeclareVariable at StateSet level. I am wondering, would performance be better to have one rtBuffer of material structures declared at Scene level, and then access them at StateSet level by setting an index for each StateSet that would point to the start of their given material structure in the rtBuffer?<br /><br />How does SceniX Optix manage the rtDeclareVariable variables when switching between different StateSets for each launch_index/rtTrace?<br /><br />Where are the rtDeclareVariables stored on the hardware? Are they stored in shared memory, registers, constant memory or accessed from GPU RAM (global memory) etc.?<br /><br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>Scenix drawing line question</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7346/scenix-drawing-line-question</link>
      <pubDate>Fri, 20 Apr 2012 06:00:50 -0400</pubDate>
      <dc:creator>marionantony</dc:creator>
      <guid isPermaLink="false">7346@/devforum/discussions</guid>
      <description><![CDATA[Hi all,<br /><br />I am new with scenix. I managed to draw 6 red lines. <br />Then I decided to add a specific colour for each line (with diffirent material properties).<br /><br />But I see only the first 2 lines, and the other coloured rays disappeared..<br /><br />I build my code from this one:<br /><a href="http://webcache.googleusercontent.com/search?q=cache:z42AqUkErTUJ:forums.nvidia.com/INDEX.PHP%3Fshowtopic%3D21075+%22LinesHandle+*pLinesHdl+%22&amp;cd=1&amp;hl=fr&amp;ct=clnk&amp;gl=fr">http://webcache.googleusercontent.com/search?q=cache:z42AqUkErTUJ:forums.nvidia.com/INDEX.PHP?showtopic=21075+"LinesHandle+*pLinesHdl+"&amp;cd=1&amp;hl=fr&amp;ct=clnk&amp;gl=fr</a><br /><br />Here is my first code (for 6 red rays):<br /><br /><br />	vertices_pts[0] = antenna_pos;  <br />		vertices_pts[1] = first_point;           <br />		vertices_pts[2] = antenna_pos;  <br />		vertices_pts[3] = first_point2;    <br />		vertices_pts[4] = antenna_pos;  <br />		vertices_pts[5] = first_point3;    <br />		vertices_pts[6] = antenna_pos;  <br />		vertices_pts[7] = first_point4;    <br />		vertices_pts[8] = antenna_pos;  <br />		vertices_pts[9] = first_point5;    <br />		vertices_pts[10] = antenna_pos;  <br />		vertices_pts[11] = first_point6;<br /><br />		seg[0][0] = 0;     <br />		seg[0][1] = 1;     <br />		seg[1][0] = 2;     <br />		seg[1][1] = 3;     <br />		seg[2][0] = 4;     <br />		seg[2][1] = 5;     <br />		seg[3][0] = 6;     <br />		seg[3][1] = 7;     <br />		seg[4][0] = 8;     <br />		seg[4][1] = 9;     <br />		seg[5][0] = 10;     <br />		seg[5][1] = 11;    <br /><br /><br />		VertexAttributeSetHandle * pVASHdl = CreateHandle( VertexAttributeSetHandle );     <br />		{               <br />		WritableObject pVas(pVASHdl);       <br />		pVas-&gt;setVertices( vertices_pts, 12);       <br />		}   <br />		LinesHandle *pLinesHdl = CreateHandle( LinesHandle );    <br />		{              <br />		WritableObject pLines(pLinesHdl);   <br />		pLines-&gt;setVertexAttributeSet(pVASHdl);            <br />		pLines-&gt;setSegments( seg, 6);     <br />		} <br /><br /><br />		MaterialHandle * pMaterialHdl[6];<br />		pMaterialHdl[0] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON ROUGE<br />			WritableObject pMaterial(pMaterialHdl[0] );            <br />			pMaterial-&gt;setSpecularColor( Vec3f(1.0f, 0.0f, 0.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(1.0f, 0.0f, 0.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(1.0f, 0.0f, 0.0f) );    <br />			pMaterial-&gt;setName("RAYON ROUGE");        <br /><br />		}       <br /><br />		StateSetHandle * pStateSetHdl = CreateHandle( StateSetHandle );        <br />		{             <br />		WritableObject pStateSet(pStateSetHdl);            <br />		//pStateSet-&gt;addAttribute( pMaterialHdl[i] );  <br />		pStateSet-&gt;addAttribute( pMaterialHdl[0] );<br />        //pStateSet-&gt;addAttribute( pLineAttributeHdl );<br />		pStateSet-&gt;setName("heho");  <br /><br />		}           <br /><br />		//build the geonode       <br />		GeoNodeHandle *	pGeoNodeHdl;<br />		pGeoNodeHdl = CreateHandle( GeoNodeHandle );       <br />		{                <br />		WritableObject pGeoNode(pGeoNodeHdl);    <br />		pGeoNode-&gt;clearGeometries();             <br />		pGeoNode-&gt;addGeometry( pLinesHdl, pStateSetHdl );      <br />		pGeoNode-&gt;setName("geonode premier");        <br />		}    <br /><br />		Trafo shapeTrafo;<br />		shapeTrafo.setOrientation( Quatf(Vec3f(0.0f, 0.0f, 0.0f ), float(PI_QUARTER)) );<br />		TransformHandle * pGroupTrafo = CreateHandle(TransformHandle);<br />		{<br />			WritableObject wot(pGroupTrafo);<br />			wot-&gt;setTrafo(shapeTrafo);<br />			wot-&gt;addChild( pGeoNodeHdl );<br /><br />		}<br /><br />		// add the GeoNode to the parent group               <br />		root-&gt;addChild( pGroupTrafo); <br /><br /><br /><br /><br /><br />then when I try to draw 6 different rays changing the material properties like this,<br />I get only the first two rays:<br /><br /><br /><br /><br />		MaterialHandle * pMaterialHdl[6];<br />		pMaterialHdl[0] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON ROUGE<br />			WritableObject pMaterial(pMaterialHdl[0] );            <br />			pMaterial-&gt;setSpecularColor( Vec3f(1.0f, 0.0f, 0.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(1.0f, 0.0f, 0.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(1.0f, 0.0f, 0.0f) );    <br />			pMaterial-&gt;setName("RAYON ROUGE");        <br /><br />		}       <br /><br />		pMaterialHdl[1] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON JAUNE<br />			WritableObject pMaterial(	pMaterialHdl[1]);            <br />			pMaterial-&gt;setSpecularColor( Vec3f(1.0f, 1.0f, 0.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(1.0f, 1.0f, 0.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(1.0f, 1.0f, 0.0f) );    <br />			pMaterial-&gt;setName("RAYON JAUNE");        <br /><br />		}           <br /><br />		pMaterialHdl[2] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON VERT<br />			WritableObject pMaterial(	pMaterialHdl[2]);            <br />			pMaterial-&gt;setSpecularColor( Vec3f(0.0f, 1.0f, 0.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(0.0f, 1.0f, 0.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(0.0f, 1.0f, 0.0f) );    <br />			pMaterial-&gt;setName("RAYON VERT");        <br /><br />		}           <br /><br />		pMaterialHdl[3] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON BLEU AZUR<br />			WritableObject pMaterial(	pMaterialHdl[3]);            <br />			pMaterial-&gt;setSpecularColor( Vec3f(0.0f, 1.0f, 1.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(0.0f, 1.0f, 1.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(0.0f, 1.0f, 1.0f) );    <br />			pMaterial-&gt;setName("RAYON AZUR");        <br /><br />		}           <br /><br />		pMaterialHdl[4] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON BLEU<br />			WritableObject pMaterial(	pMaterialHdl[4]);            <br />			pMaterial-&gt;setSpecularColor( Vec3f(0.0f, 0.0f, 1.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(0.0f, 0.0f, 1.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(0.0f, 0.0f, 1.0f) );    <br />			pMaterial-&gt;setName("RAYON BLEU");        <br /><br />		}           <br /><br /><br />		pMaterialHdl[5] = CreateHandle( MaterialHandle );         <br />		{<br />			// RAYON VIOLET<br />			WritableObject pMaterial(	pMaterialHdl[5]);            <br />			pMaterial-&gt;setSpecularColor( Vec3f(1.0f, 0.0f, 1.0f) );                <br />			pMaterial-&gt;setAmbientColor( Vec3f(0.0f, 0.0f, 0.0f) );   <br />			pMaterial-&gt;setDiffuseColor( Vec3f(1.0f, 0.0f, 1.0f) );        <br />			pMaterial-&gt;setOpacityColor( Vec3f(1.0f, 0.0f, 1.0f) );    <br />			pMaterial-&gt;setName("RAYON VIOLET");        <br /><br />		} <br /><br /><br />		int ki,kj;<br />		ki=kj=0;<br />		for (int i=0;i&lt;6;i++)<br />		{<br />		VertexAttributeSetHandle * pVASHdl = CreateHandle( VertexAttributeSetHandle );     <br />		{               <br />		WritableObject pVas(pVASHdl);       <br />		pVas-&gt;setVertices( &amp;(vertices_pts[ki]), 2);       <br />		}   <br />		LinesHandle *pLinesHdl = CreateHandle( LinesHandle );    <br />		{              <br />		WritableObject pLines(pLinesHdl);   <br />		pLines-&gt;setVertexAttributeSet(pVASHdl);            <br />		pLines-&gt;setSegments( &amp;(seg[kj]), 1);     <br />		}     <br />		ki+=2;<br />		kj++;<br /><br />		StateSetHandle * pStateSetHdl = CreateHandle( StateSetHandle );        <br />		{             <br />		WritableObject pStateSet(pStateSetHdl);            <br />		pStateSet-&gt;addAttribute( pMaterialHdl[i] );                   <br />		}           <br /><br />		//build the geonode       <br />		GeoNodeHandle *	pGeoNodeHdl;<br />		pGeoNodeHdl = CreateHandle( GeoNodeHandle );       <br />		{                <br />		WritableObject pGeoNode(pGeoNodeHdl);    <br />		pGeoNode-&gt;clearGeometries();             <br />		pGeoNode-&gt;addGeometry( pLinesHdl, pStateSetHdl );           <br />		}    <br /><br /><br />		Trafo shapeTrafo;<br />		shapeTrafo.setOrientation( Quatf(Vec3f(0.0f, 0.0f, 0.0f ), float(PI_QUARTER)) );<br />		TransformHandle * pGroupTrafo = CreateHandle(TransformHandle);<br />		{<br />			WritableObject wot(pGroupTrafo);<br />			wot-&gt;setTrafo(shapeTrafo);<br />			wot-&gt;addChild( pGeoNodeHdl );<br />		}<br />		// add the GeoNode to the parent group               <br />		root-&gt;addChild( pGroupTrafo); <br />	         }<br /><br />Do you have any explanation?<br /><br />Regards,<br />]]></description>
   </item>
      <item>
      <title>NVIDIA Texture Tools 2</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7166/nvidia-texture-tools-2</link>
      <pubDate>Tue, 17 Apr 2012 05:26:27 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">7166@/devforum/discussions</guid>
      <description><![CDATA[Hi all,<br /><br /><a href="http://origin-developer.nvidia.com/object/texture_tools.html" target="_blank" rel="nofollow">http://origin-developer.nvidia.com/object/texture_tools.html</a><br />Can I use texture compression with CgFx? with Scenix? <br />One example: the call : <br />saveTextureHost("filename.jpg", colorImage); can cost up to 60ms<br />Other example: <br />Say I have a scene that requires many Texture images(&gt;100 MB of JPG files) <br />Now, The GPU has a memory limit (0.5-4 GB video memory card if I understand correctly) , <br />a. It can be helpfull to have better comprasion than JPG<br />b. How does cg handles JPG files in the GPU? i.e : does it save it on the memory  compressed or BitMaped(which takes much more space)?   <br /><br />Thanks!<br /> ]]></description>
   </item>
      <item>
      <title>Would it be possible to have tighter interop from OpenGL to OptiX in SceniX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7251/would-it-be-possible-to-have-tighter-interop-from-opengl-to-optix-in-scenix</link>
      <pubDate>Wed, 18 Apr 2012 08:09:57 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">7251@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />In particular eliminating texture to host to texture copies when using COLOR_ATTACHMENT output from an OpenGL fragment program as an OptiX rtTextureSampler input in RTFx. If it can all be kept on the GPU somehow that would be perfect.<br /><br />There are new rasterizing and ray-tracing hybrid real-time rendering algorithms (meaning I'm coming up with some, and so are other people I presume) that really does need this feature. SceniX makes it easier to go from OptiX to OpenGL (a GPU to GPU memory copy I believe) but not the other way round.<br /><br />Would this be possible?<br /><br />Thanks for any help,<br />Jules<br /><br /><br />]]></description>
   </item>
      <item>
      <title>PrimitiveID in CG Tessellation Shader</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7191/primitiveid-in-cg-tessellation-shader</link>
      <pubDate>Tue, 17 Apr 2012 13:35:26 -0400</pubDate>
      <dc:creator>Henry Schaefer</dc:creator>
      <guid isPermaLink="false">7191@/devforum/discussions</guid>
      <description><![CDATA[Hello,<br /><br />i need access to the currently processed primitive in the tessellation control/domain shader. HLSL provides SV_PrimitiveID and GLSL gl_PrimitiveID for that purpose. What is the CG equivalent?<br /><br />Henry]]></description>
   </item>
      <item>
      <title>Is it possible to have SceniX OptiX launch dimension size different to its RTFx outputBuffer size?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7151/is-it-possible-to-have-scenix-optix-launch-dimension-size-different-to-its-rtfx-outputbuffer-size</link>
      <pubDate>Tue, 17 Apr 2012 00:34:14 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">7151@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I want not to launch rays through every pixel of the screen but only through screen coordinates read from a buffer/array.<br /><br />So I want to be able to set up the launch dimension size to be the size of this buffer/array. Then in my RTFx code use the launch index to look up from the buffer/array the screen coordinate to trace the ray through. Hence the outputBuffer would need to be the size of the screen resolution and would be larger than the size of the buffer/array (launch dimension).<br /><br />Is this possible?<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>OpenGL color attachments to OptiX rtTextureSampler objects?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7081/opengl-color-attachments-to-optix-rttexturesampler-objects</link>
      <pubDate>Sun, 15 Apr 2012 21:11:06 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">7081@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />Damn, I think I just hit a roadblock :(<br /><br />I need the color attachment texture object outputs from an OpenGL render as rtTextureSampler inputs to an OptiX renderer.<br /><br />The two color attachments are defined as:<br />OpenGLtoRenderTargetGLFBO-&gt;setAttachment(nvgl::RenderTargetGLFBO::COLOR_ATTACHMENT0,<br />		nvgl::TextureGLRectangle::create(GL_RGBA32F, GL_RGBA, GL_FLOAT))<br /><br />OpenGLtoRenderTargetGLFBO-&gt;setAttachment(nvgl::RenderTargetGLFBO::COLOR_ATTACHMENT1,<br />		nvgl::TextureGLRectangle::create(GL_RGBA32F, GL_RGBA, GL_FLOAT))<br /><br />The RTFx program reads from two rtTextureSampler objects TEX0 and TEX1 defined:<br /><br />rtTextureSampler TEX0;<br />rtTextureSampler TEX1;<br /><br />How do I get the OpenGL COLOR_ATTACHMENT0 &amp; COLOR_ATTACHMENT1 to be read by TEX0 &amp; TEX1 in my OptiX RTFx program for best performance?<br /><br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>How much optimization does RayIntersectTraverser have? What if used against GeoNode with 100k faces?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7146/how-much-optimization-does-rayintersecttraverser-have-what-if-used-against-geonode-with-100k-faces</link>
      <pubDate>Mon, 16 Apr 2012 23:40:05 -0400</pubDate>
      <dc:creator>luotingfu</dc:creator>
      <guid isPermaLink="false">7146@/devforum/discussions</guid>
      <description><![CDATA[From multiple previous posts (quoted below, thanks to Mr. Roettger), I got to know that RayIntersectTraverser runs on CPU, and the pruning of the search space is based on the bounding sphere of the GeoNode.<br /><br /><blockquote><p><a href="http://forums.developer.nvidia.com/devforum/discussion/2991/scenix-7.2-simple-hud-text-rendering">http://forums.developer.nvidia.com/devforum/discussion/2991/scenix-7.2-simple-hud-text-rendering</a><br /><br /><em>Rendering runtime information of objects the mouse hovers over would just need to identify that object somehow (and very quickly!). <br />You could use the RayIntersectTraverser for that kind of picking, but be warned it's pure CPU code, which is not really fast on bigger geometry blobs (even slower in debug mode), because it needs to check every primitive inside the geometry which bounding sphere it intersected.</em></p></blockquote><br /><br /><blockquote> <p><a href="http://forum-archive.developer.nvidia.com/index.php?showtopic=5203&amp;mode=threaded&amp;pid=15878">http://forum-archive.developer.nvidia.com/index.php?showtopic=5203&amp;mode=threaded&amp;pid=15878</a><br /><br /><em>The RayIntersectTraverser runs on the CPU using the original scene data and it gets slower with more complex geometry and less hierarchy.<br />It intersects with the bounding sphere of the geo nodes and tests the geometry itself when the ray is not trivially out.<br />If the hierarchy is very flat and there are millions of triangles per geo node that will take quite a while.</em></p></blockquote><br /><br />So I wonder, in the latest 7.2 release, does RayIntersectTraverser simply loops through the triangles of my GeoNode? Is there any internal optimization that resorts to spatial partition hierarchies (AABB, KD tree)? <br /><br />If not, that means perhaps I should build my own AABB tree or other hierarchical data structure to perform the intersection, instead of using the built-in RayIntersectTraverser, if my geonode has &gt;100k faces. <br />]]></description>
   </item>
      <item>
      <title>openGL Context sharing , multithreading and wglShareLists</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5836/opengl-context-sharing-multithreading-and-wglsharelists</link>
      <pubDate>Mon, 12 Mar 2012 12:09:18 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">5836@/devforum/discussions</guid>
      <description><![CDATA[Hi all, <br />I have a context for rendering, it is created via the main thread, rendering is very good and fast.<br />Im trying to update the VBO data , while not on the main thread, but a different thread.<br />this will result with no context available , because as i understand , each thread is associated with one context upon creation.<br />So I tried to create another context for the second thread, from the second thread, using :<br /><code><br />RenderContextGLFormat format;<br />// Create a new context without visible window and share resources with window Context	 			    SmartRenderContextGL cntxt = <br />RenderContextGL::create( RenderContextGL::Headless( &amp;format,m_WindowContextGL ) );  <br /></code><br /><br />this fails at nvgl::WGLShareLists( shareContext, context) call <br />// do not share our internal shareable objects if the request for sharing objects failed<br /><br />Is this approach valid? would you recommend a different one? <br />Thanks!<br /><br />Update:<br />I successfully created the headless context , now i just switch between them when rendering and when dealing with VBO data]]></description>
   </item>
      <item>
      <title>Scenix DirectX Rendering</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/7121/scenix-directx-rendering</link>
      <pubDate>Mon, 16 Apr 2012 13:42:27 -0400</pubDate>
      <dc:creator>cdechenne</dc:creator>
      <guid isPermaLink="false">7121@/devforum/discussions</guid>
      <description><![CDATA[I'm not sure if anyone is interested, but I've created a DirectX renderer for Scenix.  It's actually doing the rendering using OpenGL, but then uses a OpenGL DirectX interop to transfer the scene to a DirectX context.  So you shouldn't have to worry about your scene looking any different than the OpenGL version (but it is in fact a DirectX scene).<br /><br />More information can be found here:<br /><a href="http://sites.google.com/site/snippetsanddriblits/scenix-directx-rendering" target="_blank" rel="nofollow">http://sites.google.com/site/snippetsanddriblits/scenix-directx-rendering</a>]]></description>
   </item>
      <item>
      <title>SceniX loader problem, losing UVs?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6896/scenix-loader-problem-losing-uvs</link>
      <pubDate>Wed, 11 Apr 2012 08:39:29 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">6896@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I use the SceniX loader for loading the geometry data in the SceniX scene graph from .obj files that come from 3D modelling packages. The lights and materials I add to the scene graph come from my own code as the .obj format can only cope with the most basic material and lighting parameters.<br /><br />The trouble is that the UV texture coordinate data is lost whenever its material entry in the .mtl file does not have a bitmap file entry. This happens often when the 3D modelling packages Obj exporter cannot cope with exporting its more advanced  materials so it just exports the material name and some other basic parameters, but not bitmap map info.<br /><br />As mentioned, without the bitmap entry in the .mtl file, the SceniX loader loses the UV data and my objects are displayed with one colour (presumably the first texel of the texture) but no texture.<br /><br />Is there a way to make SceniX keep the UVs for an object when loading from a .obj file regardless of whether or not it has a bitmap entry in its material section in its corresponding .mtl material file?<br /><br />Thanks for any help,<br />Jules <br /><br /><br /><br /><br />]]></description>
   </item>
      <item>
      <title>Snenix 7.2: Adding OpenGL effects to an object.</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5516/snenix-7-2-adding-opengl-effects-to-an-object-</link>
      <pubDate>Tue, 06 Mar 2012 11:59:35 -0500</pubDate>
      <dc:creator>PiToMeN</dc:creator>
      <guid isPermaLink="false">5516@/devforum/discussions</guid>
      <description><![CDATA[Hi all!<br /><br />After some reading and tryouts I finally got Sxenix`s examples to compile and work, so the first fight of the battle turned into success for me!<br /><br />Now I`m trying to add some OpenGL effects to a Scenix object(Geonode) and I have some issues.<br />I would like some help about the structure of the project. I`d like to see some ideas about how to get things working, because there wasn`t much on the net so far. So what would be the right way to realise it? How to trow out the OpenGl lib correctly?<br /><br />Thank you in advance!<br /><br />Todor Ruskov]]></description>
   </item>
      <item>
      <title>How to disable depth test properly?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6556/how-to-disable-depth-test-properly</link>
      <pubDate>Thu, 29 Mar 2012 09:20:04 -0400</pubDate>
      <dc:creator>illogiccode</dc:creator>
      <guid isPermaLink="false">6556@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />With pure OpenGL i know how to do this, but with scenix i am a bit lost.<br />What i want to do is to draw arrows inside 3D objects in the scene, but without these "control-arrows" being occluded by the main object.<br />Something exactly like Blender do, as you can see in this video i have made to clarify my point:<br />www.youtube.com/watch?v=sVKvJptWax0<br /><br />What i thought to do was: Disable the depth test and draw the control-arrows as the last object being painted on the scene.<br /><br />Well.. after search in google, samples, docs, tests features and here in the forum, i didn't found any good lead to solve the problem :(<br />I thought that the path to solve this was to make a second pass of the rendering (so i could draw the control-arrows just in the second pass with the depth test disabled).<br /><br />The only mention of "passes" i found was with the StatePass.<br />But it seems not to work as i expected (or i am doing something wrong).<br /><br />here is the code i have ended-up with:<br /><br /><code><br />m_meshManager = meshMgr;<br />	DrawableSharedPtr draw=createTessellatedBox(20);<br /><br />	Vec3f ambientColor(0.0f, 0.0f, 0.0f);<br />	Vec3f diffuseColor(m_meshManager-&gt;generateRandColor());<br />	Vec3f specularColor(1.0f, 1.0f, 1.0f);<br />	float specularExponent = 180.0f;<br />	Vec3f emissiveColor(0.0f, 0.0f, 0.0f);<br />	float opacity = 1.0f;<br />	float reflectivity = 100.0f;<br />	float indexOfRefraction = 0.0f;<br /><br />	// attributes ------------------<br />	MaterialSharedPtr materialAttr = Material::create();<br />    {<br />      MaterialWriteLock mw( materialAttr );<br />      mw-&gt;setAmbientColor( ambientColor );<br />      mw-&gt;setDiffuseColor( diffuseColor );<br />      mw-&gt;setSpecularColor( specularColor );<br />      mw-&gt;setSpecularExponent( specularExponent );<br />      mw-&gt;setEmissiveColor( emissiveColor );<br />      mw-&gt;setOpacity( opacity );<br />      mw-&gt;setReflectivity( reflectivity );<br />      mw-&gt;setIndexOfRefraction( indexOfRefraction ); <br />    }<br /><br />	FaceAttributeSharedPtr faceAttr = FaceAttribute::create();<br />	{<br />		FaceAttributeWriteLock fa( faceAttr );<br />		fa-&gt;setCullMode( false, false );<br />		fa-&gt;setTwoSidedLighting( true );<br />	}<br /><br />	DepthAttributeSharedPtr depthAttr = DepthAttribute::create();<br />	{<br />		DepthAttributeWriteLock dLock(depthAttr);<br />		dLock-&gt;setDepthTestingEnabled( false );<br />		dLock-&gt;setDepthFunction( DF_ALWAYS );<br />	}<br /><br />	// states players -------------------<br />	StateSetSharedPtr stateSet = StateSet::create();<br />	StateVariantSharedPtr stateVariant = StateVariant::create();<br />	StatePassSharedPtr statePass01 = StatePass::create();<br />	StatePassSharedPtr statePass02 = StatePass::create();	// for DepthTest<br /><br />	// StatePass -&gt; StateAttributes<br />	{<br />		StatePassWriteLock sLock(statePass02);<br />		sLock-&gt;addAttribute(depthAttr);<br />	}<br />	{<br />		StatePassWriteLock sLock(statePass01);<br />		sLock-&gt;addAttribute(materialAttr);<br />		sLock-&gt;addAttribute(faceAttr);<br />	}<br /><br />	// StateVariant -&gt; StatePasses<br />	{<br />		StateVariantWriteLock sLock(stateVariant);<br />		sLock-&gt;addPass(statePass01);<br />		sLock-&gt;addPass(statePass02);<br />	}<br /><br />	// StateSet -&gt; StateVariant<br />	{<br />		StateSetWriteLock sLock( stateSet );<br />		sLock-&gt;setVariant( 0, stateVariant );<br />	}<br /><br />	m_geonode = GeoNode::create();<br />	{<br />		GeoNodeWriteLock gwl(m_geonode);<br />		gwl-&gt;addDrawable( stateSet, draw );<br />		gwl-&gt;setName( "Cube GeoNode" );<br />	}<br /></code><br /><br /><br />Can somebody help?<br /><br />- Luis]]></description>
   </item>
      <item>
      <title>Advanced materials possible in SceniX, OptiX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6396/advanced-materials-possible-in-scenix-optix</link>
      <pubDate>Mon, 26 Mar 2012 14:27:40 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">6396@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I would like to implement some more advanced materials for the OptiX renderer in SceniX. I'm using the NVSGMaterial structure in my custom RTFx code for raytracing output. Is there a way to extend the structure to include custom properties? Currently from 'Using RTFx.pdf':<br /><br />struct Material<br />{<br />float4 ambientColor;<br />float4 diffuseColor;<br />float4 emissiveColor;<br />float4 opacityColor;<br />float4 reflectivityColor;<br />float4 specularColor;<br />float reflectivity;<br />float specularExponent;<br />float ior;<br />float opacity;<br />};<br /><br />I'd lack to add more properties. For example noise level, roughness, fog colour etc. Then I would handle each of them in my hit program.<br /><br />To reiterate, can the SceniX scene graph StateSet handle custom material structures that can be used by OptiX program domains?<br /><br />Thanks for any help,<br />Jules<br />]]></description>
   </item>
      <item>
      <title>Switch Group</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5961/switch-group</link>
      <pubDate>Thu, 15 Mar 2012 11:00:57 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">5961@/devforum/discussions</guid>
      <description><![CDATA[Hi all,<br />I'm trying to get the switch group to work.<br />I followed the test in feature_switchNodes :<br />// Create switch<br />  m_childSwitch = Switch::create();<br />...<br />sw-&gt;addChild( transform[i] );<br />...<br />// Create keys and masks<br />  Switch::MaskKey key = 0 ;<br />  Switch::SwitchMask mask;<br /><br />  mask.insert( 1 );<br />  mask.insert( 3 );<br />  {<br />    SwitchWriteLock( m_childSwitch )-&gt;addMask( key, mask );<br />  }<br /><br />...<br /><br />I than tried to render only masked nodes:<br /><br />  {<br />    SwitchWriteLock( m_childSwitch )-&gt;setInactive();<br />    SwitchWriteLock( m_childSwitch )-&gt;setActive( 0 );<br />  }<br /><br />which works<br /><br />, I than wanted to test the setActive again, which works as well<br />but when i tried to switch again to masked nodes : it didnt work.<br /><br /><br />I debuged it and found that m_masks gets deleted somehow, <br />so reproducing it would be to just do:<br /><br /><code><br />sw-&gt;setInactive();<br />sw-&gt;setActiveMaskKey(0);//render masked shapes only		<br />sw-&gt;setActive();<br />sw-&gt;setInactive();<br />sw-&gt;setActiveMaskKey(0);//render masked shapes only	(m_masks is empty)<br /></code><br /><br />Do I need to "addMask" each time I'm trying to switch ?<br /><br />I tried also different combinations of getting the switch group to work and I get different behaviors each time.<br /><br />And final note, I get an exception when trying to remove node that is hidden, i.e<br />WritableObject(m_childSwitch)-&gt;removeChild(node);<br /><br />thank you]]></description>
   </item>
      <item>
      <title>SceniX 7 derived objects</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5046/scenix-7-derived-objects</link>
      <pubDate>Thu, 23 Feb 2012 11:38:54 -0500</pubDate>
      <dc:creator>valado</dc:creator>
      <guid isPermaLink="false">5046@/devforum/discussions</guid>
      <description><![CDATA[Hi all,<br />i'm trying to add my own core type in to the SceniX environment.<br />My type extends GeoNode class and it is defined as follows:<br /><br /><code><br />	enum<br />	{<br />		OC_MYGEONODE = nvsg::OC_CUSTOMOBJECT<br />	};<br /><br />	class MyGeoNode : public nvsg::GeoNode<br />	{<br /><br />	public:<br /><br />		GeoAudioNode() : nvsg::GeoNode(),<br />			m_NewPtr( NULL )<br />		{<br />			m_objectCode = OC_MYGEONODE;<br />		}<br /></code><br /><br />and so on ... <br />i used the macros for generating SharedPtr, WeakPtr, ...<br /><br /><code><br /><br /><br />	CORE_TYPES( MyGeoNode, nvsg::GeoNode );<br /><br />}<br /><br />namespace nvutil{<br />	OBJECT_TRAITS( MyGeoNode, nvsg::GeoNode );<br />}<br /><br /></code><br /><br /><br />and at this point my problem is that the static create function of the base class returns<br />NULL pointer.<br />Schould i write my own static create function for my new class and if yes, please give me some example, becouse i couldn't find any definition of this function nor in the files, nor in the help  or i'm missing something else.<br /><br />example of create function that i tryed:<br /><br /><code><br />  		NVSG_API static MyGeoNodeSharedPtr create()<br />		{<br />			MyGeoNodeSharedPtr ptr = new MyGeoNode();<br />			return ptr;<br />		}<br /></code><br /><br />or something like this.]]></description>
   </item>
      <item>
      <title>FXAA in SceniX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6241/fxaa-in-scenix</link>
      <pubDate>Fri, 23 Mar 2012 02:20:45 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">6241@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />For performance reasons, I wish to implement FXAA anti-aliasing in a CgFX shader to run in SceniX as a final pass.<br /><br />I can get the outputBuffer with:<br /><br />RTBufferSharedPtr buffer = renderTargetRT-&gt;getBuffer( "outputBuffer", renderTargetRT-&gt;getStereoTarget() );<br /><br />RTBufferGLTextureWriteLock bufferLock( sharedPtr_cast(buffer) );<br />bufferLock-&gt;updateTexture();<br /><br />Now I assume I've got to get the texture in the RTBuffer to become a COLOR_ATTACHMENT to a RendererGLFSQ, RendererGLFSQ-&gt;setCgFX to the FXAA shader, then set the texture to a sampler in the CgFX code.<br /><br />Not sure if this is the correct approach? Not sure how to get the texture to become a COLOR_ATTACHMENT? And is this the fastest way?<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>setBackImage bug</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6161/setbackimage-bug</link>
      <pubDate>Wed, 21 Mar 2012 06:06:54 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">6161@/devforum/discussions</guid>
      <description><![CDATA[Whats wrong in this code :-) ?<br /><code><br />  void Scene::setBackImage( const TextureHostSharedPtr &amp; image )<br />  {<br />    NVSG_TRACE();<br />    NVSG_ASSERT_OBJECT_WRITE_LOCKED(this);<br /><br />    if ( m_backImage != m_backImage )<br />    {<br />      m_backImage = image;<br />      notifyChanged();<br />    }<br />  }<br /></code><br /><br />thanks!]]></description>
   </item>
      <item>
      <title>Video Image Stream</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6226/video-image-stream</link>
      <pubDate>Thu, 22 Mar 2012 14:52:49 -0400</pubDate>
      <dc:creator>ddommett</dc:creator>
      <guid isPermaLink="false">6226@/devforum/discussions</guid>
      <description><![CDATA[Are there any examples that make use of streaming textures?<br /><br />I need to display video files on a textured surface.  Should I be using a TextureHost with F_IMAGE_STREAM flag?]]></description>
   </item>
      <item>
      <title>Weird slowdown with OptiX rtBuffer in SceniX</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/6126/weird-slowdown-with-optix-rtbuffer-in-scenix</link>
      <pubDate>Tue, 20 Mar 2012 05:22:04 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">6126@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I want an array to hold data that is shared between my RayGenerationProgram and ClosestHitProgram<br /><br />I use the code to set-up a buffer and to put it into the rtContext:<br /><br />	RTBufferSharedPtr rtBuffer;<br />	nvrt::SmartRenderTargetRTBuiltin sRT = _OptixRenderer-&gt;getRenderTargetRT();<br />	RTContextSharedPtr rtContext = sRT-&gt;getRTContext();<br />  {<br />	RTContextWriteLock rtctx(rtContext);<br />	rtBuffer = rtctx-&gt;newBuffer(RT_BUFFER_INPUT_OUTPUT);<br />	{<br />		RTBufferWriteLock buf(rtBuffer);<br />		buf-&gt;setFormat(RT_FORMAT_USER);<br />		buf-&gt;setElementSize(sizeof(MyPointLight));<br />		buf-&gt;setSize(16);<br />                sRT-&gt;setVariable("MyBuffer", rtBuffer, false);<br />	}<br />  }<br /><br />The trouble is the OptiX renderer slows to a crawl. I tested the RTFx code by removing everything to  just<br /><br /><a href="/devforum/search?Search=%23include&amp;Mode=like">#include</a> <br /><a href="/devforum/search?Search=%23include&amp;Mode=like">#include</a> <br /><br />RT_PROGRAM void test2()<br />{<br />}<br /><br />technique<br />(<br />    entrypoint 0<br />	{<br />		RayGenerationProgram = test2; <br />	}<br />)<br /><br />Took all of 280 milliseconds to execute the RTFx code when I assumed it would take 0 millisecs. Without creating the rtBuffer everything returns back to normal speed.<br /><br />I assume I'm doing something fundamentally wrong, like setting up the rtBuffer wrong? What could it be?<br /><br />Thanks for any help,<br />Jules<br /><br /><br />]]></description>
   </item>
      <item>
      <title>displacement maping</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5916/displacement-maping</link>
      <pubDate>Wed, 14 Mar 2012 12:09:11 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">5916@/devforum/discussions</guid>
      <description><![CDATA[Hi all, <br /><br />I tried to use the included displacement.cgfx (media/effects folder)<br />it successfully compiled, but It made the effected node transparent.<br />Any hints/guide would be great!<br /><br />thanks! ]]></description>
   </item>
      <item>
      <title>TEXUNITx and SceniX RTFx?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5951/texunitx-and-scenix-rtfx</link>
      <pubDate>Thu, 15 Mar 2012 08:15:31 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">5951@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I have a SceniX graph that I want to display using the OptiX renderer, just the texture materials. <br /><br />In my own program, I'm getting the error message Assertion Failed: item-&gt;hasTextureHost(). I believe this is because I'm already using COLOR_ATTACHMENT0 for some other purpose? Which I am.<br /><br />My RTFx code:<br /><br /><a href="/devforum/search?Search=%23include&amp;Mode=like">#include</a> <br /><a href="/devforum/search?Search=%23include&amp;Mode=like">#include</a> <br /><br />struct PerRayData_radiance <br />{ <br />float4 result; <br />float importance; <br />int depth; <br />int hintMask; <br />};<br /><br />rtDeclareVariable(PerRayData_radiance, prd, rtPayload,);<br /><br />rtTextureSampler TEXUNIT0;<br />rtDeclareVariable(float4, texcoord0, attribute TEXCOORD0,); <br /><br />RT_PROGRAM void closest_hit() <br />{ <br />prd.result = tex2D( TEXUNIT0, texcoord0.x, texcoord0.y );<br />} <br /><br />// now the RTFx technique <br />technique <br />( <br />raytype 0 /* radiance ray */ <br />{ <br />ClosestHitProgram = closest_hit; <br />} <br />)<br /><br /><br />How do I tell SceniX to auto-connect to TEXUNIT3 for object textures? So that when I change the RTFx code above to use TEXUNIT3, OptiX renders the material textures for all the objects in the SceniX scene graph.<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>Z-fighting</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5901/z-fighting</link>
      <pubDate>Wed, 14 Mar 2012 06:04:42 -0400</pubDate>
      <dc:creator>eliyam30</dc:creator>
      <guid isPermaLink="false">5901@/devforum/discussions</guid>
      <description><![CDATA[Hi all,<br />I have some z-depth errors, see: <a href="http://en.wikipedia.org/wiki/Z-fighting">Z-fighting </a> <br /><br />Im using VBO data for the entire scene,<br />I wish to set the clipping planes to bound the bounding sphere in a way that resolves z-fighting (first), and have some space for camera manipulations s.a zoom in and out (second)<br /><br />I tried using viewstateWL-&gt;setAutoClipPlanes(true); --&gt; not succesful<br />I than set  viewstateWL-&gt;setAutoClipPlanes(false);<br />and set it manually on init : near = 100 far = 1000 which got me good results with no depth fighting<br /><br /><br />But i wish to use scenix bounding sphere, so i tried to update using<br /> cameraLock-&gt;calcNearFarDistances(sceneRL-&gt;getBoundingSphere()) which results poorly (bounding sphere tight , not allowing space for zoom in out) <br /><br />Any advice? <br />Perhaps I sohuld change the clipping plane to move as the camera moves <br />(zoom in/out &lt;--&gt; move near /far planes) ?<br />Also : Can I manually set the z-depth buffer bit size? how can i tell z-depth buffer size?<br /><br /><br />thanks!<br />]]></description>
   </item>
      <item>
      <title>OptiX, SceniX and deferred shading?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5716/optix-scenix-and-deferred-shading</link>
      <pubDate>Fri, 09 Mar 2012 10:47:19 -0500</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">5716@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I have GL deferred shading working in SceniX combined with OptiX for rendering the specular reflection? Many many thanks to Detlef who helped me out on this but as Detlef pointed out, it works only for opaque objects.<br /><br />I am wondering if it would be possible to do the deferred shading in OptiX so I would get the added benefit of proper refractions to cope with the transparency?<br /><br />I imagine this:<br /><br />Pass 1 GL renders geometry packing in the material and normal information into texture 1.<br /><br />Pass 2 For all lights (e.g. 1 to 100), GL projects light volume (of influence) to texture 2.<br /><br />Pass 3 OptiX renders second generation (refraction and reflection) rays. I.e. launch index looks up textures. If texture 2 texel non-zero and unpack material info from texture 1 has specular or transparency call rtTrace. Calculate colour using light property and unpacked material and add/blend with payload result colour from second generation rays.<br /><br />Can OptiX still work out the refractions/reflections without a first generation ray pass? Should I switch to OptiX for first generation rays as well? If so can OptiX do pass 3 using the info from pass 1, despite them being started from different ray generation programs? Are there caching/performance issues I should be aware of?<br /><br />Hope that makes sense,<br />Jules<br /><br />]]></description>
   </item>
      <item>
      <title>light position missing from light source traversal?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5811/light-position-missing-from-light-source-traversal</link>
      <pubDate>Mon, 12 Mar 2012 05:33:16 -0400</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">5811@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I think I'm doing something silly here. I want to get all the light info from a scene graph using a search traverser. I'm using this test code:<br /><br />				  nvutil::SmartPtr searchTrav(new nvtraverser::SearchTraverser());<br />				  searchTrav-&gt;setClassName("class nvsg::LightSource");<br />				  searchTrav-&gt;apply(ViewStateReadLock(getViewStateHandle())-&gt;getScene());  <br /><br />				  const std::vector &amp;searchResults = searchTrav-&gt;getResults();<br />				  if( searchResults.size() == 0 )<br />				  {<br />					fprintf(stderr, "No lights inside the scene.\n");<br />					return;<br />				  }<br />				  for (std::vector::const_iterator it = searchResults.begin();<br />					   it != searchResults.end();<br />					   ++it)<br />				  {<br />					nvsg::LightSourceSharedPtr lightSource = nvutil::weakPtr_cast( *it );<br />					LightSourceWriteLock ls( lightSource);<br />	 	 	 	 	 	Vec3f diffuse = ls-&gt;getDiffuseColor();<br />/******************** Expecting to find light position here, but it doesn't compile !<br /><br />						Vec3f position = ls-&gt;getPosition();<br />*****************/<br />					}<br /><br /><br />It doesn't compile because there's no getPosition method. I'm wondering where is it?<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>GLScissor in OptiX?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5656/glscissor-in-optix</link>
      <pubDate>Thu, 08 Mar 2012 12:56:35 -0500</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">5656@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I am wondering if there is an equivalent of a GLScissor for OptiX in SceniX? I want to tell the OptiX renderer to render different areas of the screen; given location, width and height in pixels?<br /><br />There will be quite a few of these areas, some might overlap. I'm thinking a Miss program would be too slow. I am wondering what would be the best way for performance?<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>SceniX and deferred lighting?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/4756/scenix-and-deferred-lighting</link>
      <pubDate>Wed, 15 Feb 2012 22:22:29 -0500</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">4756@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I am wondering if SceniX's OpenGL renderer does deferred lighting? I can't find anything in the documentation.<br /><br />Thanks,<br />Jules]]></description>
   </item>
      <item>
      <title>Strange packing and unpacking problem with CgFx in SceniX</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5491/strange-packing-and-unpacking-problem-with-cgfx-in-scenix</link>
      <pubDate>Tue, 06 Mar 2012 03:22:12 -0500</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">5491@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I'm struggling to get pack_4ubyte() and unpack_4ubyte() to work properly in CgFx across fragment programs.<br /><br />I want to pack e.g. diffuse color (a float4) into a texture using a fragment program during the geometry pass and then later retrieve and unpack it from the texture to return the pixel (diffuse) color in another fragment program. I have it working when I'm not packing e.g. like this test<br /><br />float4 fragment( float3 worldPos  : TEXCOORD0) : COLOR<br />{<br />return float4(1,0,0,1);  // in red<br />}<br /><br />Then in a second fragment program:<br /><br />float4 fragment2(float4 position  : WPOS) : COLOR<br />{<br />  return texRECTproj(TEX0, position);<br />}<br /><br /><br />Now if I pack and unpack like this:<br /><br />float4 fragment( float3 worldPos  : TEXCOORD0) : COLOR<br />{<br />float4 Colr.x =  pack_4ubyte(float4(1,0,0,1));<br />return Colr;<br />}<br /><br />samplerRECT TEX0 : RT0_COLOR_ATTACHMENT0 = sampler_state { MagFilter = Nearest; MinFilter = Nearest; };<br />float4 fragment2(float4 position  : WPOS) : COLOR<br />{<br />  float4 Colr = unpack_4ubyte(texRECTproj(TEX0, position).x);<br />  return Colr;<br />}<br /><br />The geometry I'm rendering using QtMinimal has the nearest cube red and all the other cubes blue instead of all being in red, as when I not using any packing.<br /><br />N.B. I attach the texture like this:<br />  m_GLtoRenderTargetGLFBO-&gt;setAttachment(nvgl::RenderTargetGLFBO::COLOR_ATTACHMENT0,<br />                                nvgl::TextureGLRectangle::create(GL_RGBA32F, GL_BGRA, GL_FLOAT));<br /><br />Anyone know what I might be doing wrong, why packing and unpacking is not working for me?<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      <item>
      <title>Render Performance and Switch Nodes</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5551/render-performance-and-switch-nodes</link>
      <pubDate>Wed, 07 Mar 2012 09:25:38 -0500</pubDate>
      <dc:creator>ddommett</dc:creator>
      <guid isPermaLink="false">5551@/devforum/discussions</guid>
      <description><![CDATA[I have a simple scene that contains just 2 quads and it renders at 200 fps no problem.<br /><br />If I create a switch node above each quad in the scene graph and call setActive or setInactive to make the quads visible or invisible on each render pass the frame rate will slow down to maybe 10 fps.<br /><br />for example here is what I do in ::paintGL()<br /><br /><code>{<br />	WritableObject&lt;Switch&gt; swa(myScene-&gt;myShaders[1].sw);<br />	swa-&gt;setInactive();<br />}<br />{<br />	WritableObject&lt;Switch&gt; swa(myScene-&gt;myShaders[1].sw);<br />	swa-&gt;setActive();<br />}<br />m_renderer-&gt;render( m_viewState, getRenderTarget() );<br /><br /></code><br /><br />I suspect that I am causing non-optimal traversals to occur because I am "touching" the scene graph on each render.<br /><br />How can I switch objects in the scene on/off without hitting this penalty?<br /><br />Thanks.]]></description>
   </item>
      <item>
      <title>Assertion failure on ~SceneRendererPipeline</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5471/assertion-failure-on-scenerendererpipeline</link>
      <pubDate>Mon, 05 Mar 2012 19:46:03 -0500</pubDate>
      <dc:creator>Kazuya Mori</dc:creator>
      <guid isPermaLink="false">5471@/devforum/discussions</guid>
      <description><![CDATA[I created a small viewer using SceneRendererPipeline sample on Win32 native environment.<br />Whenever I close the window, I get the following assertion failure message.<br /><br />...GLContext.h Line: 9130<br />Expression: glContext() &amp;&amp; glContext()-&gt;m_glFunctions<br /><br />The class GMRenderer is just a renamed version of SceneRendererPipeline.<br />And the value of "extension" when I got the assertion message was "GL_EXT_framebuffer_object".<br /><br />	SceniX9.dll!nvgl::GLIsExtensionAvailable(const std::basic_string,std::allocator &gt; &amp; extension)  line 9130	C++<br /> 	SceniX9.dll!nvgl::GLDeleteFramebuffers(int n, const unsigned int * framebuffers)  line 16355 + 0x1c bytes	C++<br /> 	SceniX9.dll!nvgl::RenderTargetGLFBO::~RenderTargetGLFBO()  line 67	C++<br /> 	SceniX9.dll!nvgl::RenderTargetGLFBO::`vector deleting destructor'()  + 0x7d bytes	C++<br /> 	SceniX9.dll!nvutil::RCObject::removeRef()  line 316 + 0x30 bytes	C++<br /> 	GMTest.exe!nvutil::SmartPtr::check_unref()  line 155 + 0x3e bytes	C++<br /> 	GMTest.exe!nvutil::SmartPtr::reset()  line 109 + 0x28 bytes	C++<br /> 	GMTest.exe!GmRenderer::~GmRenderer()  line 103 + 0x13 bytes	C++<br /> 	GMTest.exe!GmRenderer::`scalar deleting destructor'()  + 0x2c bytes	C++<br /> 	GMTest.exe!WndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam)  line 186 + 0x4f bytes	C++<br /><br />Would you tell me the meaning of this assertion?<br /><br />Here is a snippet of my code.<br />   WndProc(...) {<br />       case WM_COMMAND:<br />             g_GmRenderer = new GmRenderer();<br />             g_GmRenderer-&gt;init(hWnd);<br />             break;<br />       case WM_DESTROY:<br />             delete g_GmRenderer;  // &lt;-- same as ~SceneRendererPipeline<br />   }<br />(I'm not using smartptr because I'm going to put it in a managed code leter.<br />A managed code does't seem to accept smartptr scheme.)<br /><br />]]></description>
   </item>
      <item>
      <title>Scenix occlusion culling feature works partially?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5446/scenix-occlusion-culling-feature-works-partially</link>
      <pubDate>Mon, 05 Mar 2012 09:21:59 -0500</pubDate>
      <dc:creator>illogiccode</dc:creator>
      <guid isPermaLink="false">5446@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />It appears that the culling on Scenix works just for the camera view but not for the occlusion test. Is that rigth?  Here is the test i have done:<br /><br />I have created a big 3D quad box. Inside it i loaded 10 wheels, one following another. (incrementing X axis for each one but not enougth to them get out of the box).<br />Each wheel is a complex 3D model. Very heavy indeed (about to 10000 quads each, materials and bumppingmapped textured).<br /><br />So, in my system (GPU:GTX560/CPU:i7), when i load the entire scene the FPS drops to 16fps.<br />If i move the camera (zooming-in and translating) to show only 3 wheels the FPS climb huge, about to 60+. I just figure out that the Scenix is culling the rest of the scene, that's why the FPS climbs, rigth?<br /><br />But if i zooming-out and translating the camera out of the big 3D world-box, i.e. the only thing we could see is one box (because all the wheels are inside it), the FPS *did not* climbs. It remains in the 16 FPS. What i figure out is that Scenix isn't doing Occlusion Culling Test.<br /><br />Can someone confirm that?<br /><br />If this is true, how can i accomplish this feature?<br /><br />If i really need to implement this all by myself, is the OpenGL extension the rigth way to do this?<br /><br />thanks for any help.<br />- Luis]]></description>
   </item>
      <item>
      <title>CMake errot when trying to build a VS2008 project for GLUTMinimal</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5401/cmake-errot-when-trying-to-build-a-vs2008-project-for-glutminimal</link>
      <pubDate>Sun, 04 Mar 2012 13:39:35 -0500</pubDate>
      <dc:creator>PauloAndrade</dc:creator>
      <guid isPermaLink="false">5401@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I am receiving the following error when using CMAKE 2.8.5 to generate for VS2008 the GLUTMinimal sample:<br /><br />CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<br />Please set them or make sure they are set and tested correctly in the CMake files:<br />GLUT_glut_LIBRARY (ADVANCED)<br />    linked by target "GLUTMinimal" in directory C:/Program Files (x86)/NVIDIA Corporation/SceniX 7.2/samples/GLUTMinimal<br /><br />In NVGLUT_DIR the value is NVGLUT_DIR-NOTFOUND<br /><br />I put the path as the same path as the GLUT_ROOT_PATH (C:/freeglut-2.8.0), but still receiving the same error.<br /><br />Thanks in advance,<br /><br />Paulo]]></description>
   </item>
      <item>
      <title>Multipass Render to Texture in Scenix 7.2</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/5261/multipass-render-to-texture-in-scenix-7-2</link>
      <pubDate>Wed, 29 Feb 2012 10:35:52 -0500</pubDate>
      <dc:creator>ddommett</dc:creator>
      <guid isPermaLink="false">5261@/devforum/discussions</guid>
      <description><![CDATA[I'm in the process of migrating our apps from Scenix 6 to Scenix 7.2 and I'm now having trouble understanding the differences in the rendering.  In the past, the FBOMirrorViewer sample was a helpful example.<br /><br />I modified the QtMinimal example and changed the ScenixQGLSceneRenderedWidget::paintGL method<br /><br /><code>void MySceniXQGLSceneRendererWidget::paintGL()<br />{<br />	if (firstTime)<br />	{<br />		// Create a headless context with default OpenGL format.<br />		RenderContextGLFormat format;<br />		ctx = RenderContextGL::create( RenderContextGL::Headless(&amp;format, 0) );<br /><br />		// Make the context current so that OpenGL commands can be called.<br />		ctx-&gt;makeCurrent();<br /><br />		renderTarget = RenderTargetGLFBO::create( ctx );<br />		renderTarget-&gt;setStereoEnabled( false );<br /><br />		renderTarget-&gt;setSize( 1024, 1024 );<br />		renderTarget-&gt;setClearColor( 0.3f, 0.3f, 0.9f, 1.0f );<br />		renderTarget-&gt;setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );<br />		renderTarget-&gt;setAttachment( RenderTargetGLFBO::COLOR_ATTACHMENT0, TextureGL2D::create(GL_RGBA8, 0, GL_BGRA, GL_FLOAT) );<br />		renderTarget-&gt;setAttachment( RenderTargetGLFBO::DEPTH_ATTACHMENT,  RenderbufferGL::create( GL_DEPTH_COMPONENT ) );<br /><br />		//renderer-&gt;render( viewStateHandle, renderTarget );<br />		//saveTextureHost( "output.png", renderTarget-&gt;getTextureHost( ) ); <br /><br />		ctx-&gt;makeNoncurrent();<br />		firstTime = false;<br />	}<br /><br />	if (m_appTraverser &amp;&amp; m_renderer &amp;&amp; m_viewState)<br />	{<br />		SceneSharedPtr sceneHandle = ViewStateReadLock(m_viewState)-&gt;getScene();<br />		if (sceneHandle)<br />		{<br />			// Auto-clip planes are updated by a standard AppTraverser.<br />			m_appTraverser-&gt;apply( m_viewState );<br /><br />			m_renderer-&gt;render( m_viewState, renderTarget );<br />		//saveTextureHost( "output.png", renderTarget-&gt;getTextureHost( ) ); <br /><br />			m_renderer-&gt;render( m_viewState, getRenderTarget() );<br />		}<br />	}<br />}<br /></code><br /><br />In this example I am trying to render a simple scene to a texture (save to file to verify) and then render the same scene to the main FB.  However the main FB just displays the background color while the texture gets the scene correct.<br /><br />What am I doing wrong?<br /><br />Thx]]></description>
   </item>
      <item>
      <title>how to read (and understand) the debug log?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/4926/how-to-read-and-understand-the-debug-log</link>
      <pubDate>Mon, 20 Feb 2012 11:46:25 -0500</pubDate>
      <dc:creator>illogiccode</dc:creator>
      <guid isPermaLink="false">4926@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />It's just me or everyone else is getting weird messages from the console output when memory leaks are detected?<br /><br />Here is what i mean:<br />-------------------------------<br />Detected memory leaks!<br />Dumping objects -&gt;<br />{2580} normal block at 0x00B2B550, 32 bytes long.<br /> Data: &lt;                &gt; 01 00 00 00 03 00 00 00 00 00 00 00 01 00 00 00 <br />{2579} normal block at 0x00B2B648, 4 bytes long.<br /> Data: &lt;@U f&gt; 40 55 E3 66 <br />{2525} normal block at 0x00B2B040, 8 bytes long.<br /> Data: <p> 50 B5 B2 00 CD CD CD CD <br />Object dump complete.<br />The program '[4444] Vis.exe: Native' has exited with code 0 (0x0).<br />-------------------------------<br /><br />So far i am reading this as: "oh oh, there is some memory leaks in SOME place on my entire code.. let's take a close look to GUESS where it is"<br /><br />Is there any way to clear this message so i can better understand where the problem really is?<br /><br />thanks,<br />- Luís</p>]]></description>
   </item>
      <item>
      <title>Any rendering technique to make it fast?</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/4946/any-rendering-technique-to-make-it-fast</link>
      <pubDate>Mon, 20 Feb 2012 23:07:54 -0500</pubDate>
      <dc:creator>Kazuya Mori</dc:creator>
      <guid isPermaLink="false">4946@/devforum/discussions</guid>
      <description><![CDATA[Hi, I'm upgrading a legacy 3d viewer by a viewer using SceniX7.2.<br />I noticed by new program's frame rate is 2-5 times slower than the legacy one.<br />Are there any techniques to make rendering faster?<br /><br />I'm using SceneRendererGL2::render() to render my scene.<br />Almost all geometry are made from Primitive(PRIMITIVE_TRIANGLE_FAN).<br /><br />Features of the scene to redner are:<br />* Have many boxes with texture on bumpy planes (ground).<br />* No elaborate technique like shading employed.<br /><br />It seems the original viewer renders a whole scene with not in one time but in several times.<br />Actually it calls rendering routine repeatedly even if no scene change takes place.<br />]]></description>
   </item>
      <item>
      <title>How to code a 3dsMax like Gizmo easily in Scenix</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/4741/how-to-code-a-3dsmax-like-gizmo-easily-in-scenix</link>
      <pubDate>Wed, 15 Feb 2012 11:40:02 -0500</pubDate>
      <dc:creator>xuchen</dc:creator>
      <guid isPermaLink="false">4741@/devforum/discussions</guid>
      <description><![CDATA[Could you tell me how to code a gizmo (x y z axis that situated on the left bottom that indicates the world x y z direction) in Scenix?]]></description>
   </item>
      <item>
      <title>SceniX, OptiX and Entry Points, help!</title>
      <link>http://forums.developer.nvidia.com/devforum/discussion/4666/scenix-optix-and-entry-points-help</link>
      <pubDate>Mon, 13 Feb 2012 01:26:56 -0500</pubDate>
      <dc:creator>jules123</dc:creator>
      <guid isPermaLink="false">4666@/devforum/discussions</guid>
      <description><![CDATA[Hi,<br /><br />In SceniX Viewer, I would like to have a background environment map for the OptiX renderer.<br /><br />I followed the RTFx.pdf and amended ao_ray_generation_cuda.rtfx file (a file from another SceniX sample) to test, the Miss program:<br /><br /><br />RT_PROGRAM void path_miss_radiance()<br />{<br />  thePrd.color = make_float4(1.0f, 0.0f, 0.0f, 1.0f);<br />}<br /><br /><br />I ran rtfxc.exe to compile the ao_ray_generation_cuda.rtfx to o_ray_generation_ptx.rtfx. Then ran bin2c to convert ao_ray_generation_ptx.rtfx to ao_ray_generation_ptx.inc<br /><br />Then guess work set in after that. I looked at the QtAmbientOcclusion sample for inspiration, that uses a variable type RTFxSceneAttributeSharedPtr to set to the RTFx program. Unfortunately SceniX Viewer has no such variable.<br /><br /><br />How do I get SceniX to use my own compiled RTFx OptiX entry point programs in SceniX?<br /><br />Thanks for any help,<br />Jules]]></description>
   </item>
      </channel>
</rss>
