-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathTMOPlugin.cpp
80 lines (75 loc) · 3.54 KB
/
TMOPlugin.cpp
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
74
75
76
77
78
79
80
/* -------------------------------------------------------------------- *
* TMOPlugin.cpp : Template for tone mapping operator plugin *
* in Tone Mapping Studio 2004 *
* -------------------------------------------------------------------- *
* *
* Put this file into a DLL project with your plugin functions and *
* replace commented sections below. *
* *
* Add this preprocesor definition to the project setings : *
* *
* TMOPLUGIN_EXPORTS *
* *
* -------------------------------------------------------------------- */
#include "./TMOPlugin.h"
/* -------------------------------------------------------------------- *
* Insert your operator header below *
* -------------------------------------------------------------------- */
#include "./TMOZhongping15.h"
/* -------------------------------------------------------------------- *
* Insert a number of implemented operators *
* -------------------------------------------------------------------- */
int iOperatorCount = 1;
/* -------------------------------------------------------------------- *
* DLL Entry point; no changes necessary *
* -------------------------------------------------------------------- */
/*
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
*/
/* -------------------------------------------------------------------- *
* Returns a number of implemented operators; no changes necessary *
* -------------------------------------------------------------------- */
int TMOPLUGIN_API OperatorCount()
{
return iOperatorCount;
}
/* -------------------------------------------------------------------- *
* For each implemented operator create a new object in field operators,*
* then return number of created operators *
* For exemple : *
* *
* operators[0] = new TMOOperator1; *
* operators[1] = new TMOOperator2; *
* . *
* . *
* . *
* -------------------------------------------------------------------- */
int TMOPLUGIN_API EnumOperators(TMO **operators)
{
operators[0] = new TMOZhongping15;
return iOperatorCount;
}
/* -------------------------------------------------------------------- *
* Deletes operators; no changes necessary *
* -------------------------------------------------------------------- */
int TMOPLUGIN_API DeleteOperators(TMO **operators)
{
int i;
for (i = 0; i < iOperatorCount; i++)
delete operators[i];
return iOperatorCount;
}