mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 02:52:12 +00:00
stringly typed binding. UGH. fixed
This commit is contained in:
1 parent
5c57a0aaa1
commit
5bd3f95bfa
1 file changed
+7
-7
+7
-7
@@ -43,14 +43,14 @@ void main() {
|
||||
static FRAGMENT_SHADER_SRC: &'static str = "
|
||||
#version 150 core
|
||||
|
||||
uniform vec3 triangleColor;
|
||||
uniform sampler2D tex;
|
||||
|
||||
in vec3 Color;
|
||||
in vec2 Texcoord;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
//uniform vec3 triangleColor;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
//out_color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
//out_color = vec4(triangleColor, 1.0); // Uniform
|
||||
@@ -220,10 +220,10 @@ pub fn run() {
|
||||
);
|
||||
|
||||
// Specify the layout of the vertex data
|
||||
let pos_attr = gl::GetAttribLocation(program, CString::new("in_color").unwrap().as_ptr());
|
||||
gl::EnableVertexAttribArray(pos_attr as GLuint);
|
||||
let color_attr = gl::GetAttribLocation(program, CString::new("in_color").unwrap().as_ptr());
|
||||
gl::EnableVertexAttribArray(color_attr as GLuint);
|
||||
gl::VertexAttribPointer(
|
||||
pos_attr as GLuint,
|
||||
color_attr as GLuint,
|
||||
3,
|
||||
gl::FLOAT,
|
||||
gl::FALSE as GLboolean,
|
||||
@@ -232,7 +232,7 @@ pub fn run() {
|
||||
);
|
||||
|
||||
// Specify the layout of the vertex data
|
||||
let tex_attr = gl::GetAttribLocation(program, CString::new("tex_coordinate").unwrap().as_ptr());
|
||||
let tex_attr = gl::GetAttribLocation(program, CString::new("tex_coord").unwrap().as_ptr());
|
||||
gl::EnableVertexAttribArray(tex_attr as GLuint);
|
||||
gl::VertexAttribPointer(
|
||||
tex_attr as GLuint,
|
||||
|
||||
Reference in new issue
Block a user