summaryrefslogtreecommitdiff
path: root/public/materialsystem/IColorCorrection.h
blob: 1aa0c246ec6a9243958c702b4e5402861b808355 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//===========================================================================//

#ifndef ICOLORCORRECTION_H
#define ICOLORCORRECTION_H

#ifdef _WIN32
#pragma once
#endif

#include "tier1/interface.h"
#include "bitmap/imageformat.h"

typedef unsigned int ColorCorrectionHandle_t;
struct ShaderColorCorrectionInfo_t;

#define COLORCORRECTION_INTERFACE_VERSION "COLORCORRECTION_VERSION_1"

abstract_class IColorCorrectionSystem
{
public:
	virtual void Init() = 0;
	virtual void Shutdown() = 0;

	virtual ColorCorrectionHandle_t AddLookup( const char *pName ) = 0;
	virtual bool RemoveLookup( ColorCorrectionHandle_t handle ) = 0;

	virtual void  SetLookupWeight( ColorCorrectionHandle_t handle, float flWeight ) = 0;
	virtual float GetLookupWeight( ColorCorrectionHandle_t handle ) = 0;
	virtual float GetLookupWeight( int i ) = 0;

	virtual void LockLookup() = 0;
	virtual void LockLookup( ColorCorrectionHandle_t handle ) = 0;

	virtual void UnlockLookup() = 0;
	virtual void UnlockLookup( ColorCorrectionHandle_t handle ) = 0;

	virtual void SetLookup( RGBX5551_t inColor, color24 outColor ) = 0;
	virtual void SetLookup( ColorCorrectionHandle_t handle, RGBX5551_t inColor, color24 outColor ) = 0;

	virtual color24 GetLookup( RGBX5551_t inColor ) = 0;
	virtual color24 GetLookup( ColorCorrectionHandle_t handle, RGBX5551_t inColor ) = 0;

	virtual void LoadLookup( const char *pLookupName ) = 0;
	virtual void LoadLookup( ColorCorrectionHandle_t handle, const char *pLookupName ) = 0;

	virtual void CopyLookup( const color24 *pSrcColorCorrection ) = 0;
	virtual void CopyLookup( ColorCorrectionHandle_t handle, const color24 *pSrcColorCorrection ) = 0;

	virtual void ResetLookup( ColorCorrectionHandle_t handle ) = 0;
	virtual void ResetLookup( ) = 0;

	virtual void ReleaseTextures( ) = 0;
	virtual void RestoreTextures( ) = 0;

	virtual void ResetLookupWeights( ) = 0;

	virtual int GetNumLookups( ) = 0;

	virtual color24 ConvertToColor24( RGBX5551_t inColor ) = 0;

	virtual void SetResetable( ColorCorrectionHandle_t handle, bool bResetable ) = 0;

	virtual void EnableColorCorrection( bool bEnable ) = 0;

	// FIXME: Move this to a private interface only the material system can see?
	virtual void GetCurrentColorCorrection( ShaderColorCorrectionInfo_t* pInfo ) = 0;
};

#endif