blob: 5521c585b53de1d1583b9ee94de616be610127a0 [file] [log] [blame]
Brian34ae99d2006-12-18 08:28:54 -07001/*
2 * Mesa 3-D graphics library
3 * Version: 6.5
4 *
5 * Copyright (C) 2004-2006 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26#ifndef SHADER_API_H
27#define SHADER_API_H
28
29
30#include "glheader.h"
31#include "mtypes.h"
32
33
Brian5b01c5e2006-12-19 18:02:03 -070034/**
35 * Internal functions
36 */
37
38extern void
39_mesa_init_shader_state(GLcontext * ctx);
40
Brian935f93f2007-03-24 16:20:02 -060041extern void
42_mesa_free_shader_state(GLcontext *ctx);
43
Brian2d2bb352007-12-07 17:11:30 -070044/*
Brian65a18442006-12-19 18:46:56 -070045extern struct gl_shader_program *
46_mesa_new_shader_program(GLcontext *ctx, GLuint name);
Brian2d2bb352007-12-07 17:11:30 -070047*/
Brian34ae99d2006-12-18 08:28:54 -070048extern void
Brian3c008a02007-04-12 15:22:32 -060049_mesa_clear_shader_program_data(GLcontext *ctx,
50 struct gl_shader_program *shProg);
51
52extern void
Brian65a18442006-12-19 18:46:56 -070053_mesa_free_shader_program_data(GLcontext *ctx,
54 struct gl_shader_program *shProg);
Brian34ae99d2006-12-18 08:28:54 -070055
56extern void
Brian9e4bae92006-12-20 09:27:42 -070057_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg);
Brian34ae99d2006-12-18 08:28:54 -070058
Brian3c008a02007-04-12 15:22:32 -060059extern void
60_mesa_reference_shader_program(GLcontext *ctx,
61 struct gl_shader_program **ptr,
62 struct gl_shader_program *shProg);
63
Brian65a18442006-12-19 18:46:56 -070064extern struct gl_shader_program *
65_mesa_lookup_shader_program(GLcontext *ctx, GLuint name);
Brian34ae99d2006-12-18 08:28:54 -070066
67
68extern struct gl_shader *
69_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
70
Brian9e4bae92006-12-20 09:27:42 -070071extern void
72_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh);
73
Brian3c008a02007-04-12 15:22:32 -060074extern void
75_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
76 struct gl_shader *sh);
77
Brian65a18442006-12-19 18:46:56 -070078extern struct gl_shader *
Brian34ae99d2006-12-18 08:28:54 -070079_mesa_lookup_shader(GLcontext *ctx, GLuint name);
80
81
Brian5b01c5e2006-12-19 18:02:03 -070082extern void
83_mesa_use_program(GLcontext *ctx, GLuint program);
84
Brian2d2bb352007-12-07 17:11:30 -070085
Brian5b01c5e2006-12-19 18:02:03 -070086extern void
Brian2d2bb352007-12-07 17:11:30 -070087_mesa_init_glsl_driver_functions(struct dd_function_table *driver);
Brian34ae99d2006-12-18 08:28:54 -070088
89
90#endif /* SHADER_API_H */