Thanks Lionel & Seb, that's very helpful. When I tried setting ints to a
Sampler2D array it said that it couldn't take ints, which is why I thought it
wasn't supported. If I set to ints directly though it does work.
Hi Chris,
Following Lionels reply I did a quick test which seems to work:
void addSamplerArray(osg::StateSet* ss)
{
osg::Uniform* uniform = new osg::Uniform(osg::Uniform::INT, "test",2);
uniform->setElement(0,0);
uniform->setElement(1,1);
osg::Texture2D* tex1 = new
Thanks, I'll have to think about whether it would be feasible for me to spend
time in this project altering osg core..
See i do like texture arrays, they would be ideal, except that I'm dealing with
GIS data grids, so stretching/compressing them would lose information or memory
space. I want
Hi,
The OpenGL command used to update a sampler* uniform is glUniformi[fv].
Sampler* uniforms are int uniforms.
An uniform of type 'array of INT' works (It works for me).
On 22/03/2016 10:36, Sebastian Messerschmidt wrote:
Hi Chris,
Hi,
Working on an app that is going to be doing a lot of
Hi Chris,
Hi,
Working on an app that is going to be doing a lot of work with large texture
processing, and will need to squeeze as much data into graphics memory as
possible and allow many textures to be referenced programmatically.
I've got texture arrays working, but can't use this for all
Hi Chris,
You can subclass from osg::StateAttribute and implement your own GL state
calls in the same way as all the core StateAttribute classes implement
their GL state calls. The osg::Uniform is an exception though as there are
particular rules about when uniforms can be applied - you have to
Hi,
Working on an app that is going to be doing a lot of work with large texture
processing, and will need to squeeze as much data into graphics memory as
possible and allow many textures to be referenced programmatically.
I've got texture arrays working, but can't use this for all
7 matches
Mail list logo