Supreme Commander Up and running!

Stefan Dösinger stefandoesinger at
Thu Mar 22 17:41:18 CDT 2007

> I've done some searching on the net for an instancing extension and two
> seem to exist:
Right now we handle instancing with some kind of software emulation. Roughtly 
it works like this:

/* Non-instanced attribs are set as stream sources in opengl */
for(i = 0; i < num_instances; i++) {
    for(j = 0; i < instanced_attribs) {
    glDrawElements(vertices per instance to draw);

The problem that occurs here is that some vertex attribute type can't be set 
in the glVertexAttribfv calling loop. Most likely because I didn't figure out 
which gl call takes the precise argument. Should be easy to figure out.

The way we handle instancing is not instancing on the hardware side, but we 
don't have to apply all states again per instance. glDrawElements is cheaper 
than D3DDevice::DrawPrimitive, its d3d counterpart.

With ext_draw_instanced we can do d3d-style hardware instancing, but this 
extension is only supported on gf8800 cards(or used to be, at least)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the wine-devel mailing list