On 04/07/06, Ivan Gyurdiev ivg231@gmail.com wrote:
- Store the shader selected mode into the shader itself. Different types
of shaders can be combined, so this is an improvement. In fact, storing the mode into the settings globally is a mistake as well - it should be done per device, since different cards have different capabilities.
Shouldn't it be stored in the device rather than shader right away then? Instead of changing it once again at a later time?
H. Verbeet wrote:
On 04/07/06, Ivan Gyurdiev ivg231@gmail.com wrote:
- Store the shader selected mode into the shader itself. Different types
of shaders can be combined, so this is an improvement. In fact, storing the mode into the settings globally is a mistake as well - it should be done per device, since different cards have different capabilities.
Shouldn't it be stored in the device rather than shader right away then? Instead of changing it once again at a later time?
What I'm really trying to accomplish here is to be able to tell the shader mode from the BaseShader class without knowing if it's pixel or vertex (or doing a type check). The way to do that cleanly is to store the type from the parent class.