|
From: Dair G. <da...@re...> - 2004-06-16 01:57:22
|
James W. Walker wrote:
>2. In E3Renderer_Method_SubmitGeometry, if the geometry's attribute set=20
>contains a surface shader, then Q3Push_Submit before submitting the=20
>geometry, and Q3Pop_Submit after.
>
>I was just wondering if anyone thinks there should be a more elegant or=20
>efficient solution.
The push/pop are quite expensive for what's just a temporary swapping
out of the active texture - that's really the background to why we use
the current approach.
Although I'm not sure why that's not working then - the idea was that by
swapping out we coud handle things like the box. The box is a group of
faces, so it would be equivalent to:
group
texture
face0
face1
face2
face3 { texture }
face4
face5
When the box group is entered its texture becomes active, and when face3
renders it temporarily swaps in the texture from its attribute set then
restores the box texture afterwards.
Presumably the swapping can't affect faces 0/1/2, so is it that faces
4/5 don't get textured? In which case are we restoring the texture
correctly once face3 finishes?
-dair (there's a more general problem we don't handle with the above
though, where an individual triangle within a TriMesh might have a
custom texture on it too: who ever said the TriMesh was the simplest and
most efficient geometry? :-)
___________________________________________________
mailto:dair+refnum.com http://www.refnum.com/
|