Last change
on this file since 2291 was
2183,
checked in by sam, 8 years ago
|
build: fix the WTFPL site URL in all code comments.
|
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | // |
---|
2 | // Lol Engine |
---|
3 | // |
---|
4 | // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net> |
---|
5 | // This program is free software; you can redistribute it and/or |
---|
6 | // modify it under the terms of the Do What The Fuck You Want To |
---|
7 | // Public License, Version 2, as published by Sam Hocevar. See |
---|
8 | // http://www.wtfpl.net/ for more details. |
---|
9 | // |
---|
10 | |
---|
11 | // |
---|
12 | // The Video interface |
---|
13 | // ------------------- |
---|
14 | // Helper GL functions to set up the scene. |
---|
15 | // |
---|
16 | |
---|
17 | #if !defined __LOL_VIDEO_H__ |
---|
18 | #define __LOL_VIDEO_H__ |
---|
19 | |
---|
20 | #include <stdint.h> |
---|
21 | |
---|
22 | namespace lol |
---|
23 | { |
---|
24 | |
---|
25 | struct ClearMask |
---|
26 | { |
---|
27 | enum Value |
---|
28 | { |
---|
29 | /* Note: D3D9 doesn't appear to support the accumulation buffer, |
---|
30 | * and it is a deprecated OpenGL feature. No reason to support it. */ |
---|
31 | Color = 1 << 0, |
---|
32 | Depth = 1 << 1, |
---|
33 | Stencil = 1 << 2, |
---|
34 | |
---|
35 | All = 0xffffffff |
---|
36 | } |
---|
37 | m_value; |
---|
38 | |
---|
39 | inline ClearMask(Value v) : m_value(v) {} |
---|
40 | inline ClearMask(uint64_t i) : m_value((Value)i) {} |
---|
41 | inline operator Value() { return m_value; } |
---|
42 | }; |
---|
43 | |
---|
44 | class Video |
---|
45 | { |
---|
46 | public: |
---|
47 | static void Setup(ivec2 size); |
---|
48 | static void Destroy(); |
---|
49 | static void SetFov(float theta); |
---|
50 | static void SetDepth(bool set); |
---|
51 | static void SetClearColor(vec4 color); |
---|
52 | static void SetClearDepth(float f); |
---|
53 | static void Clear(ClearMask m); |
---|
54 | static void Capture(uint32_t *buffer); |
---|
55 | static ivec2 GetSize(); |
---|
56 | }; |
---|
57 | |
---|
58 | } /* namespace lol */ |
---|
59 | |
---|
60 | #endif // __LOL_VIDEO_H__ |
---|
61 | |
---|
Note: See
TracBrowser
for help on using the repository browser.