ns/releases/3.1.2/source/util/GammaTable.h
puzl 73a03548a7 made a copy
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@369 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-11-28 18:13:35 +00:00

44 lines
No EOL
732 B
C++

#ifndef GAMMATABLE_H
#define GAMMATABLE_H
#include "types.h"
#ifdef USE_DIRECTX_8
#include "D3d8.h"
#undef SERVER_EXECUTE
#endif
const uint32 kGammaTableSize = 2*256*3;
class GammaTable
{
public:
GammaTable();
virtual ~GammaTable();
float GetGammaSlope() const;
void InitializeToFlat();
bool InitializeFromVideoState();
bool InitializeToVideoState();
void ProcessSlope(float inSlope);
private:
#ifdef USE_DIRECTX_8
IDirect3DDevice8* GetDirect3DDevice();
IDirect3DDevice8* m3DDevice;
D3DGAMMARAMP mDirect3DGammaRamp;
#endif
bool mDirect3DMode;
char mBaseData[kGammaTableSize];
char mSlopeData[kGammaTableSize];
float mSlope;
};
#endif