Hi Anne,

Anne Braun wrote:
> Shader:
> #define NUMPOINTS 3
>
> uniform vec3 vectors[3];
>
> void main(void)
> {
>    vec3 vector;
>
>    ...
>    for(int i = 0; i < NUMPOINTS; i++)
>    {
>       vector = vectors[i];
>     ...
>
> To be honest, I have no idea how to debug the shader to check whether 
> the values are correct. But using with a single vector instead of a 
> array it works?!

A common way to debug shaders is to output values as fragment color. You 
could try something like
    gl_fragColor = vec4(vectors[0], 1.0);

It would also be helpful to set the colors in your "vectors" array to, 
e.g., (1,0,0), (0,1,0) and (0,0,1).
In this case you will see right away if the colors match your expectations.

Hope this helps,
Daniel


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to