/* * Copyright (C) 2010 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * DongKyun Yun * SangJin Kim * HyunGoo Kang * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Contributors: * - S-Core Co., Ltd * */ #include "implement.h" const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) { struct DisplayExtra* pDisplay; static char buf[256]; pDisplay = EGLINTER(LookUpDisplay)(dpy); if (pDisplay == NULL) { EGLINTER(SetError)(EGL_BAD_DISPLAY); return NULL; } if (pDisplay->bInitialized == EGL_FALSE) { EGLINTER(SetError)(EGL_NOT_INITIALIZED); return NULL; } switch (name) { case EGL_CLIENT_APIS: #if defined(PROVIDING_RUNTIME_BINDING) return "OpenGL_ES OpenGL"; #else return "OpenGL_ES"; #endif break; case EGL_VENDOR: #if defined(PROVIDING_RUNTIME_BINDING) return HAZEL_EGL_VENDOR " dynamic (compiled on " __DATE__ " " __TIME__ ")"; #else return HAZEL_EGL_VENDOR "(compiled on " __DATE__ " " __TIME__ ")"; #endif break; case EGL_VERSION: sprintf(buf, "%d.%d (on GLX %s %s)", HAZEL_EGL_MAJOR, HAZEL_EGL_MINOR, FNPTR(GetClientString)(pDisplay->native, GLX_VENDOR), FNPTR(GetClientString)(pDisplay->native, GLX_VERSION)); return buf; break; case EGL_EXTENSIONS: return "EGL_KHR_image"; break; default: EGLINTER(SetError)(EGL_BAD_PARAMETER); return NULL; } }