Esempio n. 1
2
VOID HookIDirect3DDevice9::SetGammaRamp(LPVOID _this, UINT iSwapChain,DWORD Flags,CONST D3DGAMMARAMP* pRamp)
{
	LOG_API();
	return pD3Dev->SetGammaRamp(iSwapChain, Flags, pRamp);
}
Esempio n. 2
0
void GammaFade(float r, float g, float b)
{
    LPDIRECT3DDEVICE9 pDevice = GetDevice();
    D3DGAMMARAMP gamma;
    for (int i = 0; i < 256; i++) gamma.blue[i] = int(i * 256 * b);
    for (int i = 0; i < 256; i++) gamma.green[i] = int(i * 256 * g);
    for (int i = 0; i < 256; i++) gamma.red[i] = int(i * 256 * r);
    pDevice->SetGammaRamp(0, D3DSGR_CALIBRATE, &gamma);
}