I’m having a bit of a problem with getting it to work on my nifty new 9700 pro. Everything works fine as long as fragment program mode is disabled. However, as soon as I enable fp, nothing at all seems to be written to the framebuffer. Of course, the first thing I suspected was my fragment program, which I then stripped down to the following:

OUTPUT outColor=result.color;
PARAM white={1.0, 1.0, 1.0, 1.0};
MOV outColor.rgba, white;

In other words, simply write white pixels. Still, enabling fragment programs makes the mesh on screen disappear. The program is loaded and assembled by the driver without any error or warning messages. glGetError returns GL_NONE, everything seems to be fine.
I suspect it’s some really stupid error that I’m just not seeing. Any ideas?


You shouldn’t have to provide a mask for output, in this case. Simply having. . .

MOV outColor, white;

. . . should work fine.

Thanks for the reply Ortso - I originally had it without mask, and that doesn’t work either.
It almost seems like there’s no processing done at all when fp mode is enabled.

When you say loaded and assembled, you mean loaded and bound?

Try downloading some fp demo and see if it works. If the demo comes with src, “strip down” the demo until it does what your program does.Tedious but effective.

Several FP Demos I tried work for me - I downloaded Humus’ reflection/refraction demo and it worked (even if it didn’t look quite right), and Shadows That Don’t Suck. Seems that I’m setting some state in a way that FP doesn’t like, since no matter what I put into my fragment program, there is no output when enabled.

[This message has been edited by Dodger (edited 04-16-2003).]

You’ve probably already done most of these checks, but just on the off chance that you missed one:

Are you getting any errors when you load the program string? Do you have alpha test off? Stencil test off? Not doing any color masking? Are you sure that the geometry you’re drawing is visible? You’re not clearing the screen after you draw with your FP but before swap buffers? Or forgetting to clear the depth buffer? Do you have black fog enabled but neglect to write to result.fogcoord?

– Zeno