Преглед на файлове

FIx a few compilation warnings.

legacy
Sam Hocevar преди 5 години
родител
ревизия
3aa4090bd7
променени са 5 файла, в които са добавени 31 реда и са изтрити 24 реда
  1. +11
    -7
      src/easymesh/csgbsp.cpp
  2. +14
    -11
      src/easymesh/easymeshcsg.cpp
  3. +3
    -3
      src/gpu/vertexbuffer.cpp
  4. +2
    -2
      src/lol/gpu/shader.h
  5. +1
    -1
      src/scene.cpp

+ 11
- 7
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 <sam@hocevar.net>
// (c) 2010-2013 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
// 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 <sam@hocevar.net>
// © 2010—2015 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
//
// 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 <lol/engine-internal.h>
@@ -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);


+ 14
- 11
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 <sam@hocevar.net>
// (c) 2009-2015 Cédric Lecacheur <jordx@free.fr>
// (c) 2009-2015 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
// 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 <sam@hocevar.net>
// © 2009—2015 Cédric Lecacheur <jordx@free.fr>
// © 2009—2015 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
//
// 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 <lol/engine-internal.h>
@@ -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)


+ 3
- 3
src/gpu/vertexbuffer.cpp Целия файл

@@ -1,7 +1,7 @@
//
// Lol Engine
//
// Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
//
// 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,


+ 2
- 2
src/lol/gpu/shader.h Целия файл

@@ -1,7 +1,7 @@
//
// Lol Engine
//
// Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
//
// 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;


+ 1
- 1
src/scene.cpp Целия файл

@@ -56,7 +56,7 @@ static array<SceneDisplay*> 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


Зареждане…
Отказ
Запис