webgl: Add shader validation and translation

This commit adds angle-based validation and translation to WebGL
shaders.

The changes to the tex_image_2d test is neccessary (it was not valid
GLES 2.0 shader language).
This commit is contained in:
ecoal95 2015-08-29 18:42:42 +02:00
parent 67cbda4be3
commit 167885707d
9 changed files with 88 additions and 28 deletions

View file

@ -138,7 +138,7 @@ pub enum CanvasWebGLMsg {
DepthRange(f64, f64),
Enable(u32),
Disable(u32),
CompileShader(u32),
CompileShader(u32, String),
CreateBuffer(IpcSender<Option<NonZero<u32>>>),
CreateFramebuffer(IpcSender<Option<NonZero<u32>>>),
CreateRenderbuffer(IpcSender<Option<NonZero<u32>>>),
@ -157,7 +157,6 @@ pub enum CanvasWebGLMsg {
BindTexture(u32, u32),
DrawArrays(u32, i32, i32),
EnableVertexAttribArray(u32),
GetShaderInfoLog(u32, IpcSender<Option<String>>),
GetShaderParameter(u32, u32, IpcSender<WebGLShaderParameter>),
GetAttribLocation(u32, String, IpcSender<Option<i32>>),
GetUniformLocation(u32, String, IpcSender<Option<i32>>),
@ -166,7 +165,6 @@ pub enum CanvasWebGLMsg {
LineWidth(f32),
PixelStorei(u32, i32),
LinkProgram(u32),
ShaderSource(u32, String),
Uniform4fv(i32, Vec<f32>),
UseProgram(u32),
VertexAttribPointer2f(u32, i32, bool, i32, u32),