Lines Matching refs:gl
136 ALOGE(" EGL ver %i %i", dc->gl.egl.majorVersion, dc->gl.egl.minorVersion); in DumpDebug()
137 ALOGE(" EGL context %p surface %p, Display=%p", dc->gl.egl.context, dc->gl.egl.surface, in DumpDebug()
138 dc->gl.egl.display); in DumpDebug()
139 ALOGE(" GL vendor: %s", dc->gl.gl.vendor); in DumpDebug()
140 ALOGE(" GL renderer: %s", dc->gl.gl.renderer); in DumpDebug()
141 ALOGE(" GL Version: %s", dc->gl.gl.version); in DumpDebug()
142 ALOGE(" GL Extensions: %s", dc->gl.gl.extensions); in DumpDebug()
143 ALOGE(" GL int Versions %i %i", dc->gl.gl.majorVersion, dc->gl.gl.minorVersion); in DumpDebug()
145 ALOGV("MAX Textures %i, %i %i", dc->gl.gl.maxVertexTextureUnits, in DumpDebug()
146 dc->gl.gl.maxFragmentTextureImageUnits, dc->gl.gl.maxTextureImageUnits); in DumpDebug()
147 ALOGV("MAX Attribs %i", dc->gl.gl.maxVertexAttribs); in DumpDebug()
148 ALOGV("MAX Uniforms %i, %i", dc->gl.gl.maxVertexUniformVectors, in DumpDebug()
149 dc->gl.gl.maxFragmentUniformVectors); in DumpDebug()
150 ALOGV("MAX Varyings %i", dc->gl.gl.maxVaryingVectors); in DumpDebug()
157 dc->gl.shaderCache->cleanupAll(); in rsdGLShutdown()
158 delete dc->gl.shaderCache; in rsdGLShutdown()
159 delete dc->gl.vertexArrayState; in rsdGLShutdown()
161 if (dc->gl.egl.context != EGL_NO_CONTEXT) { in rsdGLShutdown()
162 RSD_CALL_GL(eglMakeCurrent, dc->gl.egl.display, in rsdGLShutdown()
164 RSD_CALL_GL(eglDestroySurface, dc->gl.egl.display, dc->gl.egl.surfaceDefault); in rsdGLShutdown()
165 if (dc->gl.egl.surface != EGL_NO_SURFACE) { in rsdGLShutdown()
166 RSD_CALL_GL(eglDestroySurface, dc->gl.egl.display, dc->gl.egl.surface); in rsdGLShutdown()
168 RSD_CALL_GL(eglDestroyContext, dc->gl.egl.display, dc->gl.egl.context); in rsdGLShutdown()
174 RSD_CALL_GL(eglTerminate, dc->gl.egl.display); in rsdGLShutdown()
238 dc->gl.egl.numConfigs = -1; in rsdGLInit()
245 dc->gl.egl.display = eglGetDisplay(EGL_DEFAULT_DISPLAY); in rsdGLInit()
248 RSD_CALL_GL(eglInitialize, dc->gl.egl.display, in rsdGLInit()
249 &dc->gl.egl.majorVersion, &dc->gl.egl.minorVersion); in rsdGLInit()
262 ret = eglChooseConfig(dc->gl.egl.display, configAttribs, 0, 0, &numConfigs); in rsdGLInit()
273 ret = eglChooseConfig(dc->gl.egl.display, in rsdGLInit()
281 dc->gl.egl.config = configs[0]; in rsdGLInit()
287 eglGetConfigAttrib(dc->gl.egl.display, in rsdGLInit()
296 eglGetConfigAttrib(dc->gl.egl.display, in rsdGLInit()
304 dc->gl.egl.config = configs[i]; in rsdGLInit()
313 printEGLConfiguration(dc->gl.egl.display, dc->gl.egl.config); in rsdGLInit()
318 dc->gl.egl.context = eglCreateContext(dc->gl.egl.display, dc->gl.egl.config, in rsdGLInit()
321 if (dc->gl.egl.context == EGL_NO_CONTEXT) { in rsdGLInit()
330 dc->gl.egl.surfaceDefault = eglCreatePbufferSurface(dc->gl.egl.display, dc->gl.egl.config, in rsdGLInit()
333 if (dc->gl.egl.surfaceDefault == EGL_NO_SURFACE) { in rsdGLInit()
341 ret = eglMakeCurrent(dc->gl.egl.display, dc->gl.egl.surfaceDefault, in rsdGLInit()
342 dc->gl.egl.surfaceDefault, dc->gl.egl.context); in rsdGLInit()
351 dc->gl.gl.version = glGetString(GL_VERSION); in rsdGLInit()
352 dc->gl.gl.vendor = glGetString(GL_VENDOR); in rsdGLInit()
353 dc->gl.gl.renderer = glGetString(GL_RENDERER); in rsdGLInit()
354 dc->gl.gl.extensions = glGetString(GL_EXTENSIONS); in rsdGLInit()
363 if (strlen((const char *)dc->gl.gl.version) > 9) { in rsdGLInit()
364 if (!memcmp(dc->gl.gl.version, "OpenGL ES-CM", 12)) { in rsdGLInit()
365 verptr = (const char *)dc->gl.gl.version + 12; in rsdGLInit()
367 if (!memcmp(dc->gl.gl.version, "OpenGL ES ", 10)) { in rsdGLInit()
368 verptr = (const char *)dc->gl.gl.version + 9; in rsdGLInit()
378 sscanf(verptr, " %i.%i", &dc->gl.gl.majorVersion, &dc->gl.gl.minorVersion); in rsdGLInit()
381 glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &dc->gl.gl.maxVertexAttribs); in rsdGLInit()
382 glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &dc->gl.gl.maxVertexUniformVectors); in rsdGLInit()
383 glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &dc->gl.gl.maxVertexTextureUnits); in rsdGLInit()
385 glGetIntegerv(GL_MAX_VARYING_VECTORS, &dc->gl.gl.maxVaryingVectors); in rsdGLInit()
386 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &dc->gl.gl.maxTextureImageUnits); in rsdGLInit()
388 glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &dc->gl.gl.maxFragmentTextureImageUnits); in rsdGLInit()
389 glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &dc->gl.gl.maxFragmentUniformVectors); in rsdGLInit()
391 dc->gl.gl.OES_texture_npot = NULL != strstr((const char *)dc->gl.gl.extensions, in rsdGLInit()
393 dc->gl.gl.IMG_texture_npot = NULL != strstr((const char *)dc->gl.gl.extensions, in rsdGLInit()
395 dc->gl.gl.NV_texture_npot_2D_mipmap = NULL != strstr((const char *)dc->gl.gl.extensions, in rsdGLInit()
397 dc->gl.gl.EXT_texture_max_aniso = 1.0f; in rsdGLInit()
398 bool hasAniso = NULL != strstr((const char *)dc->gl.gl.extensions, in rsdGLInit()
401 glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &dc->gl.gl.EXT_texture_max_aniso); in rsdGLInit()
408 dc->gl.shaderCache = new RsdShaderCache(); in rsdGLInit()
409 dc->gl.vertexArrayState = new RsdVertexArrayState(); in rsdGLInit()
410 dc->gl.vertexArrayState->init(dc->gl.gl.maxVertexAttribs); in rsdGLInit()
411 dc->gl.currentFrameBuffer = NULL; in rsdGLInit()
424 if (dc->gl.egl.surface != NULL) { in rsdGLSetInternalSurface()
426 ret = eglMakeCurrent(dc->gl.egl.display, dc->gl.egl.surfaceDefault, in rsdGLSetInternalSurface()
427 dc->gl.egl.surfaceDefault, dc->gl.egl.context); in rsdGLSetInternalSurface()
431 ret = eglDestroySurface(dc->gl.egl.display, dc->gl.egl.surface); in rsdGLSetInternalSurface()
434 dc->gl.egl.surface = NULL; in rsdGLSetInternalSurface()
437 if (dc->gl.currentWndSurface != NULL) { in rsdGLSetInternalSurface()
438 dc->gl.currentWndSurface->decStrong(NULL); in rsdGLSetInternalSurface()
441 dc->gl.currentWndSurface = (ANativeWindow *)sur; in rsdGLSetInternalSurface()
442 if (dc->gl.currentWndSurface != NULL) { in rsdGLSetInternalSurface()
443 dc->gl.currentWndSurface->incStrong(NULL); in rsdGLSetInternalSurface()
446 dc->gl.egl.surface = eglCreateWindowSurface(dc->gl.egl.display, dc->gl.egl.config, in rsdGLSetInternalSurface()
447 dc->gl.currentWndSurface, NULL); in rsdGLSetInternalSurface()
449 if (dc->gl.egl.surface == EGL_NO_SURFACE) { in rsdGLSetInternalSurface()
454 ret = eglMakeCurrent(dc->gl.egl.display, dc->gl.egl.surface, in rsdGLSetInternalSurface()
455 dc->gl.egl.surface, dc->gl.egl.context); in rsdGLSetInternalSurface()
465 if (dc->gl.wndSurface != NULL) { in rsdGLSetSurface()
466 dc->gl.wndSurface->decStrong(NULL); in rsdGLSetSurface()
467 dc->gl.wndSurface = NULL; in rsdGLSetSurface()
472 dc->gl.wndSurface = (ANativeWindow *)sur; in rsdGLSetSurface()
473 if (dc->gl.wndSurface != NULL) { in rsdGLSetSurface()
474 dc->gl.wndSurface->incStrong(NULL); in rsdGLSetSurface()
483 RSD_CALL_GL(eglSwapBuffers, dc->gl.egl.display, dc->gl.egl.surface); in rsdGLSwap()