Hi,
I've posted a submission which should solve this issue :
http://forum.openscenegraph.org/viewtopic.php?p=52849#52849
The problem was in the ArrayDispatcher.cpp file : some kind of array types
(like ArrayInt you use here) where not registered with associated dispatchers.
It solves my issue,
I tried everything, it only worked with bind per VERTEX. It must be an opengl
issue...
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51228#51228
___
osg-users mailing list
osg-users@lists.opensceneg
Hi,
Does anyone have a solution for this issue ?
Thank you!
Cheers,
Aurelien
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51227#51227
___
osg-users mailing list
osg-users@lists.openscenegraph.org
On 10/24/2012 11:35 AM, Jason Daly wrote:
On 10/24/2012 05:28 AM, Daniel Schmid wrote:
Since the material code is unique within geometries, so actually I
would need to transfer it only once per Geometry. If I change to
BIND_OVERALL, the data is no longer transferred, or at least my
shader ca
On Wed, Oct 24, 2012 at 12:37 PM, Sergey Polischuk wrote:
> Hi
>
>> As you say, setting Uniforms requires a state change, while with an
>> attribute the rendering is done at the GPU completely.
>
> it is kind of same both ways... here you need glUniform* call, there you need
> to bind vertex att
Hi,
sorry, I was wrong. It really seems the same in terms of state changes.
A use case for a BIND_OVERALL attribute is probably that you have different
types of geometry with and without individual attributes (for example color) in
your scene that you want to render using the same shader.
Tha
On 10/24/2012 05:28 AM, Daniel Schmid wrote:
Since the material code is unique within geometries, so actually I
would need to transfer it only once per Geometry. If I change to
BIND_OVERALL, the data is no longer transferred, or at least my shader
cannot detect it anymore. I thought i should
Hi,
I think OpenGL specs doesn't allow to share a vertex attribute values between
multiple vertices.
Aurelien
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50753#50753
___
osg-users mailing list
o
Hi
> As you say, setting Uniforms requires a state change, while with an attribute
> the rendering is done at the GPU completely.
it is kind of same both ways... here you need glUniform* call, there you need
to bind vertex attrib and call glVertexAttribPointer*
and rendering is done at the GPU
Hi Daniel,
you are right, with BIND_OVERALL and just one element in the array, OSG should
apply the single attribute to all vertices of the geometry. You can check this
behavior in Geometry.cpp searching for BIND_OVERALL. Also there is the
createTexturedQuadGeometry() function which does setup
When I would use uniforms, I cannot set different values for different
geometries. Uniforms are global for a particular stateset. So I HAVE to use
vertex attributes, since in my shader I want to treat some particular surface
in a special way, but without the need of separate stateset.
-
Hi wouldnt it be better to use uniform in this case? Cheers. 24.10.2012, 13:28, "Daniel Schmid" :Hi all I want to pass a custom vertex attribute (lets say a material code) to my vertex shader. For the moment I use BIND_PER_VERTEX: [code]int l_SMC = 1027; // some material code for (unsigned int i=0;
Hi all
I want to pass a custom vertex attribute (lets say a material code) to my
vertex shader.
For the moment I use BIND_PER_VERTEX:
[code]
int l_SMC = 1027; // some material code
for (unsigned int i=0; iasGeometry();
if (l_Geom)
{
osg::Array* l_VertexArray = l_Geom->getVertexArray();
Hi all
I want to pass a custom vertex attribute (lets say a material code) to my
vertex shader.
For the moment I use BIND_PER_VERTEX:
Code:
int l_SMC = 1027; // some material code
for (unsigned int i=0; iasGeometry();
if (l_Geom)
{
osg::Array* l_VertexArray = l_Geom->getVertexArray()
14 matches
Mail list logo