From 34692ab826abc8f8faa61bdb2280b742424528f1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 7 Dec 2013 15:14:29 -0500 Subject: Remove unnecessary Src/ folders --- .../Core/VideoBackends/OGL/NativeVertexFormat.cpp | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp new file mode 100644 index 0000000000..c0112c4e9e --- /dev/null +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -0,0 +1,99 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include "GLUtil.h" +#include "x64Emitter.h" +#include "x64ABI.h" +#include "MemoryUtil.h" +#include "ProgramShaderCache.h" +#include "VertexShaderGen.h" + +#include "CPMemory.h" +#include "NativeVertexFormat.h" +#include "VertexManager.h" + +// Here's some global state. We only use this to keep track of what we've sent to the OpenGL state +// machine. + +namespace OGL +{ + +NativeVertexFormat* VertexManager::CreateNativeVertexFormat() +{ + return new GLVertexFormat(); +} + +GLVertexFormat::GLVertexFormat() +{ + +} + +GLVertexFormat::~GLVertexFormat() +{ + glDeleteVertexArrays(1, &VAO); +} + +inline GLuint VarToGL(VarType t) +{ + static const GLuint lookup[5] = { + GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_FLOAT + }; + return lookup[t]; +} + +void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) +{ + this->vtx_decl = _vtx_decl; + vertex_stride = vtx_decl.stride; + + // We will not allow vertex components causing uneven strides. + if (vertex_stride & 3) + PanicAlert("Uneven vertex stride: %i", vertex_stride); + + VertexManager *vm = (OGL::VertexManager*)g_vertex_manager; + + glGenVertexArrays(1, &VAO); + glBindVertexArray(VAO); + + // the element buffer is bound directly to the vao, so we must it set for every vao + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vm->m_index_buffers); + glBindBuffer(GL_ARRAY_BUFFER, vm->m_vertex_buffers); + + glEnableVertexAttribArray(SHADER_POSITION_ATTRIB); + glVertexAttribPointer(SHADER_POSITION_ATTRIB, 3, GL_FLOAT, GL_FALSE, vtx_decl.stride, (u8*)NULL); + + for (int i = 0; i < 3; i++) { + if (vtx_decl.num_normals > i) { + glEnableVertexAttribArray(SHADER_NORM0_ATTRIB+i); + glVertexAttribPointer(SHADER_NORM0_ATTRIB+i, vtx_decl.normal_gl_size, VarToGL(vtx_decl.normal_gl_type), GL_TRUE, vtx_decl.stride, (u8*)NULL + vtx_decl.normal_offset[i]); + } + } + + for (int i = 0; i < 2; i++) { + if (vtx_decl.color_offset[i] != -1) { + glEnableVertexAttribArray(SHADER_COLOR0_ATTRIB+i); + glVertexAttribPointer(SHADER_COLOR0_ATTRIB+i, 4, GL_UNSIGNED_BYTE, GL_TRUE, vtx_decl.stride, (u8*)NULL + vtx_decl.color_offset[i]); + } + } + + for (int i = 0; i < 8; i++) { + if (vtx_decl.texcoord_offset[i] != -1) { + glEnableVertexAttribArray(SHADER_TEXTURE0_ATTRIB+i); + glVertexAttribPointer(SHADER_TEXTURE0_ATTRIB+i, vtx_decl.texcoord_size[i], VarToGL(vtx_decl.texcoord_gl_type[i]), + GL_FALSE, vtx_decl.stride, (u8*)NULL + vtx_decl.texcoord_offset[i]); + } + } + + if (vtx_decl.posmtx_offset != -1) { + glEnableVertexAttribArray(SHADER_POSMTX_ATTRIB); + glVertexAttribPointer(SHADER_POSMTX_ATTRIB, 4, GL_UNSIGNED_BYTE, GL_FALSE, vtx_decl.stride, (u8*)NULL + vtx_decl.posmtx_offset); + } + + vm->m_last_vao = VAO; +} + +void GLVertexFormat::SetupVertexPointers() { +} + +} -- cgit v1.2.3 From 02d1d8e6a04f0536b6dff014e1223605f8b661ac Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Jan 2014 14:18:55 +0100 Subject: NativeVertexFormat: swap unsigned / signed formats to match GX order --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index c0112c4e9e..b23836ac90 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -37,7 +37,7 @@ GLVertexFormat::~GLVertexFormat() inline GLuint VarToGL(VarType t) { static const GLuint lookup[5] = { - GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_FLOAT + GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_FLOAT }; return lookup[t]; } -- cgit v1.2.3 From 210f4f3e559696afea64244c29994aed9685d483 Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Jan 2014 14:46:05 +0100 Subject: PortableVertexFormat: add a struct which hold all needed information for every vertex and use this for position atm, position attribute is hardcoded both in VertexLoader and in backends. v2: fix coding style + cleanup lookup table --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index b23836ac90..49098b24b4 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -42,6 +42,18 @@ inline GLuint VarToGL(VarType t) return lookup[t]; } +static void SetPointer(u32 attrib, u32 stride, const AttributeFormat &format) +{ + if (!format.enable) + return; + + glEnableVertexAttribArray(attrib); + if (format.integer) + glVertexAttribIPointer(attrib, format.components, VarToGL(format.type), stride, (u8*)NULL + format.offset); + else + glVertexAttribPointer(attrib, format.components, VarToGL(format.type), true, stride, (u8*)NULL + format.offset); +} + void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) { this->vtx_decl = _vtx_decl; @@ -60,8 +72,7 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vm->m_index_buffers); glBindBuffer(GL_ARRAY_BUFFER, vm->m_vertex_buffers); - glEnableVertexAttribArray(SHADER_POSITION_ATTRIB); - glVertexAttribPointer(SHADER_POSITION_ATTRIB, 3, GL_FLOAT, GL_FALSE, vtx_decl.stride, (u8*)NULL); + SetPointer(SHADER_POSITION_ATTRIB, vertex_stride, vtx_decl.position); for (int i = 0; i < 3; i++) { if (vtx_decl.num_normals > i) { -- cgit v1.2.3 From b38ef39ab7b88eb7e4fa253deec64cecb72508aa Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Jan 2014 15:16:52 +0100 Subject: PortableVertexFormat: use AttributeFormat for normal attribute format --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 49098b24b4..88147aa755 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -75,10 +75,7 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) SetPointer(SHADER_POSITION_ATTRIB, vertex_stride, vtx_decl.position); for (int i = 0; i < 3; i++) { - if (vtx_decl.num_normals > i) { - glEnableVertexAttribArray(SHADER_NORM0_ATTRIB+i); - glVertexAttribPointer(SHADER_NORM0_ATTRIB+i, vtx_decl.normal_gl_size, VarToGL(vtx_decl.normal_gl_type), GL_TRUE, vtx_decl.stride, (u8*)NULL + vtx_decl.normal_offset[i]); - } + SetPointer(SHADER_NORM0_ATTRIB+i, vertex_stride, vtx_decl.normals[i]); } for (int i = 0; i < 2; i++) { -- cgit v1.2.3 From ef2d6e7d530c2f61360d370f3b98bba7989ada6e Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Jan 2014 15:23:50 +0100 Subject: PortableVertexFormat: use AttributeFormat for color attribute format --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 88147aa755..784191c1d2 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -79,10 +79,7 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) } for (int i = 0; i < 2; i++) { - if (vtx_decl.color_offset[i] != -1) { - glEnableVertexAttribArray(SHADER_COLOR0_ATTRIB+i); - glVertexAttribPointer(SHADER_COLOR0_ATTRIB+i, 4, GL_UNSIGNED_BYTE, GL_TRUE, vtx_decl.stride, (u8*)NULL + vtx_decl.color_offset[i]); - } + SetPointer(SHADER_COLOR0_ATTRIB+i, vertex_stride, vtx_decl.colors[i]); } for (int i = 0; i < 8; i++) { -- cgit v1.2.3 From 6c59b691b0247f4a56ff17d7cf134364b258a6c5 Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Jan 2014 15:32:27 +0100 Subject: PortableVertexFormat: use AttributeFormat for texcoord attribute format --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 784191c1d2..97b0b7a7a2 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -83,11 +83,7 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) } for (int i = 0; i < 8; i++) { - if (vtx_decl.texcoord_offset[i] != -1) { - glEnableVertexAttribArray(SHADER_TEXTURE0_ATTRIB+i); - glVertexAttribPointer(SHADER_TEXTURE0_ATTRIB+i, vtx_decl.texcoord_size[i], VarToGL(vtx_decl.texcoord_gl_type[i]), - GL_FALSE, vtx_decl.stride, (u8*)NULL + vtx_decl.texcoord_offset[i]); - } + SetPointer(SHADER_TEXTURE0_ATTRIB+i, vertex_stride, vtx_decl.texcoords[i]); } if (vtx_decl.posmtx_offset != -1) { -- cgit v1.2.3 From a65162f1cd345b8f206fd01e19ac261d09ac291b Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Jan 2014 15:41:08 +0100 Subject: PortableVertexFormat: use AttributeFormat for posmtx attribute format --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 97b0b7a7a2..4f3f2ad0d7 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -86,10 +86,7 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) SetPointer(SHADER_TEXTURE0_ATTRIB+i, vertex_stride, vtx_decl.texcoords[i]); } - if (vtx_decl.posmtx_offset != -1) { - glEnableVertexAttribArray(SHADER_POSMTX_ATTRIB); - glVertexAttribPointer(SHADER_POSMTX_ATTRIB, 4, GL_UNSIGNED_BYTE, GL_FALSE, vtx_decl.stride, (u8*)NULL + vtx_decl.posmtx_offset); - } + SetPointer(SHADER_POSMTX_ATTRIB, vertex_stride, vtx_decl.posmtx); vm->m_last_vao = VAO; } -- cgit v1.2.3 From 2afe2152712981e21d6bda6f029292ed2b1cf91e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Feb 2014 05:18:15 -0500 Subject: Convert all includes to relative paths. --- .../Core/VideoBackends/OGL/NativeVertexFormat.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 4f3f2ad0d7..6b6a46bbf3 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -2,16 +2,17 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include "GLUtil.h" -#include "x64Emitter.h" -#include "x64ABI.h" -#include "MemoryUtil.h" -#include "ProgramShaderCache.h" -#include "VertexShaderGen.h" - -#include "CPMemory.h" -#include "NativeVertexFormat.h" -#include "VertexManager.h" +#include "Common/x64ABI.h" +#include "Common/x64Emitter.h" +#include "Common/MemoryUtil.h" + +#include "VideoBackends/OGL/GLUtil.h" +#include "VideoBackends/OGL/ProgramShaderCache.h" +#include "VideoBackends/OGL/VertexManager.h" + +#include "VideoCommon/CPMemory.h" +#include "VideoCommon/NativeVertexFormat.h" +#include "VideoCommon/VertexShaderGen.h" // Here's some global state. We only use this to keep track of what we've sent to the OpenGL state // machine. -- cgit v1.2.3 From 425f9dcd5155614e66fab635819ef12ee390dc7b Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 19 Feb 2014 12:14:09 +0100 Subject: Fix more header sorting issues in VideoBackends/ (now check-includes clean). --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 6b6a46bbf3..dad409e47a 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -2,9 +2,9 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include "Common/MemoryUtil.h" #include "Common/x64ABI.h" #include "Common/x64Emitter.h" -#include "Common/MemoryUtil.h" #include "VideoBackends/OGL/GLUtil.h" #include "VideoBackends/OGL/ProgramShaderCache.h" -- cgit v1.2.3 From d802d392811be44d34ae9cd23f616db93e54c50f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 9 Mar 2014 21:14:26 +0100 Subject: clang-modernize -use-nullptr and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index dad409e47a..dd1ffc2dfd 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -50,9 +50,9 @@ static void SetPointer(u32 attrib, u32 stride, const AttributeFormat &format) glEnableVertexAttribArray(attrib); if (format.integer) - glVertexAttribIPointer(attrib, format.components, VarToGL(format.type), stride, (u8*)NULL + format.offset); + glVertexAttribIPointer(attrib, format.components, VarToGL(format.type), stride, (u8*)nullptr + format.offset); else - glVertexAttribPointer(attrib, format.components, VarToGL(format.type), true, stride, (u8*)NULL + format.offset); + glVertexAttribPointer(attrib, format.components, VarToGL(format.type), true, stride, (u8*)nullptr + format.offset); } void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) -- cgit v1.2.3 From 960b54670ca3c2625eaaaee725e093b3f03251c5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 15 Aug 2014 14:09:53 -0400 Subject: OGL: Fix brace and body placements Also got rid of void argument specifiers. These are a carryover from C. --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index dd1ffc2dfd..fab1626554 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -75,24 +75,22 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) SetPointer(SHADER_POSITION_ATTRIB, vertex_stride, vtx_decl.position); - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 3; i++) SetPointer(SHADER_NORM0_ATTRIB+i, vertex_stride, vtx_decl.normals[i]); - } - for (int i = 0; i < 2; i++) { + for (int i = 0; i < 2; i++) SetPointer(SHADER_COLOR0_ATTRIB+i, vertex_stride, vtx_decl.colors[i]); - } - for (int i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) SetPointer(SHADER_TEXTURE0_ATTRIB+i, vertex_stride, vtx_decl.texcoords[i]); - } SetPointer(SHADER_POSMTX_ATTRIB, vertex_stride, vtx_decl.posmtx); vm->m_last_vao = VAO; } -void GLVertexFormat::SetupVertexPointers() { +void GLVertexFormat::SetupVertexPointers() +{ } } -- cgit v1.2.3 From 7e3d1050f0f25f659dded00a9df787195b47e7b5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 15 Aug 2014 14:16:04 -0400 Subject: OGL: Add static to a function in NativeVertexFormat --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index fab1626554..4207a5a4af 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -35,7 +35,7 @@ GLVertexFormat::~GLVertexFormat() glDeleteVertexArrays(1, &VAO); } -inline GLuint VarToGL(VarType t) +static inline GLuint VarToGL(VarType t) { static const GLuint lookup[5] = { GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_FLOAT -- cgit v1.2.3 From 5510c86b8133ec734ba490b700d4f432d98f71a7 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sat, 24 Jan 2015 03:15:09 +1300 Subject: Move Zfreeze code out individual backends into videoCommon Also: * Implement support for per-vertex PosMatrixIndex * Only update zslope constant once when zfreeze is activated. * Added a bunch of comments. --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 4207a5a4af..8b1e4ded24 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -58,7 +58,7 @@ static void SetPointer(u32 attrib, u32 stride, const AttributeFormat &format) void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) { this->vtx_decl = _vtx_decl; - vertex_stride = vtx_decl.stride; + u32 vertex_stride = _vtx_decl.stride; // We will not allow vertex components causing uneven strides. if (vertex_stride & 3) -- cgit v1.2.3 From cefcb0ace9d363b3679b4e93bcc9ec05f1e5f4f8 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 18 May 2015 01:08:10 +0200 Subject: Update license headers to GPLv2+ --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 8b1e4ded24..b35ea4a948 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -1,5 +1,5 @@ // Copyright 2013 Dolphin Emulator Project -// Licensed under GPLv2 +// Licensed under GPLv2+ // Refer to the license.txt file included. #include "Common/MemoryUtil.h" -- cgit v1.2.3 From 30ebb2459eb97ba544547183854775df8460b475 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 24 May 2015 06:55:12 +0200 Subject: Set copyright year to when a file was created --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index b35ea4a948..de0eb4f10d 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -1,4 +1,4 @@ -// Copyright 2013 Dolphin Emulator Project +// Copyright 2008 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. -- cgit v1.2.3