23 #include "common/config.h"
25 #include "common/make_unique.h"
40 enum FramebufferSupport
47 FramebufferSupport DetectFramebufferSupport();
50 std::unique_ptr<CDevice>
CreateDevice(
const DeviceConfig &config,
const std::string& name);
59 CompFunc TranslateGLCompFunc(GLenum flag);
61 GLenum TranslateGfxCompFunc(
CompFunc func);
63 BlendFunc TranslateGLBlendFunc(GLenum flag);
65 GLenum TranslateGfxBlendFunc(
BlendFunc func);
69 GLenum TranslateTextureCoordinate(
int index);
71 GLenum TranslateTextureCoordinateGen(
int index);
73 GLint LoadShader(GLint type,
const char* filename);
75 GLint LinkProgram(
int count, GLint shaders[]);
81 : m_pixels(MakeUniqueArray<GLubyte>(size))
84 void* GetPixelsData()
override
86 return static_cast<void*
>(m_pixels.get());
90 std::unique_ptr<GLubyte[]> m_pixels;
93 std::unique_ptr<CGLFrameBufferPixels> GetGLFrameBufferPixels(
Math::IntPoint size);
std::unique_ptr< CDevice > CreateDevice(const DeviceConfig &config, const std::string &name)
Creates OpenGL device.
Definition: glutil.cpp:47
CompFunc
Type of function used to compare values.
Definition: device.h:128
BlendFunc
Type of blending function.
Definition: device.h:144
GLenum TranslateGfxPrimitive(PrimitiveType type)
Translate Gfx primitive type to OpenGL primitive type.
Definition: glutil.cpp:76
PrimitiveType
Type of primitive to render.
Definition: device.h:210
Namespace for (new) graphics code.
Definition: app.h:49
int GetOpenGLVersion()
Returns OpenGL version as one number.
Definition: glutil.cpp:66
3D (3x1) vector
Definition: vector.h:53
Abstract graphics device - CDevice class and related structs/enums.
2D Point with integer coords
Definition: intpoint.h:39