diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-10 20:56:12 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-10 20:56:12 +0200 |
commit | 0032821864a679d09c252249c74d1bf8deef9baa (patch) | |
tree | 46e6c5b4e1bbcd7d920a6fbd742148b904f8a8bf /src/video_core/renderer_opengl/gl_device.cpp | |
parent | Merge pull request #2345 from ReinUsesLisp/multibind (diff) | |
download | yuzu-0032821864a679d09c252249c74d1bf8deef9baa.tar yuzu-0032821864a679d09c252249c74d1bf8deef9baa.tar.gz yuzu-0032821864a679d09c252249c74d1bf8deef9baa.tar.bz2 yuzu-0032821864a679d09c252249c74d1bf8deef9baa.tar.lz yuzu-0032821864a679d09c252249c74d1bf8deef9baa.tar.xz yuzu-0032821864a679d09c252249c74d1bf8deef9baa.tar.zst yuzu-0032821864a679d09c252249c74d1bf8deef9baa.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp new file mode 100644 index 000000000..b7ca3dca4 --- /dev/null +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -0,0 +1,27 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include <cstddef> +#include <glad/glad.h> + +#include "video_core/renderer_opengl/gl_device.h" + +namespace OpenGL { + +namespace { +template <typename T> +T GetInteger(GLenum pname) { + GLint temporary; + glGetIntegerv(pname, &temporary); + return static_cast<T>(temporary); +} +} // Anonymous namespace + +Device::Device() = default; + +void Device::Initialize() { + uniform_buffer_alignment = GetInteger<std::size_t>(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT); +} + +} // namespace OpenGL |