2009/7/6 Stefan Dösinger stefan@codeweavers.com:
Subject: [PATCH] WineD3D: Make context_attach_surface_fbo fbo aware
I hope you meant "sRGB" there.
context_apply_attachment_filter_states((IWineD3DDevice *)This, surface, TRUE);
GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT + idx, surface_impl->glDescription.target,surface_impl->glDescription.textureName, surface_impl->glDescription.level));
switch(srgb){case SRGB_BOTH:ERR("SRGB_BOTH fbo attachment requested\n");/* drop through */case SRGB_SRGB:GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT > + idx, surface_impl->glDescription.target,surface_impl->glDescription.srgbTextureName, surface_impl->glDescription.level));break;case SRGB_ANY: /* TODO: Keep track of the last use */case SRGB_RGB:GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT > + idx, surface_impl->glDescription.target,surface_impl->glDescription.textureName, surface_impl->glDescription.level));break;}
I don't think SRGB_BOTH and SRGB_ANY make sense here. I also don't think this can work like this, context_apply_attachment_filter_states() needs to be aware of which texture was requested.