Bug 616608 - Pass the rest of webgl-specific.html test, part 1/3: implement section 6.7 on depthRange - r=vlad

This commit is contained in:
Benoit Jacob 2010-12-06 06:34:35 -05:00
parent 995fc1af38
commit 00a9105e15

View File

@ -904,7 +904,16 @@ WebGLContext::DepthFunc(WebGLenum func)
GL_SAME_METHOD_1(DepthMask, DepthMask, WebGLboolean)
GL_SAME_METHOD_2(DepthRange, DepthRange, WebGLfloat, WebGLfloat)
NS_IMETHODIMP
WebGLContext::DepthRange(WebGLfloat zNear, WebGLfloat zFar)
{
if (zNear > zFar)
return ErrorInvalidOperation("depthRange: the near value is greater than the far value!");
MakeContextCurrent();
gl->fDepthRange(zNear, zFar);
return NS_OK;
}
NS_IMETHODIMP
WebGLContext::DisableVertexAttribArray(WebGLuint index)