Is there a way to port the use of R2VB to TF ?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
dirkmitt
Halfling
Posts: 40
Joined: Fri Sep 15, 2006 3:40 am
Contact:

Is there a way to port the use of R2VB to TF ?

Post by dirkmitt »

Hello again,

I've just built OGRE 1.8.1 on my laptop, which alas, only has an AMD Radeon HD 8610G graphics chipset. I wasn't able to find a suitable laptop, with an nVidia GPU.

What I seem to have discovered, is that AMD has stopped supporting Render To Vertex Buffer - even though ATI had initially 'invented' it, and so the ParticleGS Demo doesn't run.

I double-checked by commenting out the capabilities-check built in to the sample source code, but alas, running it anyway, only results in a hung program. So the capability is truly nonexistent on my newer graphics chipset.

I'm vague on the subtlety of how to set up Geometry Shaders in Stream Output Mode, and would generally rely on OGRE to do it for me, as I've never coded directly in OpenGL. But what I vaguely seem to read on the Web, is that by today, a more direct way exists to do Transform Feedback, which no longer uses R2VB.

Is this more modern form of TF also supported in some way under OGRE, and would there be an easy way to port the ParticleGS Sample to it? Because what I seem to read somewhere, is that Devs ' aren't even supposed to be using ' R2VB anymore... In my own opinion, Devs should be using whatever works. {:-)}

Dirk

(Edit:) I should add, Yes, this is an OpenGL 4.2 -capable graphics chipset. But unfortunately, the laptop it shipped in doesn't have dual-channel RAM, while the laptop does use shared video RAM - ~768MB of it. This means, I'm taking a hit in the frame-rate, and then R2VB also looks less attractive. But what I've heard is that the up-to-date way of using TF, simply nests GS calls, and doesn't use an explicit buffer. I just don't know ho to invoke it.
dirkmitt
Halfling
Posts: 40
Joined: Fri Sep 15, 2006 3:40 am
Contact:

Re: Is there a way to port the use of R2VB to TF ?

Post by dirkmitt »

I think I've found out, why the demos ParticleGS and ISOSurf don't run.

Unlike my GeForce GTX 460, my Radeon HD 8610G is no longer able to run any kind of Cg program at all (using OGRE), because Cg is no longer supported (and it's a Windows 8.1 laptop to boot). My Radeon chipset lacks the extension GL_NV_gpu_program4 , which my GeForce PCIe card has, an which OGRE uses to load Cg.

And so one way I could get Geometry Shaders to run on this laptop at all, would be if I had the DirectX 10 or 11 render-system. Yet, because I only have the SDK version of OGRE, Dx 10/11 isn't shipped, and I also don't have the source code, which would allow me to build it. The Geometry Shaders in question are only included as Cg and HLSL files. So even with the IsoSurf example, the cubus is displayed, corresponding to the way the CPU procedurally set up the VBO for the volume, but then no marching-tetrahedra-transformation of its cells into an ISO surface takes place, which is supposed to do so via a GS, and which takes place successfully on my GeForce card.

And since I also don't have the DirectX SDK installed on either machine, even with the source code for OGRE, I could not build the DirectX render-systems... :(

Now one thing which I have done, is to compile isosurf.cg into isosurf.glsl using cgc (in three parts, keeping the naming of the entry-points). But then in order for the sample to recognize it, I'd also need to edit IsoSurf.material , which I have not done...

However, I fear that it would be a futile gesture on my part. The fact that OGRE is telling me logically, that it cannot accomplish Render To Vertex Buffer, suggests that OGRE is missing a H/W extension from my graphics chipset, which it would need to be able to do so, irrespectively of the ultimate capabilities of the graphics chipset. And that missing extension might just well be, GL_NV_gpu_program4 .

But why, oh why, didn't OGRE Devs use EXT_geometry_shader4 ? :? Maybe, because it came out at a later date, than the other one?

And this conclusion seems to be supported by the observation, that on my Radeon, the Shaders Demo will run as long as the language stays set to GLSL. But as soon as I try to change the setting to Cg, that demo also crashes. Yet, when I start out in DirectX mode, in HLSL, then I can switch the Shaders Demo to Cg mode, and the Demo just runs fine - no crash.
Post Reply