Use macro to call gl.
git-svn-id: http://skia.googlecode.com/svn/trunk@696 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
d728f6ecfa
commit
316f9923cb
@ -1121,8 +1121,8 @@ bool GrGpuGL::readPixels(int left, int top, int width, int height,
|
||||
const GrIRect& vp = ((GrGLRenderTarget*)fCurrDrawState.fRenderTarget)->viewport();
|
||||
|
||||
// Brian says that viewport rects are already upside down (grrrrr)
|
||||
glReadPixels(left, -vp.height() - top - height, width, height,
|
||||
format, type, buffer);
|
||||
GR_GL(ReadPixels(left, -vp.height() - top - height, width, height,
|
||||
format, type, buffer));
|
||||
|
||||
// now reverse the order of the rows, since GL's are bottom-to-top, but our
|
||||
// API presents top-to-bottom
|
||||
@ -1316,8 +1316,8 @@ void GrGpuGL::flushStencil() {
|
||||
if (!fCurrDrawState.fReverseFill) {
|
||||
funcRef |= pathStencilMask;
|
||||
}
|
||||
glStencilFunc(GL_EQUAL, funcRef, funcMask);
|
||||
glStencilMask(pathStencilMask);
|
||||
GR_GL(StencilFunc(GL_EQUAL, funcRef, funcMask));
|
||||
GR_GL(StencilMask(pathStencilMask));
|
||||
GR_GL(StencilOp(GL_ZERO, GL_ZERO, GL_ZERO));
|
||||
GR_GL(ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE));
|
||||
if (!fSingleStencilPassForWinding) {
|
||||
|
@ -576,9 +576,9 @@ void GrGpuGLShaders::flushMatrix(GLint location) {
|
||||
m[GrMatrix::kPersp2]
|
||||
};
|
||||
#if ATTRIBUTE_MATRIX
|
||||
glVertexAttrib4fv(GR_GL_MAT_ATTR_LOCATION+0, mt+0);
|
||||
glVertexAttrib4fv(GR_GL_MAT_ATTR_LOCATION+1, mt+3);
|
||||
glVertexAttrib4fv(GR_GL_MAT_ATTR_LOCATION+2, mt+6);
|
||||
GR_GL(VertexAttrib4fv(GR_GL_MAT_ATTR_LOCATION+0, mt+0));
|
||||
GR_GL(VertexAttrib4fv(GR_GL_MAT_ATTR_LOCATION+1, mt+3));
|
||||
GR_GL(VertexAttrib4fv(GR_GL_MAT_ATTR_LOCATION+2, mt+6));
|
||||
#else
|
||||
GR_GL(UniformMatrix3fv(location,1,false,mt));
|
||||
#endif
|
||||
@ -615,9 +615,9 @@ void GrGpuGLShaders::flushTexMatrix(GLint location,
|
||||
(*m)[GrMatrix::kPersp2]
|
||||
};
|
||||
#if ATTRIBUTE_MATRIX
|
||||
glVertexAttrib4fv(GR_GL_TEXMAT_ATTR_LOCATION+0, mt+0);
|
||||
glVertexAttrib4fv(GR_GL_TEXMAT_ATTR_LOCATION+1, mt+3);
|
||||
glVertexAttrib4fv(GR_GL_TEXMAT_ATTR_LOCATION+2, mt+6);
|
||||
GR_GL(VertexAttrib4fv(GR_GL_TEXMAT_ATTR_LOCATION+0, mt+0));
|
||||
GR_GL(VertexAttrib4fv(GR_GL_TEXMAT_ATTR_LOCATION+1, mt+3));
|
||||
GR_GL(VertexAttrib4fv(GR_GL_TEXMAT_ATTR_LOCATION+2, mt+6));
|
||||
#else
|
||||
GR_GL(UniformMatrix3fv(location,1,false,mt));
|
||||
#endif
|
||||
|
@ -1141,9 +1141,9 @@ void GrGpuGLShaders2::flushViewMatrix() {
|
||||
m[GrMatrix::kPersp2]
|
||||
};
|
||||
#if ATTRIBUTE_MATRIX
|
||||
glVertexAttrib4fv(VIEWMAT_ATTR_LOCATION+0, mt+0);
|
||||
glVertexAttrib4fv(VIEWMAT_ATTR_LOCATION+1, mt+3);
|
||||
glVertexAttrib4fv(VIEWMAT_ATTR_LOCATION+2, mt+6);
|
||||
GR_GL(VertexAttrib4fv(VIEWMAT_ATTR_LOCATION+0, mt+0));
|
||||
GR_GL(VertexAttrib4fv(VIEWMAT_ATTR_LOCATION+1, mt+3));
|
||||
GR_GL(VertexAttrib4fv(VIEWMAT_ATTR_LOCATION+2, mt+6));
|
||||
#else
|
||||
GR_GL(UniformMatrix3fv(fProgram->fUniLocations.fViewMatrixUni,1,false,mt));
|
||||
#endif
|
||||
@ -1184,9 +1184,9 @@ void GrGpuGLShaders2::flushTextureMatrix(int stage) {
|
||||
(*m)[GrMatrix::kPersp2]
|
||||
};
|
||||
#if ATTRIBUTE_MATRIX
|
||||
glVertexAttrib4fv(TEXMAT_ATTR_LOCATION(0)+0, mt+0);
|
||||
glVertexAttrib4fv(TEXMAT_ATTR_LOCATION(0)+1, mt+3);
|
||||
glVertexAttrib4fv(TEXMAT_ATTR_LOCATION(0)+2, mt+6);
|
||||
GR_GL(VertexAttrib4fv(TEXMAT_ATTR_LOCATION(0)+0, mt+0));
|
||||
GR_GL(VertexAttrib4fv(TEXMAT_ATTR_LOCATION(0)+1, mt+3));
|
||||
GR_GL(VertexAttrib4fv(TEXMAT_ATTR_LOCATION(0)+2, mt+6));
|
||||
#else
|
||||
GR_GL(UniformMatrix3fv(fProgram->fUniLocations.fStages[stage].fTextureMatrixUni,
|
||||
1,
|
||||
|
Loading…
Reference in New Issue
Block a user