#include "egluConfigFilter.hpp"
#include "egluUtil.hpp"
#include "egluConfigInfo.hpp"
+#include "eglwEnums.hpp"
#include <algorithm>
return getConfigAttribInt(*m_cfg.object.egl, m_cfg.object.display, m_cfg.object.config, attrib);
}
+int CandidateConfig::id (void) const { return get(EGL_CONFIG_ID); }
+int CandidateConfig::redSize (void) const { return get(EGL_RED_SIZE); }
+int CandidateConfig::greenSize (void) const { return get(EGL_GREEN_SIZE); }
+int CandidateConfig::blueSize (void) const { return get(EGL_BLUE_SIZE); }
+int CandidateConfig::alphaSize (void) const { return get(EGL_ALPHA_SIZE); }
+int CandidateConfig::depthSize (void) const { return get(EGL_DEPTH_SIZE); }
+int CandidateConfig::stencilSize (void) const { return get(EGL_STENCIL_SIZE); }
+int CandidateConfig::samples (void) const { return get(EGL_SAMPLES); }
+deUint32 CandidateConfig::renderableType (void) const { return (deUint32)get(EGL_RENDERABLE_TYPE); }
+deUint32 CandidateConfig::surfaceType (void) const { return (deUint32)get(EGL_SURFACE_TYPE); }
+
FilterList& FilterList::operator<< (ConfigFilter filter)
{
m_rules.push_back(filter);
#include "tcuRGBA.hpp"
#include "eglwDefs.hpp"
-#include "eglwEnums.hpp"
#include <vector>
int get (deUint32 attrib) const;
- int id (void) const { return get(EGL_CONFIG_ID); }
- int redSize (void) const { return get(EGL_RED_SIZE); }
- int greenSize (void) const { return get(EGL_GREEN_SIZE); }
- int blueSize (void) const { return get(EGL_BLUE_SIZE); }
- int alphaSize (void) const { return get(EGL_ALPHA_SIZE); }
- int depthSize (void) const { return get(EGL_DEPTH_SIZE); }
- int stencilSize (void) const { return get(EGL_STENCIL_SIZE); }
- int samples (void) const { return get(EGL_SAMPLES); }
-
- deUint32 renderableType (void) const { return (deUint32)get(EGL_RENDERABLE_TYPE); }
- deUint32 surfaceType (void) const { return (deUint32)get(EGL_SURFACE_TYPE); }
+ int id (void) const;
+ int redSize (void) const;
+ int greenSize (void) const;
+ int blueSize (void) const;
+ int alphaSize (void) const;
+ int depthSize (void) const;
+ int stencilSize (void) const;
+ int samples (void) const;
+
+ deUint32 renderableType (void) const;
+ deUint32 surfaceType (void) const;
tcu::RGBA colorBits (void) const { return tcu::RGBA(redSize(), greenSize(), blueSize(), alphaSize()); }
#include "egluUnique.hpp"
#include "eglwLibrary.hpp"
+#include "eglwEnums.hpp"
namespace eglu
{
m_egl.terminate(m_display);
}
+UniqueDisplay::operator bool (void) const
+{
+ return m_display != EGL_NO_DISPLAY;
+}
+
UniqueSurface::UniqueSurface (const Library& egl, EGLDisplay display, EGLSurface surface)
: m_egl (egl)
, m_display (display)
m_egl.destroySurface(m_display, m_surface);
}
+UniqueSurface::operator bool (void) const
+{
+ return m_surface != EGL_NO_SURFACE;
+}
+
UniqueContext::UniqueContext (const Library& egl, EGLDisplay display, EGLContext context)
: m_egl (egl)
, m_display (display)
m_egl.destroyContext(m_display, m_context);
}
+UniqueContext::operator bool (void) const
+{
+ return m_context != EGL_NO_CONTEXT;
+}
+
ScopedCurrentContext::ScopedCurrentContext (const Library& egl, EGLDisplay display, EGLSurface draw, EGLSurface read, EGLContext context)
: m_egl (egl)
, m_display (display)
m_egl.destroyImageKHR(m_display, m_image);
}
+UniqueImage::operator bool (void) const
+{
+ return m_image != EGL_NO_IMAGE;
+}
+
} // eglu
#include "egluDefs.hpp"
#include "eglwDefs.hpp"
-#include "eglwEnums.hpp"
namespace eglw
{
~UniqueDisplay (void);
eglw::EGLDisplay operator* (void) const { return m_display; }
- operator bool (void) const { return m_display != EGL_NO_DISPLAY; }
+ operator bool (void) const;
private:
const eglw::Library& m_egl;
~UniqueSurface (void);
eglw::EGLSurface operator* (void) const { return m_surface; }
- operator bool (void) const { return m_surface != EGL_NO_SURFACE; }
+ operator bool (void) const;
private:
const eglw::Library& m_egl;
~UniqueContext (void);
eglw::EGLContext operator* (void) const { return m_context; }
- operator bool (void) const { return m_context != EGL_NO_CONTEXT; }
+ operator bool (void) const;
private:
const eglw::Library& m_egl;
~UniqueImage (void);
eglw::EGLImage operator* (void) const { return m_image; }
- operator bool (void) const { return m_image != EGL_NO_IMAGE_KHR; }
+ operator bool (void) const;
private:
const eglw::Library& m_egl;
#include "teglTestCase.hpp"
#include "egluCallLogWrapper.hpp"
#include "egluConfigFilter.hpp"
+#include "eglwEnums.hpp"
#include <vector>
#include "teglColorClearTests.hpp"
#include "teglColorClearCase.hpp"
+#include "eglwEnums.hpp"
using std::string;
using std::vector;