On 2/18/07, Per Inge Mathisen <[EMAIL PROTECTED]> wrote:

How much does this improve performance? Might be worth looking into as
a temporary solution. But there is no need to undo the shadowloop,
there will still be two instances of duplicate code that it cleans up.


I dont think the shadowloop makes the code easier to read nor making it run
faster(a call to another function is slower than some local
loops/blocks),actually the shadows loops are not duplicated anymore with
display list:

1.with stencil_two_side,it only needs to draw the shadows shapes once and
let the extension handle the increment and decrement of stencil buffer,so we
dont need to generate a list for this case.

2.without that extension,it needs to draw the shadow shapes twice(increment
and decrement) with identical geometry info,so we better cache the shadow
loop into the vram and access it twice later for better performance,so a
display list is needed in this case.

for the performance,something compiled and executed later in varm twice is
definately faster than issuing the commands twice in host memory.

I do not think this "throw lots of code at a problem and see if
anything sticks"-approach works very well. I would strongly prefer
that we clean up the code, rather than just throwing in new extensions
and combine several different approaches without much plan or design
behind it.

it needs some clean up indeed,but most clean up are done,and I am already
finished unifying the vector2/vector3 struct and other fundimental
changes.Personally I think clean-up can be done when adding functionalities
or fixing exist codes,usually a 'rebundant problem' emerges only when you
have pretty good understanding of the code,for instance,I just found out
that it adjusts glMaterial and shininess in pie draw function(it should be
in display3d renderer main loop) and the shadow/light seems work correctly
without GL_NORMALIZE when I was adding other stuff.

The problem with the current renderer is the 'working but not working
optimally' opengl port,it doesnt even use the most commonly available
extensions such as glLockArrayEXT(),which is available on almost all cards
including the ancient rage 128.

Experimenting with different extensions combinations wont harm either since
it only affects one source file or two(piedraw.c and display.c),and most
extension can be turned on and off with some simple boolean variables and
extension check functions.
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to