Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions TMOQueiroz06/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.8)
SET(CMAKE_COLOR_MAKEFILE ON)
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)

IF(UNIX AND NOT LINUX_SET)
ADD_DEFINITIONS(-D LINUX)
ENDIF(UNIX AND NOT LINUX_SET)

INCLUDE_DIRECTORIES(
../tmolib/
.
)

LINK_LIBRARIES (
tmo
)

SET(TMO_SOURCES
TMOQueiroz06.cpp
TMOPlugin.cpp
)


SET(TMOWARD_HEADERS
TMOQueiroz06.h
TMOPlugin.h
)


add_library( queiroz06 SHARED ${TMO_SOURCES} )
add_custom_command( TARGET queiroz06 POST_BUILD
COMMAND cp -f libqueiroz06.so ../TMOCmd/queiroz06.tml
COMMAND cp -f libqueiroz06.so ../TMOgui/queiroz06.tml
COMMAND cp -f libqueiroz06.so ../queiroz06.tml
# COMMAND rm -f libqueiroz06.so
)


80 changes: 80 additions & 0 deletions TMOQueiroz06/TMOPlugin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 "./TMOQueiroz06.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 TMOQueiroz06;
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;
}
15 changes: 15 additions & 0 deletions TMOQueiroz06/TMOPlugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "TMO.h"
/*
#ifdef TMOPLUGIN_EXPORTS
#define TMOPLUGIN_API __declspec(dllexport)
#else
#define TMOPLUGIN_API __declspec(dllimport)
#endif
#pragma warning (disable: 4251)
*/

#define TMOPLUGIN_API

extern "C" TMOPLUGIN_API int EnumOperators(TMO **operators);
extern "C" TMOPLUGIN_API int DeleteOperators(TMO **operators);
extern "C" TMOPLUGIN_API int OperatorCount();
Loading