1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 use ctypes::{c_double, c_float, c_int, c_schar, c_short, c_uchar, c_uint, c_ushort, c_void}; 7 //48 8 pub type GLenum = c_uint; 9 pub type GLboolean = c_uchar; 10 pub type GLbitfield = c_uint; 11 pub type GLbyte = c_schar; 12 pub type GLshort = c_short; 13 pub type GLint = c_int; 14 pub type GLsizei = c_int; 15 pub type GLubyte = c_uchar; 16 pub type GLushort = c_ushort; 17 pub type GLuint = c_uint; 18 pub type GLfloat = c_float; 19 pub type GLclampf = c_float; 20 pub type GLdouble = c_double; 21 pub type GLclampd = c_double; 22 pub type GLvoid = c_void; 23 //63 24 //68 25 //AccumOp 26 pub const GL_ACCUM: GLenum = 0x0100; 27 pub const GL_LOAD: GLenum = 0x0101; 28 pub const GL_RETURN: GLenum = 0x0102; 29 pub const GL_MULT: GLenum = 0x0103; 30 pub const GL_ADD: GLenum = 0x0104; 31 //AlphaFunction 32 pub const GL_NEVER: GLenum = 0x0200; 33 pub const GL_LESS: GLenum = 0x0201; 34 pub const GL_EQUAL: GLenum = 0x0202; 35 pub const GL_LEQUAL: GLenum = 0x0203; 36 pub const GL_GREATER: GLenum = 0x0204; 37 pub const GL_NOTEQUAL: GLenum = 0x0205; 38 pub const GL_GEQUAL: GLenum = 0x0206; 39 pub const GL_ALWAYS: GLenum = 0x0207; 40 // TODO: we're missing about 1500 lines of defines and methods 41 // until that time, you can use the excellent GL crate 42 // https://github.com/brendanzab/gl-rs 43 extern "system" { glAccum( op: GLenum, value: GLfloat, )44 pub fn glAccum( 45 op: GLenum, 46 value: GLfloat, 47 ); glAlphaFunc( func: GLenum, reference: GLclampf, )48 pub fn glAlphaFunc( 49 func: GLenum, 50 reference: GLclampf, 51 ); 52 } 53