From cda981b8e3d45f32fd88324083039cf7fec2d33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 7 Feb 2019 18:04:28 -0800 Subject: [PATCH] Cleanup. --- examples/02-metaballs/metaballs.cpp | 5 +++-- examples/23-vectordisplay/vectordisplay.cpp | 12 ++++++------ examples/23-vectordisplay/vectordisplay.h | 8 +------- examples/38-bloom/bloom.cpp | 4 +++- src/glcontext_wgl.cpp | 2 +- src/shader_dxbc.cpp | 4 ++-- tools/geometryc/geometryc.cpp | 8 ++++++-- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/examples/02-metaballs/metaballs.cpp b/examples/02-metaballs/metaballs.cpp index 88214d76b..b5215e681 100644 --- a/examples/02-metaballs/metaballs.cpp +++ b/examples/02-metaballs/metaballs.cpp @@ -59,8 +59,9 @@ struct Grid float m_normal[3]; }; -// Triangulation tables taken from: -// http://paulbourke.net/geometry/polygonise/ +// Reference(s): +// - Polygonising a scalar field +// https://web.archive.org/web/20181127124338/http://paulbourke.net/geometry/polygonise/ static const uint16_t s_edges[256] = { diff --git a/examples/23-vectordisplay/vectordisplay.cpp b/examples/23-vectordisplay/vectordisplay.cpp index df1795a8a..38eb61ad2 100644 --- a/examples/23-vectordisplay/vectordisplay.cpp +++ b/examples/23-vectordisplay/vectordisplay.cpp @@ -1,14 +1,14 @@ /* * Copyright 2014 Kai Jourdan. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - * - * Based on code from Brian Luczkiewicz - * https://github.com/blucz/Vector - * - * Uses the SIMPLEX-Font which is a variant of the Hershey font (public domain) - * http://paulbourke.net/dataformats/hershey/ */ +// Reference(s): +// - Based on code from Brian Luczkiewicz +// https://github.com/blucz/Vector +// - Uses the SIMPLEX-Font which is a variant of the Hershey font (public domain) +// https://web.archive.org/web/20120313001837/http://paulbourke.net/dataformats/hershey/ +// #include // FLT_EPSILON #include // alloca diff --git a/examples/23-vectordisplay/vectordisplay.h b/examples/23-vectordisplay/vectordisplay.h index 3dfe15732..4577894d2 100644 --- a/examples/23-vectordisplay/vectordisplay.h +++ b/examples/23-vectordisplay/vectordisplay.h @@ -1,12 +1,6 @@ /* * Copyright 2014 Kai Jourdan. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - * - * Based on code from Brian Luczkiewicz - * https://github.com/blucz/Vector - * - * Uses the SIMPLEX-Font which is a variant of the Hershey font (public domain) - * http://paulbourke.net/dataformats/hershey/ */ #ifndef __VECTORDISPLAY_H__ @@ -41,7 +35,7 @@ public: } void init(bool _originBottomLeft, float _texelHalf); - + void setup(uint16_t _width, uint16_t _height, uint8_t _view = 2); void resize(uint16_t _width, uint16_t _height); void teardown(); diff --git a/examples/38-bloom/bloom.cpp b/examples/38-bloom/bloom.cpp index 1be1d3d46..f87dda9bd 100644 --- a/examples/38-bloom/bloom.cpp +++ b/examples/38-bloom/bloom.cpp @@ -491,7 +491,9 @@ public: const uint32_t kNum = 9; const int kNumColors = 5; const float color[4*kNumColors] = - { // Palette: http://www.colourlovers.com/palette/3647908/RGB_Ice_Cream + { // Reference(s): + // - Palette + // https://web.archive.org/web/20180219034657/http://www.colourlovers.com/palette/3647908/RGB_Ice_Cream 0.847f*0.2f, 0.365f*0.2f, 0.408f*0.2f, 1.0f, 0.976f*0.2f, 0.827f*0.2f, 0.533f*0.2f, 1.0f, 0.533f*0.2f, 0.867f*0.2f, 0.741f*0.2f, 1.0f, diff --git a/src/glcontext_wgl.cpp b/src/glcontext_wgl.cpp index 918a98f2d..704e3eae9 100644 --- a/src/glcontext_wgl.cpp +++ b/src/glcontext_wgl.cpp @@ -134,7 +134,7 @@ namespace bgfx { namespace gl // // An application can only set the pixel format of a window one time. // Once a window's pixel format is set, it cannot be changed. - // MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/dd369049%28v=vs.85%29.aspx + // MSDN: https://web.archive.org/web/20190207230357/https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-setpixelformat HWND hwnd = CreateWindowA("STATIC" , "" , WS_POPUP|WS_DISABLED diff --git a/src/shader_dxbc.cpp b/src/shader_dxbc.cpp index 024e79d0d..9dca204f1 100644 --- a/src/shader_dxbc.cpp +++ b/src/shader_dxbc.cpp @@ -717,8 +717,8 @@ namespace bgfx } // dxbc hash function is slightly modified version of MD5 hash. - // https://tools.ietf.org/html/rfc1321 - // http://www.efgh.com/software/md5.txt + // https://web.archive.org/web/20190207230524/https://tools.ietf.org/html/rfc1321 + // https://web.archive.org/web/20190207230538/http://www.efgh.com/software/md5.txt // // Assumption is that data pointer, size are both 4-byte aligned, // and little endian. diff --git a/tools/geometryc/geometryc.cpp b/tools/geometryc/geometryc.cpp index 9ad7a4cf7..32c947d98 100644 --- a/tools/geometryc/geometryc.cpp +++ b/tools/geometryc/geometryc.cpp @@ -477,7 +477,9 @@ int main(int _argc, const char* _argv[]) data[size] = '\0'; fclose(file); - // https://en.wikipedia.org/wiki/Wavefront_.obj_file + // Reference(s): + // - Wavefront .obj file + // https://en.wikipedia.org/wiki/Wavefront_.obj_file Vec3Array positions; Vec3Array normals; @@ -551,7 +553,9 @@ int main(int _argc, const char* _argv[]) texcoord.set(texcoord.getPtr() + 1, normal.getPtr()); - // https://en.wikipedia.org/wiki/Wavefront_.obj_file#Vertex_Normal_Indices_Without_Texture_Coordinate_Indices + // Reference(s): + // - Wavefront .obj file / Vertex normal indices without texture coordinate indices + // https://en.wikipedia.org/wiki/Wavefront_.obj_file#Vertex_Normal_Indices_Without_Texture_Coordinate_Indices if (!texcoord.isEmpty()) { int32_t tex;