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 various missing functions/constants #4

Merged
merged 5 commits into from Mar 19, 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

Added glUniform{1f,2f,3f,4f}

  • Loading branch information
sp0 committed Mar 18, 2013
commit 5153e0db2ac656e10ba7439df9886c9fa39fb693
24 gl2.rs
@@ -517,12 +517,36 @@ pub fn tex_parameter_i(target: GLenum, pname: GLenum, param: GLint) {
}
}

pub fn uniform_1f(location: GLint, x: GLfloat) {
unsafe {
ll::glUniform1f(location, x);
}
}

pub fn uniform_1i(location: GLint, x: GLint) {
unsafe {
ll::glUniform1i(location, x);
}
}

pub fn uniform_2f(location: GLint, x: GLfloat, y: GLfloat) {
unsafe {
ll::glUniform2f(location, x, y);
}
}

pub fn uniform_3f(location: GLint, x: GLfloat, y: GLfloat, z: GLfloat) {
unsafe {
ll::glUniform3f(location, x, y, z);
}
}

pub fn uniform_4f(location: GLint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) {
unsafe {
ll::glUniform4f(location, x, y, z, w);
}
}

pub fn uniform_matrix_4fv(location: GLint, transpose: bool, value: &[f32]) {
unsafe {
ll::glUniformMatrix4fv(location,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.