I’ve just discovered that only Direct3D allows you to use a more varied set of blending operations when multitexturing (over those available when multipass rendering). OpenGL’s ARB_multitexture extension only allows the same limited blending operations (fixed equation with source and destination factors) available to multipass rendering. This is a problem for me since I’m aiming to provide a unified interface. My only option is to standardise on the lowest common denominator, i.e. OpenGL in this case. This is a shame because it means the multitexturing effect opportunities will be a bit more limited, but in a way makes my life easier because determining which mode to use in multipass fallback (when multitexturing units were exhausted) was difficult.
I always knew generalising OpenGL and Direct3D in the same interface would be tough, and it is. Maybe to avoid giving the worst of both worlds I’ll introduce an ‘optionals’ interface (like the OpenGL non-standard extensions specs) to expose particular features of specific APIs.
I’ve always thought there was no clear winner between OpenGL and Direct3D – they each have their strengths – but more recently I’m feeling Direct3D is looking more attractive because of its good support for new hardware features, and now that finally the interface is becoming easier to use (7 is a big improvement but still a pig, 8 is looking better still and I haven’t seen 9 yet). MS may leave a bad taste in the mouth sometimes, but they occasionally come up with things of beauty, even if it does take them 8 or so tries…;)