opengl translator: add native config id to EglConfig

The EGL_CONFIG_ID attribute should be uniqueue for each
config, at some cases we duplicate a configuration in
order to simulate different pixel format (RGB_565) at that
case we want to keep the native config_id of the backend
OpenGL the same on both configs.
This change adds extra attribute 'native_config_id' for that
purpose.

Change-Id: I7e560a4badd01d146b9753cee603ff4707ccfd7f
This commit is contained in:
Amit Feller
2011-07-06 09:52:38 +03:00
committed by Guy Zadickario
parent 3db2bcf7e5
commit a62aa2c009
2 changed files with 5 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ EglConfig::EglConfig(EGLint red_size,
m_bind_to_tex_rgba(EGL_FALSE), //not supported for now
m_caveat(caveat),
m_config_id(config_id),
m_native_config_id(config_id),
m_frame_buffer_level(frame_buffer_level),
m_depth_size(depth_size),
m_max_pbuffer_width(max_pbuffer_width),
@@ -82,6 +83,7 @@ EglConfig::EglConfig(EGLint red_size,
m_bind_to_tex_rgba(conf.m_bind_to_tex_rgba),
m_caveat(conf.m_caveat),
m_config_id(conf.m_config_id),
m_native_config_id(conf.m_native_config_id),
m_frame_buffer_level(conf.m_frame_buffer_level),
m_depth_size(conf.m_depth_size),
m_max_pbuffer_width(conf.m_max_pbuffer_width),
@@ -121,6 +123,7 @@ EglConfig::EglConfig(const EglConfig& conf,
m_bind_to_tex_rgba(conf.m_bind_to_tex_rgba),
m_caveat(conf.m_caveat),
m_config_id(config_id),
m_native_config_id(conf.m_native_config_id),
m_frame_buffer_level(conf.m_frame_buffer_level),
m_depth_size(conf.m_depth_size),
m_max_pbuffer_width(conf.m_max_pbuffer_width),

View File

@@ -32,6 +32,7 @@ public:
bool choosen(const EglConfig& dummy);
EGLint surfaceType(){ return m_surface_type;};
EGLint id(){return m_config_id;};
EGLint nativeId(){return m_native_config_id;};
EGLNativePixelFormatType nativeConfig(){ return m_nativeFormat;}
EglConfig(EGLint red_size,
@@ -78,6 +79,7 @@ private:
const EGLBoolean m_bind_to_tex_rgba;
const EGLenum m_caveat;
const EGLint m_config_id;
const EGLint m_native_config_id;
const EGLint m_frame_buffer_level;
const EGLint m_depth_size;
const EGLint m_max_pbuffer_width;