-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext-opengl.h
More file actions
76 lines (60 loc) · 1.67 KB
/
context-opengl.h
File metadata and controls
76 lines (60 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* context-opengl.h
*
* Copyright 2011 Novell, Inc. (http://www.novell.com)
*
* See the LICENSE file included with the distribution for details.
*
*/
#ifndef __MOON_CONTEXT_OPENGL_H__
#define __MOON_CONTEXT_OPENGL_H__
#include "context-gl.h"
#include "surface-opengl.h"
namespace Moonlight {
class MOON_API OpenGLContext : public GLContext {
public:
OpenGLContext (OpenGLSurface *surface);
virtual ~OpenGLContext ();
bool Initialize ();
void Push (Group extents);
cairo_t *Push (Cairo extents);
Rect Pop (MoonSurface **ref);
virtual void Blit (unsigned char *data,
int stride);
virtual void BlitYV12 (unsigned char *data[],
int stride[]);
virtual void Paint (Color *color);
virtual void Paint (MoonSurface *src,
double alpha,
double x,
double y);
virtual void Project (MoonSurface *src,
const double *matrix,
double alpha,
double x,
double y);
virtual void Flush ();
protected:
void SetupVertexData (double x,
double y,
double width,
double height);
void SetupVertexData (const double *matrix,
double x,
double y,
double width,
double height);
void SetupTexCoordData (const double *matrix,
double du,
double dv);
void SetupTexUnit (GLenum target, GLint texture);
void SetFramebuffer ();
void SetScissor ();
gboolean HasDrawable ();
void SyncDrawable ();
Rect GroupBounds (Group extents);
GLint maxTextureSize;
};
};
#endif /* __MOON_CONTEXT_OPENGL_H__ */