[2/2] wined3d: Remove usesFog flag from IWineD3DVertexShaderImpl

Ivan Gyurdiev ivg231 at gmail.com
Thu Apr 12 19:19:36 CDT 2007

Stefan Dösinger wrote:
> Honestly I do not really agree with getter methods like this inside WineD3D. 
> Yes, they do hide the implementation details, namely how the flag is stored. 
> Yes, they do encapsulate data, like the Object Oriented Programming model 
> says. But honestly, how much use is it to do a function call just to read a 
> value inside wined3d?
Well, your use of a redundant top-level flag does kind of remove the 
need for a getter - I only brought it up, since I've moved the reg_maps 
structure around one too many times, and that's where the first flag is 
> I don't argue that we should make wined3d internals visible to outside 
> wined3d. But inside wined3d, my personal preference is to just access the 
> implementation structure directly. 
The more complex and interconnected the codebase, the more it makes 
sense to encapsulate things. I think abstraction also benefits the less 
experienced developer. You make a good point that this level of detail 
should be internal to the shader to begin with, regardless of how it's 
> How much abstraction does such a function 
> give us at the cost of performance?
You can always make the function inline (although that's also rather ugly).

More information about the wine-devel mailing list