diff --git a/src/easymesh/csgbsp.cpp b/src/easymesh/csgbsp.cpp index 58d7b25c..18582979 100644 --- a/src/easymesh/csgbsp.cpp +++ b/src/easymesh/csgbsp.cpp @@ -1,12 +1,14 @@ // -// EasyMesh-Csg: The code belonging to CSG operations +// EasyMesh-Csg: The code belonging to CSG operations // -// Copyright: (c) 2010-2013 Sam Hocevar -// (c) 2010-2013 Benjamin "Touky" Huet -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. +// Copyright © 2010—2019 Sam Hocevar +// © 2010—2015 Benjamin "Touky" Huet +// +// Lol Engine is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #include @@ -507,7 +509,9 @@ int CsgBsp::TestTriangleToTree(vec3 const &tri_p0, vec3 const &tri_p1, vec3 cons int k = 0; if (res_nb[LEAF_BACK] && res_nb[LEAF_FRONT]) { +#if 0 res_total = res_total; +#endif tri_list[i].m1 = LEAF_BACK; #if 0 tri_to_process.push( array< int >(), tri_list[i].m2, tri_list[i].m3, tri_list[i].m4, 0); diff --git a/src/easymesh/easymeshcsg.cpp b/src/easymesh/easymeshcsg.cpp index 83ed1ee6..3560b0a2 100644 --- a/src/easymesh/easymeshcsg.cpp +++ b/src/easymesh/easymeshcsg.cpp @@ -1,13 +1,15 @@ // -// EasyMesh-Csg: The code belonging to CSG operations +// EasyMesh-Csg: The code belonging to CSG operations // -// Copyright: (c) 2010-2015 Sam Hocevar -// (c) 2009-2015 Cédric Lecacheur -// (c) 2009-2015 Benjamin "Touky" Huet -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. +// Copyright © 2010—2019 Sam Hocevar +// © 2009—2015 Cédric Lecacheur +// © 2009—2015 Benjamin "Touky" Huet +// +// Lol Engine is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #include @@ -179,9 +181,10 @@ void EasyMesh::MeshCsg(CSGUsage csg_operation) } } - for (int i = 0; i < m_vert.count(); i++) - if (length(m_vert[i].m_normal) < 1.0f) - i = i; +// FIXME: what was this code for? +// for (int i = 0; i < m_vert.count(); i++) +// if (length(m_vert[i].m_normal) < 1.0f) +// i = i; int dir = 1; for (int i = 0; i >= 0 && i < triangle_to_kill.count() - 1; i += dir) diff --git a/src/gpu/vertexbuffer.cpp b/src/gpu/vertexbuffer.cpp index 199fd4a6..6c2ee836 100644 --- a/src/gpu/vertexbuffer.cpp +++ b/src/gpu/vertexbuffer.cpp @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2017 Sam Hocevar +// Copyright © 2010—2019 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -253,7 +253,7 @@ void VertexDeclaration::SetStream(VertexBuffer *vb, ShaderAttrib attribs[]) || tlut[type_index].type == GL_DOUBLE || tlut[type_index].type == GL_BYTE || tlut[type_index].type == GL_UNSIGNED_BYTE -#if defined LOL_USE_GLEW && !defined __APPLE__ +#if defined LOL_USE_GLEW && defined glVertexAttribIPointer && !defined __APPLE__ /* If this is not available, don't use it */ || !glVertexAttribIPointer #endif @@ -267,7 +267,7 @@ void VertexDeclaration::SetStream(VertexBuffer *vb, ShaderAttrib attribs[]) tlut[type_index].type, normalize, stride, (GLvoid const *)(uintptr_t)offset); } -#if defined GL_VERSION_3_0 +#if defined GL_VERSION_3_0 && !(defined LOL_USE_GLEW && !defined glVertexAttribIPointer) else { glVertexAttribIPointer((GLint)reg, tlut[type_index].size, diff --git a/src/lol/gpu/shader.h b/src/lol/gpu/shader.h index 67e58585..1fc6b1b0 100644 --- a/src/lol/gpu/shader.h +++ b/src/lol/gpu/shader.h @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2018 Sam Hocevar +// Copyright © 2010—2019 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -274,7 +274,7 @@ struct ShaderUniform public: inline ShaderUniform() : flags(0) {} -private: +protected: uintptr_t frag, vert; /* FIXME: do we really need this to indicate which locations are valid? */ uint32_t flags; diff --git a/src/scene.cpp b/src/scene.cpp index 20599152..af80215f 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -56,7 +56,7 @@ static array m_scene_displays; static inline void gpu_marker(char const *message) { -#if LOL_USE_GLEW +#if LOL_USE_GLEW && defined glStringMarkerGREMEDY if (GLEW_GREMEDY_string_marker) glStringMarkerGREMEDY(0, message); #else