Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/gpu/gl/GrGpuGL.cpp

Issue 23513006: Add glTexGen funcs to interface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: glClientActiveTexture is not in OGL 1.1, use wglGetProcAddress Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 // Vertex 354 // Vertex
355 if (resetBits & kVertex_GrGLBackendState) { 355 if (resetBits & kVertex_GrGLBackendState) {
356 fHWGeometryState.invalidate(); 356 fHWGeometryState.invalidate();
357 } 357 }
358 358
359 if (resetBits & kRenderTarget_GrGLBackendState) { 359 if (resetBits & kRenderTarget_GrGLBackendState) {
360 fHWBoundRenderTarget = NULL; 360 fHWBoundRenderTarget = NULL;
361 } 361 }
362 362
363 if (resetBits & kPathStencil_GrGLBackendState) { 363 if (resetBits & kFixedFunction_GrGLBackendState &&
364 fHWPathStencilMatrixState.invalidate(); 364 kDesktop_GrGLBinding == this->glBinding() &&
365 if (this->caps()->pathStencilingSupport()) { 365 !this->glCaps().isCoreProfile()) {
366 // we don't use the model view matrix. 366
367 GL_CALL(MatrixMode(GR_GL_MODELVIEW)); 367 fHWfixedFunctionMatrixState.invalidate();
368 GL_CALL(LoadIdentity()); 368 // we don't use the model view matrix.
369 GL_CALL(MatrixMode(GR_GL_MODELVIEW));
370 GL_CALL(LoadIdentity());
371
372 // When we use fixed function vertex processing we always use the vertex array
373 // and none of the other arrays.
374 GL_CALL(EnableClientState(GR_GL_VERTEX_ARRAY));
375 GL_CALL(DisableClientState(GR_GL_NORMAL_ARRAY));
376 GL_CALL(DisableClientState(GR_GL_COLOR_ARRAY));
377 GL_CALL(DisableClientState(GR_GL_INDEX_ARRAY));
378 GL_CALL(DisableClientState(GR_GL_EDGE_FLAG_ARRAY));
379 for (int i = 0; i < this->glCaps().maxFixedFunctionTextureCoords(); ++i) {
380 GL_CALL(ClientActiveTexture(GR_GL_TEXTURE0 + i));
381 GL_CALL(DisableClientState(GR_GL_TEXTURE_COORD_ARRAY));
382
383 GL_CALL(Disable(GR_GL_TEXTURE_GEN_S));
384 GL_CALL(Disable(GR_GL_TEXTURE_GEN_T));
385 GL_CALL(Disable(GR_GL_TEXTURE_GEN_Q));
386 GL_CALL(Disable(GR_GL_TEXTURE_GEN_R));
369 } 387 }
370 } 388 }
371 389
372 // we assume these values 390 // we assume these values
373 if (resetBits & kPixelStore_GrGLBackendState) { 391 if (resetBits & kPixelStore_GrGLBackendState) {
374 if (this->glCaps().unpackRowLengthSupport()) { 392 if (this->glCaps().unpackRowLengthSupport()) {
375 GL_CALL(PixelStorei(GR_GL_UNPACK_ROW_LENGTH, 0)); 393 GL_CALL(PixelStorei(GR_GL_UNPACK_ROW_LENGTH, 0));
376 } 394 }
377 if (this->glCaps().packRowLengthSupport()) { 395 if (this->glCaps().packRowLengthSupport()) {
378 GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, 0)); 396 GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, 0));
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 this->setVertexArrayID(gpu, 0); 2570 this->setVertexArrayID(gpu, 0);
2553 } 2571 }
2554 int attrCount = gpu->glCaps().maxVertexAttributes(); 2572 int attrCount = gpu->glCaps().maxVertexAttributes();
2555 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2573 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2556 fDefaultVertexArrayAttribState.resize(attrCount); 2574 fDefaultVertexArrayAttribState.resize(attrCount);
2557 } 2575 }
2558 attribState = &fDefaultVertexArrayAttribState; 2576 attribState = &fDefaultVertexArrayAttribState;
2559 } 2577 }
2560 return attribState; 2578 return attribState;
2561 } 2579 }
OLDNEW
« src/gpu/gl/GrGpuGL.h ('K') | « src/gpu/gl/GrGpuGL.h ('k') | src/gpu/gl/GrGpuGL_program.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698