-
Notifications
You must be signed in to change notification settings - Fork 214
Feature/misc changes #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
palszasz
wants to merge
15
commits into
mitsuba-renderer:master
Choose a base branch
from
palszasz:feature/misc_changes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/misc changes #169
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this was created by IntelliSense in Visual Studio Code.
Add a child widget (a label) to an ImageView instance, demonstrating that it will render on top of the image content.
I don't remember which version of macOS had this issue, and cannot reproduce it on latest (15.4.1), but some older macOS versions probably still have this issue. The only downside of this change could be that the default text is not localized.
With this patch now even simple plain float vertex attributes are supported as well.
nanogui::async schedules a function to be executed in the next main loop iteration. It’s doing it by appending the function to a list of functions, while holding a lock (for thread safety). In the UI thread nanogui will process each of these functions one by one, while holding the same lock. This means that while it’s executing an async function, any thread calling `async` will be blocked, which can easily lead to deadlocks. To fix this, in the UI thread the lock is held only until the functions are moved to a temporary storage. This way when the functions are executed, async can still be called (and the function will be executed in the *next* main loop iteration)
* Added “flat” attribute: if set, the button background and outline is not rendered (except the outline is rendered when the mouse is hovering above it). This can be used to remove UI clutter. * Added attributes for the button padding. This allows to create more compact buttons, without setting a fixed size. * Note that the new attributes should not increase sizeof(Button), since they were inserted in wasted space due to alignment (and that’s one reason why the padding is stored in 8-bit: it’s still big enough, but we don’t waste additional space... assuming bool is one byte)
The example1 was running out of window space. Created example5 to continue demonstrating other widgets.
Before popup windows always popped up at the side of the parent window. This worked for smaller windows, but in case the window was too big (a common example is if the window covers the whole screen), the popup was shown outside of the screen. This patch adds two extra constants: LeftInside and RightInside. If these constants are used (instead of Left and Right), the popup will be shown next to the widget, and not next to the parent window.
For example, if a popup should pop up to the right of a widget, but the widget is already at the right edge of the screen, the popup would be invisible. With this fix, the popup is moved back into visible screen area.
This will allow easier re-use with other components
654b8a5 to
1cbff2e
Compare
21626d0 to
d368a4f
Compare
c75898b to
1bbd038
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are some of the changes/patches we created on top of NanoGUI internally, and we thought it might be useful to contribute upstream.
Please let me know if you don't want some parts, or wants something rewritten. Also I could split it in smaller PRs, I just uploaded them in a batch to have an overview of the changes. So please treat this PR more like a request-for-comment :-)