Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.11 KB

mojoshader.h

File metadata and controls

45 lines (36 loc) · 1.11 KB
 
Feb 10, 2008
Feb 10, 2008
1
/**
Mar 22, 2008
Mar 22, 2008
2
3
* MojoShader; generate shader programs from bytecode of compiled
* Direct3D shaders.
Feb 10, 2008
Feb 10, 2008
4
5
6
7
8
9
*
* Please see the file LICENSE.txt in the source's root directory.
*
* This file written by Ryan C. Gordon.
*/
Mar 22, 2008
Mar 22, 2008
10
11
#ifndef __INCL_MOJOSHADER_H_
#define __INCL_MOJOSHADER_H_
Feb 10, 2008
Feb 10, 2008
12
13
14
15
16
#ifdef __cplusplus
extern "C" {
#endif
Mar 16, 2008
Mar 16, 2008
17
/*
Mar 22, 2008
Mar 22, 2008
18
19
* const int compiled_against = MOJOSHADER_VERSION;
* const int linked_against = MOJOSHADER_version();
Mar 16, 2008
Mar 16, 2008
20
*/
Mar 22, 2008
Mar 22, 2008
21
22
#define MOJOSHADER_VERSION 1
int MOJOSHADER_version(void);
Mar 16, 2008
Mar 16, 2008
23
24
25
26
27
28
/*
* These allocators work just like the C runtime's malloc() and free()
* (in fact, they use malloc() and free() internally if you don't
* specify your own allocator).
*/
Mar 22, 2008
Mar 22, 2008
29
30
typedef void *(*MOJOSHADER_malloc)(int bytes);
typedef void (*MOJOSHADER_free)(void *ptr);
Mar 14, 2008
Mar 14, 2008
31
Feb 10, 2008
Feb 10, 2008
32
33
/* !!! FIXME: documentation. */
/* !!! FIXME: this needs to change to return a buffer of GLSL code. */
Mar 22, 2008
Mar 22, 2008
34
35
36
int MOJOSHADER_parse(const char *profile, const unsigned char *tokenbuf,
const unsigned int bufsize, MOJOSHADER_malloc m,
MOJOSHADER_free f);
Feb 10, 2008
Feb 10, 2008
37
38
39
40
41
42
43
#ifdef __cplusplus
}
#endif
#endif /* include-once blocker. */
Mar 22, 2008
Mar 22, 2008
44
/* end of mojoshader.h ... */