Hi Paul,
I have never tried this myself. I did just do a quick search of the
Mac-OpenGL list (I keep all the posts in this account.)

Maybe this is the problem?
http://lists.apple.com/archives/mac-opengl/2008/Nov/msg00061.html

-Eric

On Thu, Feb 17, 2011 at 12:14 PM, Jean-Sébastien Guay <
[email protected]> wrote:

> Hi Paul,
>
>
>  Has anyone ever used uniform arrays of ints on OS X? If so, did that
>> work? For some odd reason, my shaders running on OS X behave as if all
>> elements of uniform int arrays are zero. The same code running on Linux
>> or Windows runs fine.
>>
>> As a workaround, I've been able to either 1) not use an array, instead
>> use a bunch of individual int uniforms, and 2) change the type to a
>> uniform array of float, instead of int. Both of these ugly hacks work.
>>
>
> Funny, I've been working with uniform arrays lately. In all my reading, I
> remember seeing that before a given GLSL version, uniform int arrays were
> not supported. I can't find a link for this now though... So I may be
> remembering this wrong.
>
> But if it's true, then this may be driver specific, i.e. some drivers might
> let it pass and work as you expect anyways and other drivers might be closer
> to the spec. So my guess would be that you're seeing this kind of issue, and
> the OS X drivers are more picky on this. Maybe specifying #version
> <something> might trigger support for uniform int arrays in the driver, if
> it supports them.
>
> It may not be ideal, but if you've already proved that using an array of
> float works, you could use that.
>
> Hope this helps,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to