I'll second Sergey's comment. I have been using instanced rendering in OSG for years now, storing per-instance data in textures and fetching it in the vertex shader. Lack of support for instanced arrays has not been an impediment to my usage.

However, I do see the value of this extension. Feel free to add support for it and post a submission.
   -Paul


On 7/19/2012 8:01 AM, Sergey Polischuk wrote:
Hi all

You can use 1d textures (they have quite large max size and u can store/fetch 4 
values per pixel) - works out of the box, or texture buffers - they have even 
greater max size, but idk about osg support of these.

Cheers,
Sergey.

18.07.2012, 20:44, "James Turner"<[email protected]>:
On 7 Jun 2012, at 10:48, Riccardo Corsi wrote:

  I'm about to implement some instanced rendering in my application and I was 
looking for the best way to pass
  per-instance data to the shaders.

  I've then discovered that besides the Draw Instaced ARB there is another 
extension called Instanced Arrays,
  which basically allows to bind vertex attributes per instance ( or per multiple 
instances, controlled by a "divisor" attribute)
  instead of per vertex.
  Here is the link to the specs: 
http://www.opengl.org/registry/specs/ARB/instanced_arrays.txt

  I couldn't find how to use this extension with osg. Is there support for this 
functionality?

Just to add some weight here - instanced geometry would give a huge benefit to 
some FlightGear features (random buildings and trees, and possibly clouds), but 
given the limited size of uniform arrays, we would need the extension above to 
position instances.

Is there a way to use it with the existing code, or is a (hopefully small) 
enhancement required?

Regards,
James
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to