source: trunk/src/video.h @ 2370

Last change on this file since 2370 was 2370, checked in by touky, 7 years ago

render : Added DebugRenderMode & corresponding shaders. naive (VERY) implementation in MeshViewer.

  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[100]1//
[221]2// Lol Engine
[100]3//
[221]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
[2183]8//   http://www.wtfpl.net/ for more details.
[221]9//
[18]10
[100]11//
12// The Video interface
13// -------------------
[105]14// Helper GL functions to set up the scene.
[100]15//
[47]16
[748]17#if !defined __LOL_VIDEO_H__
18#define __LOL_VIDEO_H__
[47]19
[150]20#include <stdint.h>
21
[686]22namespace lol
23{
24
[1771]25struct ClearMask
26{
27    enum Value
28    {
[1772]29        /* Note: D3D9 doesn't appear to support the accumulation buffer,
[1788]30         * and it is a deprecated OpenGL feature. No reason to support it. */
[1771]31        Color   = 1 << 0,
32        Depth   = 1 << 1,
[1772]33        Stencil = 1 << 2,
[1771]34
35        All     = 0xffffffff
36    }
37    m_value;
38
[1788]39    inline ClearMask(Value v) : m_value(v) {}
40    inline ClearMask(uint64_t i) : m_value((Value)i) {}
[1771]41    inline operator Value() { return m_value; }
42};
43
[2370]44struct DebugRenderMode
45{
46    enum Value
47    {
48        //Add your new rendermode at your convenience
49        Default,
50        Wireframe,
51        Lighting,
52        Normal,
53        UV,
54
55        Max
56    }
57    m_value;
58
59    inline DebugRenderMode(Value v) : m_value(v) {}
60    inline operator Value() { return m_value; }
61};
62
[18]63class Video
64{
65public:
[863]66    static void Setup(ivec2 size);
[653]67    static void Destroy();
[209]68    static void SetFov(float theta);
[211]69    static void SetDepth(bool set);
[1199]70    static void SetClearColor(vec4 color);
[1771]71    static void SetClearDepth(float f);
[2370]72    static void SetDebugRenderMode(DebugRenderMode d);
73    static DebugRenderMode GetDebugRenderMode();
[1771]74    static void Clear(ClearMask m);
[140]75    static void Capture(uint32_t *buffer);
[863]76    static ivec2 GetSize();
[18]77};
[47]78
[686]79} /* namespace lol */
80
[748]81#endif // __LOL_VIDEO_H__
[47]82
Note: See TracBrowser for help on using the repository browser.