From 6203540306aebbbac55117f06785a76ad82267fb Mon Sep 17 00:00:00 2001 From: Amit Feller Date: Wed, 11 May 2011 17:48:21 +0300 Subject: [PATCH] small changes to the code before the commit for supporting windows os Change-Id: I062add6d6340677a9e2e98ac47d53c87ad2a6535 --- tools/emulator/opengl/host/libs/Translator/EGL/EglContext.cpp | 2 +- tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp | 1 - .../opengl/host/libs/Translator/GLES_CM/GLEScontext.cpp | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglContext.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglContext.cpp index 27f80174f..6710baafb 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglContext.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglContext.cpp @@ -31,7 +31,7 @@ m_draw(NULL), m_destroy(false), m_version(ver) { - m_shareGroup = shared_context.Ptr()? + m_shareGroup = shared_context.Ptr()? mngr->attachShareGroup(context,shared_context.Ptr()->getShareGroup().Ptr()): mngr->createShareGroup(context); m_hndl = ++s_nextContextHndl; diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp index a161ae10d..c863f88da 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp @@ -144,7 +144,6 @@ void queryConfigs(EGLNativeDisplayType dpy,ConfigsList& listOut) { EglConfig* conf = pixelFormatToConfig(dpy,&frmtList[i]); if(conf) listOut.push_back(conf); } - listOut.sort(); XFree(frmtList); } diff --git a/tools/emulator/opengl/host/libs/Translator/GLES_CM/GLEScontext.cpp b/tools/emulator/opengl/host/libs/Translator/GLES_CM/GLEScontext.cpp index ad56ba321..d1d76ef7c 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLES_CM/GLEScontext.cpp +++ b/tools/emulator/opengl/host/libs/Translator/GLES_CM/GLEScontext.cpp @@ -53,6 +53,7 @@ void GLEScontext::init() { android::Mutex::Autolock mutex(s_lock); if(!m_initialized) { int maxTexUnits; + s_glDispatch.dispatchFuncs(); s_glDispatch.glGetIntegerv(GL_MAX_CLIP_PLANES,&s_glSupport.maxClipPlane); s_glDispatch.glGetIntegerv(GL_MAX_LIGHTS,&s_glSupport.maxLights); s_glDispatch.glGetIntegerv(GL_MAX_TEXTURE_SIZE,&s_glSupport.maxTexSize); @@ -67,7 +68,6 @@ void GLEScontext::init() { GLEScontext::GLEScontext():m_glError(GL_NO_ERROR),m_activeTexture(0),m_arrayBuffer(0),m_elementBuffer(0),m_pointsIndex(-1),m_initialized(false) { - s_glDispatch.dispatchFuncs(); m_map[GL_COLOR_ARRAY] = new GLESpointer(); m_map[GL_NORMAL_ARRAY] = new GLESpointer(); @@ -469,7 +469,7 @@ GLuint GLEScontext::getBuffer(GLenum target) { GLvoid* GLEScontext::getBindedBuffer(GLenum target) { GLuint bufferName = getBuffer(target); if(!bufferName) return NULL; - + GLESbuffer* vbo = static_cast(m_shareGroup->getObjectData(VERTEXBUFFER,bufferName).Ptr()); return vbo->getData(); }