~mc-return/compiz/compiz.merge-src-screen.cpp-improvements

« back to all changes in this revision

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

  • Committer: Dennis kasprzyk
  • Author(s): Dennis Kasprzyk
  • Date: 2009-03-15 05:09:18 UTC
  • Revision ID: git-v1:163f6b6f3c3b7764987cbdf8e03cc355edeaa499
New generalized build system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2008 Dennis Kasprzyk
 
3
 * Copyright © 2007 Novell, Inc.
 
4
 *
 
5
 * Permission to use, copy, modify, distribute, and sell this software
 
6
 * and its documentation for any purpose is hereby granted without
 
7
 * fee, provided that the above copyright notice appear in all copies
 
8
 * and that both that copyright notice and this permission notice
 
9
 * appear in supporting documentation, and that the name of
 
10
 * Dennis Kasprzyk not be used in advertising or publicity pertaining to
 
11
 * distribution of the software without specific, written prior permission.
 
12
 * Dennis Kasprzyk makes no representations about the suitability of this
 
13
 * software for any purpose. It is provided "as is" without express or
 
14
 * implied warranty.
 
15
 *
 
16
 * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
17
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
 
18
 * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
19
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
 
20
 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 
21
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 
22
 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
23
 *
 
24
 * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
 
25
 *          David Reveman <davidr@novell.com>
 
26
 */
 
27
 
 
28
#ifndef _PRIVATETEXTURE_H
 
29
#define _PRIVATETEXTURE_H
 
30
 
 
31
#include <map>
 
32
 
 
33
#include <GL/gl.h>
 
34
#include <GL/glx.h>
 
35
#include <opengl/texture.h>
 
36
 
 
37
class GLScreen;
 
38
class GLDisplay;
 
39
 
 
40
class PrivateTexture {
 
41
    public:
 
42
        PrivateTexture (GLTexture *);
 
43
        ~PrivateTexture ();
 
44
 
 
45
        static GLTexture::List loadImageData (const char   *image,
 
46
                                              unsigned int width,
 
47
                                              unsigned int height,
 
48
                                              GLenum       format,
 
49
                                              GLenum       type);
 
50
 
 
51
    public:
 
52
        GLTexture         *texture;
 
53
        GLuint            name;
 
54
        GLenum            target;
 
55
        GLenum            filter;
 
56
        GLenum            wrap;
 
57
        GLTexture::Matrix matrix;
 
58
        bool              mipmap;
 
59
        bool              mipmapSupport;
 
60
        bool              initial;
 
61
        int               refCount;
 
62
};
 
63
 
 
64
class TfpTexture : public GLTexture {
 
65
    public:
 
66
        TfpTexture ();
 
67
        ~TfpTexture ();
 
68
 
 
69
        void enable (Filter filter);
 
70
 
 
71
        static List bindPixmapToTexture (Pixmap pixmap,
 
72
                                         int width,
 
73
                                         int height,
 
74
                                         int depth);
 
75
 
 
76
    public:
 
77
        GLXPixmap pixmap;
 
78
        bool      damaged;
 
79
        Damage    damage;
 
80
};
 
81
 
 
82
extern std::map<Damage, TfpTexture*> boundPixmapTex;
 
83
 
 
84
#endif