Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Fix stencil strokes and update to latest nanovg #5

Merged
merged 59 commits into from
Feb 13, 2022

Conversation

nidefawl
Copy link

@nidefawl nidefawl commented Feb 12, 2022

In this PR:

  1. Merge latest nanovg

  2. Fix Stencil Strokes:
    I added a new enum to handle the 3 different pipelines used for stencil strokes.
    I wanted to also use enums for the fill-path (nvgFill) to make the code cleaner, but haven't done that yet.

  3. I combined the 2 CMakeLists.txt into example/CMakeLists.txt and added some bits to make it easier to build and debug in MSVC/VSCode.

  4. I added GLAD as default gl-loader for the GL3 example. It can be switched back to GLEW (I kept glew to allow easier merge with main nanovg)

  5. I Increased the number of swapchain images to minimum 3 and updated the swapchain barrier to gain some extra performance.

  6. Spacebar renders the demo multiple times to add some 'load' when comparing performance

If you want to merge just bits of my branch you need to merge it yourself 😋

olliwang and others added 30 commits February 10, 2020 17:06
This commit fixes the issue that font size is inconsistent between different font files. `stb_truetype.h` is also updated to the latest version to support additional font types such as OpenType fonts.
Fixes the issue that font size is inconsistent.
This commit allows loading a certain font face from a font collection file such as TTC.
Support for loading a certain font face from a font file.
This commit adds `nvgResetFallbackFontsId()` and `nvgResetFallbackFonts()` functions for resetting fallback fonts.
Support for resetting fallback fonts.
This commit fixes the demo’s font sizes for the changes in memononen#558, which makes the rendered font size matches what you saw on other native apps. The demo used bigger font sizes than they actually were. This commit deduces the font sizes to match the original demo’s look.
Fixes the issue that line gap may ruin the text layout.
fixes the WebGL error "RENDER WARNING: there is no texture bound to the unit 0"" in Chrome
- nvgTextBreakLines: wordMinX was relative to rowStartX, which caused
problems when rowStartX change on line break, but wordMinX was still
relative to the previous rowStartX
- fixed font size on perf graphs
- made demo to use row minx/maxx instead of row->width
- fixed demo hover distance
Bind a dummy texture in setUniforms when compiling with emscripten
In Visual Studio 17, I get warnings related to these variables:
````
fontstash.h(241): warning C4018: '<': signed/unsigned mismatch
fontstash.h(242): warning C4018: '<': signed/unsigned mismatch
````

Making them unsigned fixes it.
Fixed Signed/Unsigned Comparison Warning
Added a preprocessor definition to disable the use of stb_image
Fixed text vanishing when the transform is vertically flipped
memononen and others added 26 commits November 1, 2021 22:25
Originally there is only a shared `FT_Library` object. However, if we create multiple `NVGcontext` objects and as soon as we delete one, the shared `FT_Library` object will be released, too. And that would cause a problem for the rest of `NVGcontext` objects.
Fixes FreeType errors when dealing with multiple NVGcontext objects.
This commit fixes the issue mentioned by memononen@0b37350#r63095702
Modify the demo to generate more CPU and GPU for perf comparison.
Allow switching between the two.
The glad binary FPS is 1% higher than glew for some reason
Vulkan Configurator provides a better way to control debug logging.
Use minimum 3 images in swapchain.
Change submit barrier from ALL_GRAPHICS_BIT to COLOR_ATTACHMENT_OUTPUT.
@danilw
Copy link
Owner

danilw commented Feb 12, 2022

Hello!
I saw compiler error:
example/vulkan_util.h line 582 use fmax

And look like you edited default Demo screen, for me it look like this now, I think it correct: (screenshot from Vulkan)
1

Il add myself - prioritizing discrete GPU(now it select first vulkan GPU)
il update build instruction and screenshots

I tested only GL3 and Vulkan builds.
I checked also for Valudation errors - no Validation errors. (on working, on exit it expected, I did not clean in my original code)

il accept this pull request when you fix this fmax error.

@danilw
Copy link
Owner

danilw commented Feb 13, 2022

...or il fix it myself tomorrow after accepting this...

@danilw
Copy link
Owner

danilw commented Feb 13, 2022

okey il accept it then, and fix it myself.

Thanks for this huge update!

@danilw danilw merged commit 1b582eb into danilw:master Feb 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.