From: Roland S. <rsc...@hi...> - 2004-10-30 00:56:47
|
>> For the immediate mode calls, we'd need to calculate the fog factor >> and store that to the vertex array, and store the fog coord to the >> Mesa state. That part is pretty easy. The part that I'm a little >> unsure about is handling FOG_COORD_ARRAY. > > hmm, ok. Sounds troublesome enough. Ok, here's another bit. This fixes the normal tcl path (tcl_mode=1), but it is ugly. It just uses a different emit_vector function for the fog coords. The fog factor calculations are shamelessly ripped from t_vb_fog.c (woud be nice if that could get called directly I think). codegen doesn't work, it would probably need the same fog calculation code (where should it live?), and additionally some magic for storing the fog coords so replaying the vertices is possible. (this patch has to be applied on top of the other one, I hope it applies cleanly). Roland |