plugin.cpp 483 B

12345678910111213141516171819
  1. #include <cr.h>
  2. #include "../types.h"
  3. CR_EXPORT int cr_main(cr_plugin *ctx, cr_op operation) {
  4. switch(operation) {
  5. case CR_STEP: {
  6. // unset filter fallback should not be accessible across boundaries
  7. auto &view = *static_cast<view_type *>(ctx->userdata);
  8. ctx->userdata = view.storage<1u>();
  9. } break;
  10. case CR_CLOSE:
  11. case CR_LOAD:
  12. case CR_UNLOAD:
  13. // nothing to do here, this is only a test.
  14. break;
  15. }
  16. return 0;
  17. }