2012-12-15 01:41:03 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
#ifndef __SHELL_GLSL_QUAD_H__
|
|
|
|
#define __SHELL_GLSL_QUAD_H__
|
|
|
|
|
|
|
|
#include "st.h"
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ShellSnippetHook:
|
|
|
|
* Temporary hack to work around Cogl not exporting CoglSnippetHook in
|
|
|
|
* the 1.0 API. Don't use.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
/* Per pipeline vertex hooks */
|
|
|
|
SHELL_SNIPPET_HOOK_VERTEX = 0,
|
|
|
|
SHELL_SNIPPET_HOOK_VERTEX_TRANSFORM,
|
|
|
|
|
|
|
|
/* Per pipeline fragment hooks */
|
|
|
|
SHELL_SNIPPET_HOOK_FRAGMENT = 2048,
|
|
|
|
|
|
|
|
/* Per layer vertex hooks */
|
|
|
|
SHELL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM = 4096,
|
|
|
|
|
|
|
|
/* Per layer fragment hooks */
|
|
|
|
SHELL_SNIPPET_HOOK_LAYER_FRAGMENT = 6144,
|
|
|
|
SHELL_SNIPPET_HOOK_TEXTURE_LOOKUP
|
|
|
|
} ShellSnippetHook;
|
|
|
|
|
2015-09-24 18:07:44 +00:00
|
|
|
#define SHELL_TYPE_GLSL_QUAD (shell_glsl_quad_get_type ())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (ShellGLSLQuad, shell_glsl_quad,
|
|
|
|
SHELL, GLSL_QUAD, ClutterActor)
|
2012-12-15 01:41:03 +00:00
|
|
|
|
|
|
|
struct _ShellGLSLQuadClass
|
|
|
|
{
|
|
|
|
ClutterActorClass parent_class;
|
|
|
|
|
|
|
|
CoglPipeline *base_pipeline;
|
|
|
|
|
|
|
|
void (*build_pipeline) (ShellGLSLQuad *effect);
|
|
|
|
};
|
|
|
|
|
|
|
|
void shell_glsl_quad_add_glsl_snippet (ShellGLSLQuad *quad,
|
|
|
|
ShellSnippetHook hook,
|
|
|
|
const char *declarations,
|
|
|
|
const char *code,
|
|
|
|
gboolean is_replace);
|
|
|
|
|
2014-03-06 15:17:36 +00:00
|
|
|
int shell_glsl_quad_get_uniform_location (ShellGLSLQuad *quad,
|
|
|
|
const char *name);
|
|
|
|
void shell_glsl_quad_set_uniform_float (ShellGLSLQuad *quad,
|
|
|
|
int uniform,
|
|
|
|
int n_components,
|
|
|
|
int total_count,
|
|
|
|
const float *value);
|
|
|
|
|
2012-12-15 01:41:03 +00:00
|
|
|
#endif /* __SHELL_GLSL_QUAD_H__ */
|