From a1f6eff297a3e4870e22fdae926648bda3466805 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 6 Aug 2009 16:25:37 -0700 Subject: update most gl tests to use EGLUtils --- opengl/tests/fillrate/fillrate.cpp | 42 ++++++++++---------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) (limited to 'opengl/tests/fillrate') diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp index 108a87c..4ffbc8b 100644 --- a/opengl/tests/fillrate/fillrate.cpp +++ b/opengl/tests/fillrate/fillrate.cpp @@ -26,6 +26,7 @@ #include #include +#include using namespace android; @@ -36,48 +37,27 @@ int main(int argc, char** argv) EGL_NONE }; - EGLint numConfigs = -1, n=0; EGLint majorVersion; EGLint minorVersion; - EGLConfig config; EGLContext context; + EGLConfig config; EGLSurface surface; EGLint w, h; - EGLDisplay dpy; dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); eglInitialize(dpy, &majorVersion, &minorVersion); + + EGLNativeWindowType window = android_createDisplaySurface(); - // Get all the "potential match" configs... - eglGetConfigs(dpy, NULL, 0, &numConfigs); - EGLConfig* const configs = (EGLConfig*)malloc(sizeof(EGLConfig)*numConfigs); - eglChooseConfig(dpy, configAttribs, configs, numConfigs, &n); - config = configs[0]; - if (n > 1) { - // if there is more than one candidate, go through the list - // and pick one that matches our framebuffer format - int fbSzA = 0; // should not hardcode - int fbSzR = 5; // should not hardcode - int fbSzG = 6; // should not hardcode - int fbSzB = 5; // should not hardcode - int i; - for (i=0 ; i