[Bf-committers] OpenGL optimisation
Mon, 24 May 2004 19:31:04 +0200
> I admit that I have absolutely no idea what rendering method the game
> engine uses, but if we want to make it competitive in any way then we
> have to use display lists / vertex arrays.
Vertex arrays are in engine, but as option. We still try to support
older opengl versions...
> In response to Ton:
>> I rather look at a redesign for the Blender displaylists first...
>> this will - even
>> without ogl displaylists - improve performance quite some already.
> Hmmm... I doubt it. Optimising Blender display lists will result in
> less CPU work but won't make uploading vertex data to the graphics
> card any faster. The bottleneck with immediate mode (and vertex arrays
> that don't cache / upload data to the graphics card) is the bus
> bandwidth between the CPU and the GPU. There is no way that this is
> ever going to be faster than the GPU reading data out of graphics
> memory that is in an optimised format.
I think you give the answer yourself... of course a redesign of
displaylists should be targeted to allow the most efficient opengl
drawing possible, with minimum of function calls and state changing
(smooth/solid, or material switches).
The design can also be tailored to enable vertex arrays and/or opengl
As I read from the mails that follow, it is especially the fact Blender
Meshes allow mixing all kinds of properties is resulting in slowdown.
Of course we will never drop such flexibility, target is to serve
artists modeling, not having the fastest realtime (game) playback.
Smart grouping in displaylists then might help best.
> If memory usage is a concern then at the very least I think we should
> convert to using vertex arrays and similar extensions. I think in many
> cases these can draw straight out of the application's memory and then
> cache data on the card if it's not altered. However, this is going to
> involve using a lot of extensions and doing appropriate fallback if
> they're not there.
Yes, extension coding isn't very coder-friendly. :)
Nevertheless, when we can have a more centralized and uniform method
for drawing (Blender displaylists) such experiments will be much more
rewarding & simple.
Ton Roosendaal Blender Foundation firstname.lastname@example.org