~compiz-team/compiz/0.9.12

« back to all changes in this revision

Viewing changes to plugins/opengl/src/privatetexture.h

  • Committer: Sam Spilsbury
  • Date: 2012-08-22 10:07:45 UTC
  • mfrom: (3201.2.177 gles2)
  • mto: (3248.1.29 compiz)
  • mto: This revision was merged to the branch mainline in revision 3451.
  • Revision ID: sam.spilsbury@canonical.com-20120822100745-j5bofdehkq79wcvq
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright © 2008 Dennis Kasprzyk
3
3
 * Copyright © 2007 Novell, Inc.
 
4
 * Copyright © 2011 Linaro Ltd.
4
5
 *
5
6
 * Permission to use, copy, modify, distribute, and sell this software
6
7
 * and its documentation for any purpose is hereby granted without
23
24
 *
24
25
 * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
25
26
 *          David Reveman <davidr@novell.com>
 
27
 *          Travis Watkins <travis.watkins@linaro.org>
26
28
 */
27
29
 
28
30
#ifndef _PRIVATETEXTURE_H
29
31
#define _PRIVATETEXTURE_H
30
32
 
 
33
#ifdef USE_GLES
 
34
#define SUPPORT_X11
 
35
#include <GLES2/gl2.h>
 
36
#include <EGL/egl.h>
 
37
#include <EGL/eglext.h>
 
38
#else
31
39
#include <GL/gl.h>
32
40
#include <GL/glx.h>
 
41
#endif
33
42
#include <opengl/texture.h>
34
43
#include <X11/extensions/Xdamage.h>
35
44
 
62
71
        int               refCount;
63
72
};
64
73
 
 
74
#ifdef USE_GLES
 
75
class EglTexture : public GLTexture {
 
76
    public:
 
77
        EglTexture ();
 
78
        ~EglTexture ();
 
79
 
 
80
        void enable (Filter filter);
 
81
 
 
82
        static List bindPixmapToTexture (Pixmap pixmap,
 
83
                                         int width,
 
84
                                         int height,
 
85
                                         int depth);
 
86
 
 
87
    public:
 
88
        bool        damaged;
 
89
        Damage      damage;
 
90
        bool        updateMipMap;
 
91
};
 
92
 
 
93
extern std::map<Damage, EglTexture*> boundPixmapTex;
 
94
#else
 
95
 
65
96
class TfpTexture : public GLTexture {
66
97
    public:
67
98
        TfpTexture ();
84
115
};
85
116
 
86
117
extern std::map<Damage, TfpTexture*> boundPixmapTex;
 
118
#endif
87
119
 
88
120
#endif