Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added vertex array gen/binding and glPolygonMode #24

Merged
merged 2 commits into from Apr 26, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Added glPolygonMode and relating constants

  • Loading branch information
Jeaye
Jeaye committed Apr 25, 2013
commit 8e53c31b6f4a23eb772d8336d66d450d26b5996d
17 gl2.rs
@@ -112,9 +112,16 @@ pub static POLYGON_OFFSET_FILL: c_uint = 0x8037 as c_uint;
pub static SAMPLE_ALPHA_TO_COVERAGE: c_uint = 0x809E as c_uint;
pub static SAMPLE_COVERAGE: c_uint = 0x80A0 as c_uint;

/* FrontFaceDirection */
/* Polygons */
pub static POINT: c_uint = 0x1B00 as c_uint;
pub static LINE: c_uint = 0x1B01 as c_uint;
pub static FILL: c_uint = 0x1B02 as c_uint;
pub static CW: c_uint = 0x0900 as c_uint;
pub static CCW: c_uint = 0x0901 as c_uint;
pub static POLYGON_MODE: c_uint = 0x0B40 as c_uint;
pub static POLYGON_SMOOTH: c_uint = 0x0B41 as c_uint;
pub static POLYGON_STIPPLE: c_uint = 0x0B42 as c_uint;
pub static EDGE_FLAG: c_uint = 0x0B43 as c_uint;

/* GetPName */
pub static LINE_WIDTH: c_uint = 0x0B21 as c_uint;
@@ -764,6 +771,12 @@ pub fn pixel_store_i(pname: GLenum, param: GLint) {
}
}

pub fn polygon_mode(face: GLenum, mode: GLenum) {
unsafe {
ll::glPolygonMode(face, mode);
}
}

pub fn shader_source(shader: GLuint, strings: &[~[u8]]) {
unsafe {
let pointers = strings.map(|string| to_ptr(*string));
@@ -1130,6 +1143,8 @@ pub fn glPixelStorei(++pname: GLenum, ++param: GLint);

pub fn glPolygonOffset(++factor: GLfloat, ++units: GLfloat);

pub fn glPolygonMode(++face: GLenum, ++mode: GLenum);

pub fn glReadPixels(++x: GLint, ++y: GLint, ++width: GLsizei, ++height: GLsizei, ++format: GLenum, ++_type: GLenum, ++pixels: *GLvoid);

// Unsupported on Mac:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.