[GLESv3] versions, es > 2, encoder
- Encoder with ES 3.x entry points
- Allow ES versions > 2 depending on host capability
Change-Id: I71e374f1685610bb0e4f9e04f4bba87b0cbaa02b
diff --git a/system/GLESv2_enc/GL2Encoder.cpp b/system/GLESv2_enc/GL2Encoder.cpp
index 6d0b9a3..2631c36 100755
--- a/system/GLESv2_enc/GL2Encoder.cpp
+++ b/system/GLESv2_enc/GL2Encoder.cpp
@@ -50,6 +50,8 @@
GL2Encoder::GL2Encoder(IOStream *stream, ChecksumCalculator *protocol)
: gl2_encoder_context_t(stream, protocol)
{
+ m_currMajorVersion = 2;
+ m_currMinorVersion = 0;
m_initialized = false;
m_state = NULL;
m_error = GL_NO_ERROR;
@@ -65,6 +67,12 @@
//overrides
#define OVERRIDE(name) m_##name##_enc = this-> name ; this-> name = &s_##name
+#define OVERRIDE_CUSTOM(name) this-> name = &s_##name
+#define OVERRIDEWITH(name, target) do { \
+ m_##target##_enc = this-> target; \
+ this-> target = &s_##name; \
+} while(0)
+#define OVERRIDEOES(name) OVERRIDEWITH(name, name##OES)
OVERRIDE(glFlush);
OVERRIDE(glPixelStorei);