Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /**************************************************************************
  2.  *
  3.  * Copyright 2011 Lauri Kasanen
  4.  * All Rights Reserved.
  5.  *
  6.  * Permission is hereby granted, free of charge, to any person obtaining a
  7.  * copy of this software and associated documentation files (the
  8.  * "Software"), to deal in the Software without restriction, including
  9.  * without limitation the rights to use, copy, modify, merge, publish,
  10.  * distribute, sub license, and/or sell copies of the Software, and to
  11.  * permit persons to whom the Software is furnished to do so, subject to
  12.  * the following conditions:
  13.  *
  14.  * The above copyright notice and this permission notice (including the
  15.  * next paragraph) shall be included in all copies or substantial portions
  16.  * of the Software.
  17.  *
  18.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  19.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20.  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  21.  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
  22.  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  23.  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  24.  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25.  *
  26.  **************************************************************************/
  27.  
  28. #ifndef PP_EXTERNAL_FILTERS_H
  29. #define PP_EXTERNAL_FILTERS_H
  30.  
  31. #include "postprocess/postprocess.h"
  32.  
  33. #define PP_FILTERS 6            /* Increment this if you add filters */
  34. #define PP_MAX_PASSES 6
  35.  
  36.  
  37. typedef bool (*pp_init_func) (struct pp_queue_t *, unsigned int,
  38.                               unsigned int);
  39. typedef void (*pp_free_func) (struct pp_queue_t *, unsigned int);
  40.  
  41. struct pp_filter_t
  42. {
  43.    const char *name;            /* Config name */
  44.    unsigned int inner_tmps;     /* Request how many inner temps */
  45.    unsigned int shaders;        /* Request how many shaders */
  46.    unsigned int verts;          /* How many are vertex shaders */
  47.    pp_init_func init;           /* Init function */
  48.    pp_func main;                /* Run function */
  49.    pp_free_func free;           /* Free function */
  50. };
  51.  
  52. /*      Order matters. Put new filters in a suitable place. */
  53.  
  54. static const struct pp_filter_t pp_filters[PP_FILTERS] = {
  55. /*    name                      inner   shaders verts   init                    run                       free   */
  56.    { "pp_noblue",               0,      2,      1,      pp_noblue_init,         pp_nocolor,               pp_nocolor_free },
  57.    { "pp_nogreen",              0,      2,      1,      pp_nogreen_init,        pp_nocolor,               pp_nocolor_free },
  58.    { "pp_nored",                0,      2,      1,      pp_nored_init,          pp_nocolor,               pp_nocolor_free },
  59.    { "pp_celshade",             0,      2,      1,      pp_celshade_init,       pp_nocolor,               pp_celshade_free },
  60.    { "pp_jimenezmlaa",          2,      5,      2,      pp_jimenezmlaa_init,    pp_jimenezmlaa,           pp_jimenezmlaa_free },
  61.    { "pp_jimenezmlaa_color",    2,      5,      2,      pp_jimenezmlaa_init_color, pp_jimenezmlaa_color,  pp_jimenezmlaa_free },
  62. };
  63.  
  64. #endif
  65.