PDA

View Full Version : ARB_fragment_program, LINUX, 9700 Pro



phlucas
03-14-2003, 01:49 AM
Hello,

I have a strange problem with fragment programs written under Linux for the Radeon 9700 Pro.

For no apparent reason, after changing something on line, say, 64, glProgramStringARB fails and the error message ist like
"Unexpected token in line 86"; the error goes away if I put additional new-lines between lines 17 and 18 or so. Other means to get rid of such errors is to put more (or less) spaces before comments, to delete comments and so on.

It's all very strange. Has anyone else encountered this problem before?

Husted
03-14-2003, 02:02 AM
Originally posted by phlucas:
Has anyone else encountered this problem before?

I have not experienced the problems that you describe. The fragment programs work just fine here http://www.opengl.org/discussion_boards/ubb/wink.gif

-- Niels

Humus
03-14-2003, 01:39 PM
Never heard of anything of that kind either. Would you mind posting the shader in question?

phlucas
03-14-2003, 08:42 PM
Originally posted by Humus:
Never heard of anything of that kind either. Would you mind posting the shader in question?

I will put them on a web page as soon as I get to the machine in question (it's at work) (the forum might not preserve blank lines or whitespace) and give you the adress. Thanks for your help!

phlucas
03-14-2003, 11:27 PM
Originally posted by Humus:
Never heard of anything of that kind either. Would you mind posting the shader in question?

Ok, take a look at http://rw4.cs.uni-sb.de/~phlucas/temp.GL/

The difference between works1.ps and worksnot1.ps:

113c113
< END
---
> END
\ No newline at end of file

worksnot1.ps gives:

Fehler an Position 2932:
Problem: line 113: invalid character.

The difference between works2.ps and worksnot2.ps:

78c78
< MUL sign.x,sign.z,sign.x;
---
> #MUL sign.x,sign.z,sign.x;

worksnot2.ps gives:

Fehler an Position 2564:
Problem: line 100: invalid character.

Additionally, worksnot2a.ps differs from works2.ps only by the presence of comments.

(All these programs give the error message at the last line, but this is not always the case.)

If there is something wrong with my code to load the shaders, you can look at it in the functions create_from_text and create_from_file in glshader.cpp, also on this site.