OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
402 } | 402 } |
403 | 403 |
404 // we don't use the zb at all | 404 // we don't use the zb at all |
405 GL_CALL(Disable(GR_GL_DEPTH_TEST)); | 405 GL_CALL(Disable(GR_GL_DEPTH_TEST)); |
406 GL_CALL(DepthMask(GR_GL_FALSE)); | 406 GL_CALL(DepthMask(GR_GL_FALSE)); |
407 | 407 |
408 fHWDrawFace = GrDrawState::kInvalid_DrawFace; | 408 fHWDrawFace = GrDrawState::kInvalid_DrawFace; |
409 fHWDitherEnabled = kUnknown_TriState; | 409 fHWDitherEnabled = kUnknown_TriState; |
410 | 410 |
411 if (kDesktop_GrGLBinding == this->glBinding()) { | 411 if (kDesktop_GrGLBinding == this->glBinding()) { |
412 // Desktop-only state that we never change | 412 // Desktop-only state that we never change |
robertphillips
2013/02/27 22:33:07
Shouldn't we instead check if they are enabled and
bsalomon
2013/02/28 14:09:41
You mean make glGetIntegerv calls? I assume that q
| |
413 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); | 413 if (!this->glCaps().isCoreProfile()) { |
414 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); | 414 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); |
415 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); | 415 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); |
416 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); | 416 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); |
417 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); | 417 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); |
418 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); | |
419 GL_CALL(Disable(GR_GL_INDEX_LOGIC_OP)); | |
420 } | |
robertphillips
2013/02/27 22:33:07
Why not these other two?
bsalomon
2013/02/28 14:09:41
The offset fill and vp point size? They're still a
| |
418 if (this->glCaps().imagingSupport()) { | 421 if (this->glCaps().imagingSupport()) { |
419 GL_CALL(Disable(GR_GL_COLOR_TABLE)); | 422 GL_CALL(Disable(GR_GL_COLOR_TABLE)); |
420 } | 423 } |
421 GL_CALL(Disable(GR_GL_INDEX_LOGIC_OP)); | |
422 GL_CALL(Disable(GR_GL_POLYGON_OFFSET_FILL)); | 424 GL_CALL(Disable(GR_GL_POLYGON_OFFSET_FILL)); |
423 // Since ES doesn't support glPointSize at all we always use the VS to | 425 // Since ES doesn't support glPointSize at all we always use the VS to |
424 // set the point size | 426 // set the point size |
425 GL_CALL(Enable(GR_GL_VERTEX_PROGRAM_POINT_SIZE)); | 427 GL_CALL(Enable(GR_GL_VERTEX_PROGRAM_POINT_SIZE)); |
426 | 428 |
427 // We should set glPolygonMode(FRONT_AND_BACK,FILL) here, too. It isn't | 429 // We should set glPolygonMode(FRONT_AND_BACK,FILL) here, too. It isn't |
428 // currently part of our gl interface. There are probably others as | 430 // currently part of our gl interface. There are probably others as |
429 // well. | 431 // well. |
430 } | 432 } |
431 fHWAAState.invalidate(); | 433 fHWAAState.invalidate(); |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2412 stride, | 2414 stride, |
2413 offset)); | 2415 offset)); |
2414 fAttribPointerIsValid = true; | 2416 fAttribPointerIsValid = true; |
2415 fVertexBufferID = bufferID; | 2417 fVertexBufferID = bufferID; |
2416 fSize = size; | 2418 fSize = size; |
2417 fNormalized = normalized; | 2419 fNormalized = normalized; |
2418 fStride = stride; | 2420 fStride = stride; |
2419 fOffset = offset; | 2421 fOffset = offset; |
2420 } | 2422 } |
2421 } | 2423 } |
OLD | NEW |