diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-30 14:15:35 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-09-03 20:09:51 +0200 |
commit | 466e608c19c5bd70392bd4f4049fc7ba9963a14c (patch) | |
tree | e08a8ca19c935f4b2513151e0f280a29940f6d24 /src/video_core/renderer_opengl/pica_to_gl.h | |
parent | OpenGL: Add support for Sampler Objects to state tracker (diff) | |
download | yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.tar yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.tar.gz yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.tar.bz2 yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.tar.lz yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.tar.xz yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.tar.zst yuzu-466e608c19c5bd70392bd4f4049fc7ba9963a14c.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/pica_to_gl.h')
-rw-r--r-- | src/video_core/renderer_opengl/pica_to_gl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/pica_to_gl.h b/src/video_core/renderer_opengl/pica_to_gl.h index 6344f467f..04c1d1a34 100644 --- a/src/video_core/renderer_opengl/pica_to_gl.h +++ b/src/video_core/renderer_opengl/pica_to_gl.h @@ -175,11 +175,11 @@ inline GLenum StencilOp(Pica::Regs::StencilAction action) { return stencil_op_table[(unsigned)action]; } -inline std::array<GLfloat, 4> ColorRGBA8(const u8* bytes) { - return { { bytes[0] / 255.0f, - bytes[1] / 255.0f, - bytes[2] / 255.0f, - bytes[3] / 255.0f +inline std::array<GLfloat, 4> ColorRGBA8(const u32 color) { + return { { (color >> 0 & 0xFF) / 255.0f, + (color >> 8 & 0xFF) / 255.0f, + (color >> 16 & 0xFF) / 255.0f, + (color >> 24 & 0xFF) / 255.0f } }; } |