Skip to content

Commit 6b4e380

Browse files
committed
Updated nanogui (Mac/Win/Linux/RHEL) to e9ec8a
1 parent 6d25b4e commit 6b4e380

File tree

10 files changed

+16
-36
lines changed

10 files changed

+16
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Nuparu currently consists of:
2121
* [RMSD](http://boscoh.com/code/) (Src)
2222
* [glslUtility](https://github.com/CIS565-Fall-2012/Project0-Cuda-Checker/blob/master/HW0_MAC/src/glslUtility.cpp) 1.2 (Src)
2323
* [Leonhard Gruenschloss's Sobol Generator](http://gruenschloss.org) (Src)
24-
* [NanoGUI](https://github.com/wjakob/nanogui) (f8a4fe) (Mac/Win/Linux)
24+
* [NanoGUI](https://github.com/wjakob/nanogui) (e9ec8a) (Mac/Win/Linux)
2525
* [tinyformat](https://github.com/c42f/tinyformat) 2.1.0 (Src)
2626
* [Zlib](https://www.zlib.net) 1.2.11 (Mac/Win/Linux)
2727
* [TBB](https://www.threadingbuildingblocks.org/) 2020.0 (Mac/Win/Linux)

include/nanogui/compat.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

include/nanogui/layout.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
#pragma once
1717

18-
#include <nanogui/compat.h>
1918
#include <nanogui/object.h>
19+
#include <cstdio>
2020
#include <unordered_map>
2121

2222
NAMESPACE_BEGIN(nanogui)
@@ -420,7 +420,7 @@ class NANOGUI_EXPORT AdvancedGridLayout : public Layout {
420420
/// Allows for printing out Anchor position, size, and alignment.
421421
operator std::string() const {
422422
char buf[50];
423-
NANOGUI_SNPRINTF(buf, 50, "Format[pos=(%i, %i), size=(%i, %i), align=(%i, %i)]",
423+
std::snprintf(buf, 50, "Format[pos=(%i, %i), size=(%i, %i), align=(%i, %i)]",
424424
pos[0], pos[1], size[0], size[1], (int) align[0], (int) align[1]);
425425
return buf;
426426
}

include/nanogui/serializer/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ NAMESPACE_END(detail)
5353
* ``nanogui/serializer/opengl.h``, and ``nanogui/serializer/sparse.h`` must
5454
* be included to serialize the respective data types.
5555
*/
56-
class Serializer {
56+
class NANOGUI_EXPORT Serializer {
5757
protected:
5858
// this friendship breaks the documentation
5959
#ifndef DOXYGEN_SHOULD_SKIP_THIS

include/nanogui/textbox.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
#pragma once
1717

18-
#include <nanogui/compat.h>
1918
#include <nanogui/widget.h>
19+
#include <cstdio>
2020
#include <sstream>
2121

2222
NAMESPACE_BEGIN(nanogui)
@@ -280,7 +280,7 @@ class FloatBox : public TextBox {
280280
void setValue(Scalar value) {
281281
Scalar clampedValue = std::min(std::max(value, mMinValue),mMaxValue);
282282
char buffer[50];
283-
NANOGUI_SNPRINTF(buffer, 50, mNumberFormat.c_str(), clampedValue);
283+
std::snprintf(buffer, 50, mNumberFormat.c_str(), clampedValue);
284284
TextBox::setValue(buffer);
285285
}
286286

include/nanovg.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ enum NVGimageFlags {
157157
NVG_IMAGE_REPEATY = 1<<2, // Repeat image in Y direction.
158158
NVG_IMAGE_FLIPY = 1<<3, // Flips (inverses) image in Y direction when rendered.
159159
NVG_IMAGE_PREMULTIPLIED = 1<<4, // Image data has premultiplied alpha.
160+
NVG_IMAGE_NEAREST = 1<<5, // Image interpolation is Nearest instead Linear
160161
};
161162

162163
// Begin drawing a new frame
@@ -167,7 +168,7 @@ enum NVGimageFlags {
167168
// For example, GLFW returns two dimension for an opened window: window size and
168169
// frame buffer size. In that case you would set windowWidth/Height to the window size
169170
// devicePixelRatio to: frameBufferWidth / windowWidth.
170-
extern NVG_EXPORT void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio);
171+
extern NVG_EXPORT void nvgBeginFrame(NVGcontext* ctx, float windowWidth, float windowHeight, float devicePixelRatio);
171172

172173
// Cancels drawing the current frame.
173174
extern NVG_EXPORT void nvgCancelFrame(NVGcontext* ctx);
@@ -253,6 +254,9 @@ extern NVG_EXPORT void nvgReset(NVGcontext* ctx);
253254
//
254255
// Current render style can be saved and restored using nvgSave() and nvgRestore().
255256

257+
// Sets whether to draw antialias for nvgStroke() and nvgFill(). It's enabled by default.
258+
void nvgShapeAntiAlias(NVGcontext* ctx, int enabled);
259+
256260
// Sets current stroke style to a solid color.
257261
extern NVG_EXPORT void nvgStrokeColor(NVGcontext* ctx, NVGcolor color);
258262

@@ -665,12 +669,12 @@ struct NVGparams {
665669
int (*renderDeleteTexture)(void* uptr, int image);
666670
int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data);
667671
int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h);
668-
void (*renderViewport)(void* uptr, int width, int height, float devicePixelRatio);
672+
void (*renderViewport)(void* uptr, float width, float height, float devicePixelRatio);
669673
void (*renderCancel)(void* uptr);
670-
void (*renderFlush)(void* uptr, NVGcompositeOperationState compositeOperation);
671-
void (*renderFill)(void* uptr, NVGpaint* paint, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths);
672-
void (*renderStroke)(void* uptr, NVGpaint* paint, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths);
673-
void (*renderTriangles)(void* uptr, NVGpaint* paint, NVGscissor* scissor, const NVGvertex* verts, int nverts);
674+
void (*renderFlush)(void* uptr);
675+
void (*renderFill)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths);
676+
void (*renderStroke)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths);
677+
void (*renderTriangles)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, const NVGvertex* verts, int nverts);
674678
void (*renderDelete)(void* uptr);
675679
};
676680
typedef struct NVGparams NVGparams;

lib/linux/libnanogui.a

76 Bytes
Binary file not shown.

lib/osx/libnanogui.a

-18.3 KB
Binary file not shown.

lib/rhel/libnanogui.a

6.78 KB
Binary file not shown.

lib/win/nanogui.lib

269 KB
Binary file not shown.

0 commit comments

Comments
 (0)