summaryrefslogtreecommitdiffstats
path: root/WebCore/html/canvas/WebGLTexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/canvas/WebGLTexture.h')
-rw-r--r--WebCore/html/canvas/WebGLTexture.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/WebCore/html/canvas/WebGLTexture.h b/WebCore/html/canvas/WebGLTexture.h
index b3c1f05..864533e 100644
--- a/WebCore/html/canvas/WebGLTexture.h
+++ b/WebCore/html/canvas/WebGLTexture.h
@@ -47,6 +47,17 @@ namespace WebCore {
cubeMapRWrapModeInitialized = initialized;
}
+ void setTarget(unsigned long);
+ void setParameteri(unsigned long pname, int param);
+ void setParameterf(unsigned long pname, float param);
+ void setSize(unsigned long target, unsigned width, unsigned height);
+
+ static bool isNPOT(unsigned, unsigned);
+
+ bool isNPOT() const { return m_isNPOT; }
+ // Determine if texture sampling should always return [0, 0, 0, 1] (OpenGL ES 2.0 Sec 3.8.2).
+ bool needToUseBlackTexture() const { return m_needToUseBlackTexture; }
+
protected:
WebGLTexture(WebGLRenderingContext*);
@@ -55,7 +66,22 @@ namespace WebCore {
private:
virtual bool isTexture() const { return true; }
+ void updateNPOTStates();
+
bool cubeMapRWrapModeInitialized;
+
+ unsigned long m_target;
+
+ int m_minFilter;
+ int m_magFilter;
+ int m_wrapS;
+ int m_wrapT;
+
+ unsigned m_width[6];
+ unsigned m_height[6];
+
+ bool m_isNPOT;
+ bool m_needToUseBlackTexture;
};
} // namespace WebCore