ENTER_GL and ActivateContext question

Ivan Gyurdiev ivg231 at gmail.com
Thu Dec 13 19:46:42 CST 2007

> A lot of code in WineD3D avoids the getters and setters, and just accesses the 
> implementation structure. While any object oriented programmer screams when 
> doing that, we need it for performance reasons. Currently we spend 10 to 20 
> per cent of the CPU time spent in WineD3D just in surface::GetContainer and 
> its callees, if we'd use Getters and Setters everywhere then goodbye 
> performance(I want to replace GetContainer somewhen). 

So inline it... imho the performance argument is a bad reason to abandon 

Your codebase is constantly getting more complex, and now you're having 
threading issues, which will only get more important with multi-core and 
other such things becoming standard.  Meanwhile graphics cards are 
getting a lot more powerful - I solved the performance problem 2 weeks 
ago w/ a GeForce 8800 GT.

As for the "object oriented programmer" - I would hope every programmer 
thinks in terms of objects, even when writing C code.
The GLSL backend wouldn't be available today if the shader compiler was 
still a big series of if statements.


More information about the wine-devel mailing list