ScummVM API documentation
shadow_volume_opengl_shader.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22/*
23 * This file is based on WME.
24 * http://dead-code.org/redir.php?target=wme
25 * Copyright (c) 2003-2013 Jan Nedoma and contributors
26 */
27
28#ifndef WINTERMUTE_SHADOW_VOLUME_OPENGL_SHADER_H
29#define WINTERMUTE_SHADOW_VOLUME_OPENGL_SHADER_H
30
31#include "engines/wintermute/base/gfx/3dshadow_volume.h"
32
33#include "graphics/opengl/system_headers.h"
34
35#if defined(USE_OPENGL_SHADERS)
36
37#include "graphics/opengl/shader.h"
38
39namespace Wintermute {
40
41class ShadowVolumeOpenGLShader : public ShadowVolume {
42public:
43 ShadowVolumeOpenGLShader(BaseGame *inGame, OpenGL::Shader *volumeShader, OpenGL::Shader *maskShader);
44 virtual ~ShadowVolumeOpenGLShader();
45
46 bool renderToStencilBuffer() override;
47 bool renderToScene() override;
48
49private:
50 bool render();
51 bool initMask() override;
52 GLuint _shadowVolumeVertexBuffer;
53 GLuint _shadowMaskVertexBuffer;
54 OpenGL::Shader *_volumeShader;
55 OpenGL::Shader *_maskShader;
56};
57
58} // namespace Wintermute
59
60#endif // defined(USE_OPENGL_SHADERS)
61
62#endif
Definition: shader.h:56