diff options
author | Jesse Barker <jesse.barker@linaro.org> | 2012-11-15 15:06:53 -0800 |
---|---|---|
committer | Jesse Barker <jesse.barker@linaro.org> | 2012-11-15 15:06:53 -0800 |
commit | 4e668272c2dac465afce05c3c057c7f9493a5e6c (patch) | |
tree | 27cc2ed1e6f4be521adae039c789e2c5c650d3e8 /src/egl-state.cpp | |
parent | c18cafd62d6d17832c0d15d949251345e239145c (diff) | |
download | glmark2-4e668272c2dac465afce05c3c057c7f9493a5e6c.tar.gz |
EGLState: A few bits of clean up based upon review comments.
- Remove X11-specific native visual type info as it breaks Android build
(and is not likely to be of interest anyway).
- Remove 'info' level EGL info around extensions, vendor, etc. We don't do it
for GLX apart from minimum version requirements (which we don't have for EGL).
- Tweak config initialization to match more closely what was originally in
CanvasX11EGL, in particular, define the config attribs according to the
GLVisualConfig we were given and don't override it.
Diffstat (limited to 'src/egl-state.cpp')
-rw-r--r-- | src/egl-state.cpp | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/src/egl-state.cpp b/src/egl-state.cpp index 293cf5f..40cb837 100644 --- a/src/egl-state.cpp +++ b/src/egl-state.cpp @@ -25,7 +25,6 @@ #include "limits.h" #include <iomanip> #include <sstream> -#include <X11/X.h> // for the Native visual type definitions using std::vector; using std::string; @@ -177,7 +176,7 @@ EglConfig::print_header() { Log::debug("\n"); Log::debug(" cfg buf rgb colorbuffer dp st config native support surface sample\n"); - Log::debug(" id sz lum r g b a th cl caveat render type id type buf ns\n"); + Log::debug(" id sz lum r g b a th cl caveat render visid type buf ns\n"); Log::debug("------------------------------------------------------------------------\n"); } @@ -222,27 +221,7 @@ EglConfig::print() const s << std::setw(7) << caveat; string doNative(nativeRenderable_ ? "true" : "false"); s << std::setw(7) << doNative; - string visType("tc"); - switch (nativeType_) - { - case StaticGray: - case GrayScale: - case StaticColor: - case PseudoColor: - // OpenGL ES doesn't support these, and we do not expect to see - // them in the modern era, but... - visType = string("ci"); - break; - case TrueColor: - case EGL_NONE: - // Initialized to TrueColor - break; - case DirectColor: - visType = string("dc"); - break; - } - s << std::setw(3) << visType; - s << std::setw(5) << std::hex << nativeID_; + s << std::setw(8) << std::hex << nativeID_; s << std::setw(8) << std::hex << surfaceType_; s << std::setw(4) << std::dec << sampleBuffers_; s << std::setw(3) << std::dec << samples_; @@ -292,11 +271,6 @@ EGLState::gotValidDisplay() return false; } - Log::info("Using display %p with EGL version %d.%d\n", egl_display_, egl_major, egl_minor); - Log::info("EGL Version \"%s\"\n", eglQueryString(egl_display_, EGL_VERSION)); - Log::info("EGL Vendor \"%s\"\n", eglQueryString(egl_display_, EGL_VENDOR)); - Log::info("EGL Extensions \"%s\"\n", eglQueryString(egl_display_, EGL_EXTENSIONS)); - #if USE_GLESv2 EGLenum apiType(EGL_OPENGL_ES_API); #elif USE_GL @@ -362,12 +336,11 @@ EGLState::gotValidConfig() return false; const EGLint config_attribs[] = { - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_RED_SIZE, 1, - EGL_GREEN_SIZE, 1, - EGL_BLUE_SIZE, 1, - EGL_ALPHA_SIZE, 1, - EGL_DEPTH_SIZE, 1, + EGL_RED_SIZE, visual_config_.red, + EGL_GREEN_SIZE, visual_config_.green, + EGL_BLUE_SIZE, visual_config_.blue, + EGL_ALPHA_SIZE, visual_config_.alpha, + EGL_DEPTH_SIZE, visual_config_.depth, #if USE_GLESv2 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, #elif USE_GL @@ -401,7 +374,6 @@ EGLState::gotValidConfig() // Select the best matching config egl_config_ = select_best_config(configs); - get_glvisualconfig(egl_config_, visual_config_); vector<EglConfig> configVec; for (vector<EGLConfig>::const_iterator configIt = configs.begin(); |