PDA

View Full Version : VP address register



V-man
11-15-2003, 12:17 PM
This is a simple question.

In a ARBvp, I want to use the address register to address some data. The data is in the constant registers (program.env)

This for example doesnt work. GL flags an error because of program.env[A0]:
ADDRESS A0;
TEMP r0;
MUL r0, program.env[A0], r0;

That's a little weird. Aren't the constants in an array (or like an array)?

This works fine

PARAM array[4]={program.env[8..11]};
MUL r0, array[A0], r0;


What's the point of having PARAM array[4]={program.env[8..11]}?

NitroGL
11-15-2003, 12:58 PM
For some reason they don't allow direct PARAM use, you have to "bind" it to a name.

It is kind of odd though, that you can use all the other vars (ATTRIB, OUTPUT) with out binding them to a name.

V-man
11-16-2003, 09:29 AM
There are small details like this that the spec doesn't explain.

Of course, there are examples that show you what to do.