Skip to content

Commit

Permalink
Merge pull request #123 from GLVis/v4.0-dev
Browse files Browse the repository at this point in the history
Final changes for glvis-4.0
  • Loading branch information
tzanio committed Dec 11, 2020
2 parents 35a2c78 + 943e627 commit 905f985
Show file tree
Hide file tree
Showing 37 changed files with 134 additions and 117 deletions.
60 changes: 33 additions & 27 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,65 @@
http://glvis.org


Version 3.4.1 (development)
===========================
Version 4.0, released on Dec 11, 2020
=====================================

Starting with this version, the GLVis open source license is changed to BSD-3.

- Keystroke changes: cutting plane in 2D is now toggled with 'i' instead of 'w',
and 2D element subdivision is controlled with 'o/O' instead of 'i/I'. These
are the same as the corresponding keystrokes in 3D.
Unlike previous GLVis releases, this version requires a C++11 compiler.

- Overhauled rendering and window management backend, replacing X Windows with
SDL for platform-native window and event handling. This allows for OpenGL 3+
and HiDPI support on Mac OS X.
- Major overhaul and modernization of the GLVis rendering and window management,
replacing X Windows with SDL for platform-native window and event handling.
This enables OpenGL 3+ support and HiDPI support on Mac OS X.

- Two rendering backends are included: one for legacy OpenGL contexts without
support for shaders, and one with full support for modern OpenGL 3 features.
The modern OpenGL context is preferred by default; a new command-line argument
"-oldgl" can be used to only request the legacy backend.

- Transparency and printing in textured coloring modes is now supported, and
no-texture coloring has been removed as a result.

- Text on screen is now rendered using a texture atlas.
"-oldgl" can be used to request the legacy backend.

- Preliminary support for building GLVis to Javascript/WebAssembly using
Emscripten.
Emscripten, see https://github.com/GLVis/glvis-js.

- Documented project workflow and provided contribution guidelines in the new
top-level file, CONTRIBUTING.md.

- Added several perceptually uniform colormaps "turbo", "viridis", "plasma",
"fusion", "iceburn", "viola", "pride" and "ocean" from
* Google AI: https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html
* Matplotlib: https://bids.github.io/colormap/
* CMasher: https://github.com/1313e/CMasher

- Added the ability to discretize a palette, i.e. to use just a prescribed
number of its colors, see the new "number of colors" input of the F6 key.
- Added support for visualization of the element ordering curve with 'Ctrl+o'.

- Keystroke changes: cutting plane in 2D is now toggled with 'i' instead of 'w',
and 2D element subdivision is controlled with 'o/O' instead of 'i/I'. These
are the same as the corresponding keystrokes in 3D.

- Improved the 3D cutting plane algorithm for curved elements. The key 'I' can
be used to switch to the previous (faster) algorithm which is suitable for
meshes with planar faces.

- Updated to support the display and slicing of meshes with wedge elements.

- Improved the opening of parallel meshes/solutions.

- Transparency and printing in textured coloring modes is now supported, and
no-texture coloring has been removed as a result.

- FreeType is now a required dependency and text on screen is rendered using a
texture atlas.

- Replaced the "deep sea" palette with "ocean". Added new palette: gray.

- Added the ability to discretize a palette, i.e. to use just a prescribed
number of its colors, see the new "number of colors" input of the F6 key.

- Added new script and socket command: "palette_repeat" which can be used to
repeat and reverse/flip the palette - controls the same parameter as the first
prompt after pressing the F6 key in the GLVis window.

- Improved cutting plane algorithm for curved elements. The key 'I' can be used
to switch to the previous (faster) algorithm which is suitable for meshes with
planar faces.

- Updated to support the display and slicing of meshes with wedge elements.

- Added a key for setting the bounding box from the terminal (Shift+F7).

- Add support to visualize the element ordering curve with 'Ctrl+o'.

- Improved the opening of parallel meshes/solutions.


Version 3.4, released on May 29, 2018
=====================================
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
cmake_minimum_required(VERSION 3.10)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Prohibit in-source builds
Expand Down
21 changes: 11 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ The GLVis source code has the following structure:

```
.
└── lib
└── gl
└── shaders
├── lib
│ └── gl
│ └── shaders
└── share
```

## GitHub Workflow
Expand Down Expand Up @@ -271,19 +272,19 @@ Before a PR can be merged, it should satisfy the following:

### Releases

- Releases are just tags in the `master` branch, e.g. https://github.com/glvis/glvis/releases/tag/v3.3.2,
and have a version that ends in an even "patch" number, e.g. `v3.2.2` or
- Releases are just tags in the `master` branch, e.g. https://github.com/glvis/glvis/releases/tag/v3.4,
and have a version that ends in an even "patch" number, e.g. `v3.4.2` or
`v3.4` (by convention `v3.4` is the same as `v3.4.0`.) Between releases, the
version ends in an odd "patch" number, e.g. `v3.3.3`.
version ends in an odd "patch" number, e.g. `v3.4.1`.

- We use [milestones](https://github.com/glvis/glvis/milestones) to coordinate the
work on different PRs toward a release, see for example the
[v3.3.2 release](https://github.com/glvis/glvis/milestone/1?closed=1).
[v3.4 release](https://github.com/glvis/glvis/milestone/1?closed=1).

- After a release is complete, the `next` branch is recreated, e.g. as follows
(replace `3.3.2` with current release):
- Rename the current `next` branch to `next-pre-v3.3.2`.
- Create a new `next` branch starting from the `v3.3.2` release.
(replace `3.4` with current release):
- Rename the current `next` branch to `next-pre-v3.4`.
- Create a new `next` branch starting from the `v3.4` release.
- Local copies of `next` can then be updated with `git fetch origin next && git checkout -B next origin/next`.

### Release Checklist
Expand Down
20 changes: 10 additions & 10 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ Ctrl+arrow keys - Translate the viewpoint
Ctrl+o - Toggle an element ordering curve in 2D and 3D

i - Toggle cutting (clipping) plane in 2D
y/Y - Rotate clipping plane (theta) in 2D
z/Z - Translate clipping plane in 2D
y/Y - Rotate cutting plane (theta) in 2D
z/Z - Translate cutting plane in 2D

` - Toggle a ruler, with initial origin at the center of the bounding box. The
origin can be later moved with '~'.
Expand Down Expand Up @@ -230,19 +230,19 @@ U - Toggle the functionality of 'u' (prints a message in the terminal when

3D data commands
================
i - Toggle clipping (cutting) plane
i - Toggle cutting (clipping) plane
The options are: -> none
-> cut through the elements
-> show only elements behind the clipping plane
I - Toggle the clipping plane algorithm used when the option "cut through the
-> show only elements behind the cutting plane
I - Toggle the cutting plane algorithm used when the option "cut through the
elements" is selected. The two algorithms are:
-> slower, more accurate algorithm for curved meshes (default)
-> faster algorithm suitable for meshes with planar faces
x/X - Rotate clipping plane (phi)
y/Y - Rotate clipping plane (theta)
z/Z - Translate clipping plane
E - Display/Hide the elements in the clipping plane
M - Display/Hide the mesh in the clipping plane
x/X - Rotate cutting plane (phi)
y/Y - Rotate cutting plane (theta)
z/Z - Translate cutting plane
E - Display/Hide the elements in the cutting plane
M - Display/Hide the mesh in the cutting plane

o/O - Refine/de-refine elements

Expand Down
1 change: 0 additions & 1 deletion glvis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

// GLVis - an OpenGL visualization server based on the MFEM library


#include <limits>
#include <iostream>
#include <fstream>
Expand Down
2 changes: 1 addition & 1 deletion lib/aux_vis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ void RightButtonLoc (EventInfo *event)

if (event->keymod & KMOD_SHIFT)
{
//glLoadIdentity();
// glLoadIdentity();
// GLfloat light[] = {newx,-newy, sqrt((float)(newx*newx+newy*newy)), 0.0 };
newx -= startx;
newy -= starty;
Expand Down
4 changes: 2 additions & 2 deletions lib/aux_vis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_AUX_VIS
#define GLVIS_AUX_VIS
#ifndef GLVIS_AUX_VIS_HPP
#define GLVIS_AUX_VIS_HPP

#include "gl/platform_gl.hpp"
#include "gl/types.hpp"
Expand Down
13 changes: 6 additions & 7 deletions lib/font.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef FONT_HPP
#define FONT_HPP
#ifndef GLVIS_FONT_HPP
#define GLVIS_FONT_HPP

#include <ft2build.h>
#include FT_FREETYPE_H
Expand All @@ -23,7 +23,6 @@

using namespace std;


class GlVisFont
{
public:
Expand Down Expand Up @@ -61,9 +60,9 @@ class GlVisFont
void getObjectSize(const std::string& text, int& w, int& h);

GlVisFont()
: init(false)
, font_init(false)
, face_has_kerning(false)
: init(false),
font_init(false),
face_has_kerning(false)
{
if (FT_Init_FreeType(&library))
{
Expand Down Expand Up @@ -110,4 +109,4 @@ class GlVisFont
void setAlphaChannel(GLenum alpha) { alpha_channel = alpha; }
};

#endif /* FONT_HPP */
#endif /* GLVIS_FONT_HPP */
6 changes: 6 additions & 0 deletions lib/gl/attr_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_ATTR_TRAITS_HPP
#define GLVIS_ATTR_TRAITS_HPP

#include "types.hpp"
#include "renderer_core.hpp"
#include <type_traits>
Expand Down Expand Up @@ -148,4 +151,7 @@ AttrTexcoord<TV, decltype((void)TV::texCoord, 0)>>
const static GLenum FFArrayIdx = GL_TEXTURE_COORD_ARRAY;
constexpr static auto FFSetupFunc = glTexCoordPointer;
};

}

#endif
4 changes: 2 additions & 2 deletions lib/gl/platform_gl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_PLATFORM_GL
#define GLVIS_PLATFORM_GL
#ifndef GLVIS_PLATFORM_GL_HPP
#define GLVIS_PLATFORM_GL_HPP

#include <GL/glew.h>
#ifndef __EMSCRIPTEN__
Expand Down
1 change: 0 additions & 1 deletion lib/gl/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,3 @@ void GLDevice::captureXfbBuffer(CaptureBuffer& capture, const TextBuffer& t_buf)
}

}

6 changes: 3 additions & 3 deletions lib/gl/renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_RENDERER
#define GLVIS_RENDERER
#ifndef GLVIS_RENDERER_HPP
#define GLVIS_RENDERER_HPP

#include <memory>
#include <vector>
Expand Down Expand Up @@ -296,4 +296,4 @@ class MeshRenderer

}

#endif // GLVIS_RENDERER
#endif // GLVIS_RENDERER_HPP
6 changes: 3 additions & 3 deletions lib/gl/renderer_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_RENDERER_CORE
#define GLVIS_RENDERER_CORE
#ifndef GLVIS_RENDERER_CORE_HPP
#define GLVIS_RENDERER_CORE_HPP
#include "renderer.hpp"

namespace gl3
Expand Down Expand Up @@ -118,4 +118,4 @@ class CoreGLDevice : public GLDevice

}

#endif // GLVIS_RENDERER_CORE
#endif // GLVIS_RENDERER_CORE_HPP
4 changes: 2 additions & 2 deletions lib/gl/renderer_ff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ void FFGLDevice::drawDeviceBuffer(int hnd)
}
glCallList(disp_lists[hnd].list);
// reset texturing parameters
//glMultiTexCoord2f(GL_TEXTURE0, 0.f, 0.f);
//glMultiTexCoord2f(GL_TEXTURE1, 0.f, 0.f);
// glMultiTexCoord2f(GL_TEXTURE0, 0.f, 0.f);
// glMultiTexCoord2f(GL_TEXTURE1, 0.f, 0.f);
}

void FFGLDevice::drawDeviceBuffer(const TextBuffer& buf)
Expand Down
6 changes: 3 additions & 3 deletions lib/gl/renderer_ff.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_RENDERER_FF
#define GLVIS_RENDERER_FF
#ifndef GLVIS_RENDERER_FF_HPP
#define GLVIS_RENDERER_FF_HPP

#include "renderer.hpp"

Expand Down Expand Up @@ -62,4 +62,4 @@ class FFGLDevice : public GLDevice

}

#endif // GLVIS_RENDERER_FF
#endif // GLVIS_RENDERER_FF_HPP
1 change: 0 additions & 1 deletion lib/gl/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,3 @@ void GlBuilder::saveVertex(const GlBuilder::FFState& v)
}
}
}

7 changes: 3 additions & 4 deletions lib/gl/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef GLVIS_AUX_GL3
#define GLVIS_AUX_GL3
#ifndef GLVIS_TYPES_HPP
#define GLVIS_TYPES_HPP

#include <vector>
#include <array>
Expand Down Expand Up @@ -677,5 +677,4 @@ class GlDrawable

}

#endif // GLVIS_AUX_GL3

#endif // GLVIS_TYPES_HPP
5 changes: 5 additions & 0 deletions lib/gl2ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
* Please report all bugs and problems to <gl2ps@geuz.org>.
*/

// Suppress GL2PS OpenGL warning on Mac
#ifdef __APPLE__
#define GL_SILENCE_DEPRECATION
#endif

#include "gl2ps.h"

#include <math.h>
Expand Down
4 changes: 2 additions & 2 deletions lib/logo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef __LOGO_HPP__
#define __LOGO_HPP__
#ifndef GLVIS_LOGO_HPP
#define GLVIS_LOGO_HPP

extern unsigned char logo_rgba[];
extern unsigned int logo_rgba_len;
Expand Down
4 changes: 2 additions & 2 deletions lib/material.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.

#ifndef MATERIAL_HPP
#define MATERIAL_HPP
#ifndef GLVIS_MATERIAL_HPP
#define GLVIS_MATERIAL_HPP
#include <array>

struct Material
Expand Down
Loading

0 comments on commit 905f985

Please sign in to comment.