~glcompbench-dev/glcompbench/scale

« back to all changes in this revision

Viewing changes to src/composite-canvas-glx.cc

  • Committer: Marc Ordinas i Llopis
  • Date: 2011-12-13 11:42:28 UTC
  • mfrom: (67.1.4 glproxy-flavor)
  • Revision ID: marc.ordinasillopis@linaro.org-20111213114228-gdqkhmxwb4c2kndx
glproxy: Added new flavor that uses glproxy to access the selected
backend.
Options: Added a --backend option to select which backend (glx, egl-gl,
egl-es2) to use. The available values depend on the executable's flavor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Authors:
20
20
 *  Alexandros Frantzis <alexandros.frantzis@linaro.org>
21
21
 *  Jesse Barker <jesse.barker@linaro.org>
 
22
 *  Marc Ordinas i Llopis, Collabora Ltd <marc.ordinasillopis@linaro.org>
22
23
 */
23
24
 
24
25
#include <string>
25
26
#include <sstream>
26
27
 
27
 
#include <GL/gl.h>
 
28
#include "gl-headers.h"
 
29
#ifdef USE_GLPROXY
 
30
#include <GL/glx_proxy.h>
 
31
#include <GL/glxext_proxy.h>
 
32
#else
28
33
#include <GL/glx.h>
 
34
#endif
29
35
 
30
36
#include "composite-canvas-glx.h"
31
37
#include "composite-window-glxpixmap.h"
33
39
#include "options.h"
34
40
#include "log.h"
35
41
 
 
42
#ifdef USE_GLPROXY
 
43
// NOTE: This is necessary because glproxy names these typedefs differently.
 
44
typedef PFNPROXYBINDTEXIMAGEEXTPROC PFNGLXBINDTEXIMAGEEXTPROC;
 
45
typedef PFNPROXYRELEASETEXIMAGEEXTPROC PFNGLXRELEASETEXIMAGEEXTPROC;
 
46
typedef PFNPROXYSWAPINTERVALEXTPROC PFNGLXSWAPINTERVALEXTPROC;
 
47
typedef PFNPROXYSWAPINTERVALMESAPROC PFNGLXSWAPINTERVALMESAPROC;
 
48
#endif
36
49
PFNGLXBINDTEXIMAGEEXTPROC glXBindTexImageEXT_;
37
50
PFNGLXRELEASETEXIMAGEEXTPROC glXReleaseTexImageEXT_;
38
51
PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT_;
39
52
PFNGLXSWAPINTERVALMESAPROC glXSwapIntervalMESA_;
40
53
 
 
54
 
41
55
bool
42
56
CompositeCanvasGLX::check_glx_version()
43
57
{