Custom Effect Set
It is now possible to configure the list of Effects required by the application. A new project will be created in this regard, which will include the generated EffectSet and the necessary dependent source files.
CMake Flag
A new flag has been introduced to specify that a custom Effect Set shall be used: CGIAPP_ENABLE_CUSTOM_EFFECT_SET. This feature is disabled by default.
CMakeLists Template File
A CMakeLists.txt template file can be used as reference on how to configure the custom effect set and integrate it in the application. This is located in cgi_studio_candera/templates/EffectLists.template.txt
Integrate Custom Effect Set into application
Example CMakeLists file
Do not include the "Candera" namespace, this will be automatically added when the EffectSet will be generated.
# Effect List
set(PRV_CGIAPP_EFFECT_LIBRARY_LIST
GlRadialGradientBrushBlend
BitmapBrushBlend
BitmapBrushColorBlend
ShadowBitmapBrushBlend
)
set(PRV_CGIAPP_EFFECTSET_SUBDIRS
.
)
CgiGetCurrentDir(PRV_CUR_DIR)
# Enable Custom EffectSet flag
set(CGIAPP_ENABLE_CUSTOM_EFFECT_SET TRUE CACHE BOOL "Enable Custom Effect Set")
# Include EffectSet Generator
set(CGISTUDIO_EFFECTSET_CMAKE_INCLUDE "${FeatStd_DIR}/cmake/cgistudio/cgistudio_effectset_generator.cmake")
if(EXISTS ${CGISTUDIO_EFFECTSET_CMAKE_INCLUDE})
include(${CGISTUDIO_EFFECTSET_CMAKE_INCLUDE})
# Create Custom EffectSet
if(CGIAPP_ENABLE_CUSTOM_EFFECT_SET)
CgiCreateEffectSet("EffectSet" "${PRV_CGIAPP_EFFECT_LIBRARY_LIST}")
endif(CGIAPP_ENABLE_CUSTOM_EFFECT_SET)
else()
message(FATAL_ERROR "EffectSet Generator '${FeatStd_DIR}/cmake/cgistudio/cgistudio_effectset_generator.cmake' could not be found, further processing is aborted.")
endif()
Is is not possible to generate an empty EffectSet. An appropriate error message will be shown during project configuration and further processing will be halted.
The user takes responsibility of assuring that all effects which are needed by the used CGI Studio products are included. (eg.: Candera::BitmapBrushColorBlend is required by Candera::TextNode2D).