aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGpuGL.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-11 14:07:02 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-11 14:07:02 +0000
commit7acdb8e1d29fe50454431d768ddc862b693db8b0 (patch)
tree06bc174ee033eb862686406e59a3954d3666e09f /gpu/src/GrGpuGL.h
parent9db446a5b66412dd0dd48a85253bf1a8310ec76b (diff)
git-svn-id: http://skia.googlecode.com/svn/trunk@783 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGL.h')
-rw-r--r--gpu/src/GrGpuGL.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index 0ba405d457..e46c2ceacb 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -66,6 +66,7 @@ protected:
GrVertexLayout fVertexLayout;
const GrVertexBuffer* fVertexBuffer;
const GrIndexBuffer* fIndexBuffer;
+ bool fArrayPtrsDirty;
} fHWGeometryState;
DrState fHWDrawState;
@@ -88,6 +89,12 @@ protected:
void setTextureUnit(int unitIdx);
+ // binds appropriate vertex and index buffers and returns either the ptr
+ // to client memory or offset into a VB of the first vertex
+ const GLvoid* setBuffersAndGetVertexStart(int vertexStride, int startVertex,
+ int startIndex, int vertexCount,
+ int indexCount);
+
// flushes state that is common to fixed and programmable GL
// dither
// line smoothing
@@ -111,6 +118,13 @@ protected:
GrGLExts fExts;
+#if GR_GL_NO_CLIENT_SIDE_ARRAYS
+ void putClientVertexDataInBuffer(const void* vertexData,
+ size_t vertexDataSize);
+ void putClientIndexDataInBuffer(const void* indexData,
+ size_t indexDataSize);
+#endif
+
private:
void resetContextHelper();
@@ -160,6 +174,13 @@ private:
int fActiveTextureUnitIdx;
typedef GrGpu INHERITED;
+
+#if GR_GL_NO_CLIENT_SIDE_ARRAYS
+ GrGLVertexBuffer* fClientArrayVB;
+ GrGLIndexBuffer* fClientArrayIB;
+ int fOversizeVBDrawCnt;
+ int fOversizeIBDrawCnt;
+#endif
};
bool has_gl_extension(const char* ext);