Etterna 0.74.4
Loading...
Searching...
No Matches
RageDisplay_OGL_Helpers.h
1#ifndef RAGE_DISPLAY_OGL_HELPERS_H
2#define RAGE_DISPLAY_OGL_HELPERS_H
3
4#ifdef _WIN32
5#include <windows.h>
6#endif
7
8#include <GL/glew.h>
9
10/* Import RageDisplay, for types. Do not include RageDisplay_Legacy.h. */
11#include "RageDisplay.h"
12
13/* Windows defines GL_EXT_paletted_texture incompletely: */
14#ifndef GL_TEXTURE_INDEX_SIZE_EXT
15#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16#endif
17
20void
21Init();
22std::string
23GLToString(GLenum e);
24};
25
26class RenderTarget
27{
28 public:
29 virtual ~RenderTarget() = default;
30 virtual void Create(const RenderTargetParam& param,
31 int& iTextureWidthOut,
32 int& iTextureHeightOut) = 0;
33
34 virtual unsigned GetTexture() const = 0;
35
36 /* Render to this RenderTarget. */
37 virtual void StartRenderingTo() = 0;
38
39 /* Stop rendering to this RenderTarget. Update the texture, if necessary,
40 * and make it available. */
41 virtual void FinishRenderingTo() = 0;
42
43 virtual bool InvertY() const { return false; }
44
45 const RenderTargetParam& GetParam() const { return m_Param; }
46
47 protected:
48 RenderTargetParam m_Param;
49};
50
51#endif
Definition RageDisplay_D3D.h:113
Utilities for working with the RageDisplay.
Definition RageDisplay_OGL_Helpers.h:19
Definition RageDisplay.h:244