Git Product home page Git Product logo

basalt's People

Contributors

austinj235 avatar c0d3-m4513r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

basalt's Issues

Basalt fails to compile on Windows

Hello, I've been evaluating Rust GUI libraries today - including yours. I noticed that the sample code you provided in the README fails to compile on Windows 10. I thought before moving on I would make the issue for your awareness. Here is my console output. Hope this helps!

`λ cargo run
Compiling shaderc-sys v0.6.3
Compiling rental v0.5.5
The following warnings were emitted during compilation:

warning: System installed library not found. Falling back to build from source

error: failed to run custom build command for shaderc-sys v0.6.3

Caused by:
process didn't exit successfully: D:\Projects\rust-gui-survey\basalt-test\target\debug\build\shaderc-sys-8bfa33387fdfb646\build-script-build (exit code: 101)
--- stdout
cargo:warning=System installed library not found. Falling back to build from source
running: "cmake" "C:\Users\JR\.cargo\registry\src\github.com-1ecc6299db9ec823\shaderc-sys-0.6.3\build" "-G" "Ninja" "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" "-DSPIRV_SKIP_EXECUTABLES=ON" "-DSPIRV_WERROR=OFF" "-DSHADERC_SKIP_TESTS=ON" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_C_FLAGS= /nologo /EHsc /MD" "-DCMAKE_CXX_FLAGS= /nologo /EHsc /MD" "-DCMAKE_C_FLAGS_RELEASE= /nologo /EHsc /MD" "-DCMAKE_CXX_FLAGS_RELEASE= /nologo /EHsc /MD" "-DSHADERC_ENABLE_SHARED_CRT=ON" "-DCMAKE_INSTALL_PREFIX=D:\Projects\rust-gui-survey\basalt-test\target\debug\build\shaderc-sys-c4118a8fe839a887\out" "-DCMAKE_C_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_COMPILER=C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe" "-DCMAKE_BUILD_TYPE=Release"
-- Building SPIRV-Header examples
-- Installing SPIRV-Header
-- Configuring incomplete, errors occurred!
See also "D:/Projects/rust-gui-survey/basalt-test/target/debug/build/shaderc-sys-c4118a8fe839a887/out/build/CMakeFiles/CMakeOutput.log".

--- stderr
CMake Warning (dev) at CMakeLists.txt:8 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The following variable(s) would be set to empty:

  CMAKE_PROJECT_VERSION
  CMAKE_PROJECT_VERSION_MAJOR
  CMAKE_PROJECT_VERSION_MINOR
  CMAKE_PROJECT_VERSION_PATCH

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at C:/ProgramData/chocolatey/lib/cmake.portable/tools/cmake-3.13.2-win64-x64/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PythonInterp: Found unsuitable version "2.7.12", but
required is at least "3" (found D:/Programs/Anaconda2/python.exe)
Call Stack (most recent call first):
C:/ProgramData/chocolatey/lib/cmake.portable/tools/cmake-3.13.2-win64-x64/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE)
C:/ProgramData/chocolatey/lib/cmake.portable/tools/cmake-3.13.2-win64-x64/share/cmake-3.13/Modules/FindPythonInterp.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
spirv-tools/CMakeLists.txt:181 (find_package)
spirv-tools/CMakeLists.txt:191 (find_host_package)

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\JR.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.45\src\lib.rs:894:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed`

your trangle example is broken

Template

  • Version or commit of basalt: e525f98

  • OS (with kernel version for linux):

  • Distributor ID: Ubuntu
    Description: Ubuntu 21.04
    Release: 21.04
    Codename: hirsute

  • GPU: nvidia 1070

  • GPU Driver & Version: latest

Issue

Please describe the issue and provide anything at all that will help resolve it.

cargo run --bin triangle
is not working. Other examples do

First errors

error[E0308]: mismatched types
--> src/bin/triangle.rs:62:5
|
62 | basalt.device(),
| ^^^^^^^^^^^^^^^ expected struct vulkano::device::Device, found struct basalt::vulkano::device::Device
|
= note: expected struct Arc<vulkano::device::Device>
found struct Arc<basalt::vulkano::device::Device>
= note: perhaps two different versions of crate vulkano are being used?

error[E0308]: mismatched types
--> src/bin/triangle.rs:111:48
|
111 | let triangle_vs = triangle_vs::Shader::load(basalt.device()).unwrap();
| ^^^^^^^^^^^^^^^ expected struct vulkano::device::Device, found struct basalt::vulkano::device::Device
|
= note: expected struct Arc<vulkano::device::Device>
found struct Arc<basalt::vulkano::device::Device>
= note: perhaps two different versions of crate vulkano are being used?

error[E0308]: mismatched types
--> src/bin/triangle.rs:112:48
|
112 | let triangle_fs = triangle_fs::Shader::load(basalt.device()).unwrap();
| ^^^^^^^^^^^^^^^ expected struct vulkano::device::Device, found struct basalt::vulkano::device::Device
|
= note: expected struct Arc<vulkano::device::Device>
found struct Arc<basalt::vulkano::device::Device>
= note: perhaps two different versions of crate vulkano are being used?
...

v0.11 on Github

Please make a v.0.11 release on github, so people can more easily compare versions, with each other.

Image artifacts appearing after atlas image resizes

An upstream issue seems to be causing this issue: vulkano-rs/vulkano#1265

When a resize happens to an atlas image 3 commands are issued. Causing the bug above to appear. Two commands to zero the space. One for the new area on the right, and another for the new area on the bottom. A third is then to copy the old image onto the new image. Removing one of the zero commands stops the artifacts from appearing, but then the image is no longer properly zero'd.

A workaround is to zero the entire image and then copy the new image on top which is slightly slower reducing the commands needed to only two which would prevent Basalt from running into this bug.

On linux where this bug doesn't seem to happen at least with amdgpu drivers:
alt text

On windows where this bug is encountered:
alt text

TODO / Idea List

A Non-Exhaustive List of Things that Can be Done

  • Basalt
    • Move app_loop to another module. D8
    • Provides means for static initialization. D4
  • Window
    • #51 Multi-window support. D10
    • Allow setting IME state and position. D2
  • Interface
    • mouse_inside() may no longer function as intended by games. (Since #42) If there was a Bin that covers the game's view as pass_events no longer exists. D5
  • Atlas
    • #51 atlas::Image::into_rgba() does type coercion when only remapping is required. D3
    • #51 Respond to coords request that are already uploaded instead of waiting for update. D4
  • Bin
    • Bin::wait_for_update() could deadlock D4
    • Consider creatings an Effects system for Bin D7
      • Replace add_button_fade_events, fade_out, fade_in
    • #51 Bin floating elements ordering isn't configurable D3
    • Allow bins to have blurred transparent backgrounds D4
    • #51 Borders don't work with border-radius D6
    • Text highlighting, copying, pasting D10
    • Create syntax to allow mixing of weights, family, and color. D8
      • Long term feature, not currently supported by ilmenite/allsorts.
  • Scrollbar(legacy)
    • on_children_added in on sufficient to track if Scrollbar should update. D4
      • Consider adding on_overflow_changed callback
      • Child would notify parent of its update and the parent would check if overflow has changed.
  • Widgets (blocked until everything is mostly in a stable state) D11
    • Add System that interacts with Hooks the same way that Bins do.
      • Each widgets would still have specific hooks.
    • Theming system to provide good-looking default, that'd be consistent and easily configurable.
    • Implement Button, Checkbox, Combo Box, Context Menu, Horizontal Scaler, Horizontal Scrollbar, Label, List Box, Menu Bar, Multi Line, Entry, Pager, Progress bar, Radio Button, Single Line Entry, Spin Button, Status, Switch Button, Toggle Button, Vertical Scaler, Vertical Scrollbar, & maybe more!

Some images?

I would like to see some images for this UI thing so that I know whether it works or not, preferably in the README.md.

incorrect vertical alignement of glyphs

I've noted that the vertical glyphs seem not correctly aligned, this is especially visible in small fonts sizes.
Running from the vanilla example with increased scale:

image

Scroll bar height is sometimes miscalculated.

When a bin's content overflow isn't much more than the height the 10px per 1px of the scroll can cause the scrollbar height to be less than the minimum height.

Solution: Use a minimum height and allow steps greater than 10px per 1px.

No Text

I am using the example basic_app.
I had to modify some imports, the version, and fix #15 , but with that in place, Basalt runs.
It compiles, and starts up correctly.

However, it does not display Text.
I am currently on Win 10.

More examples

I found this project today when i was searching for a lib which i could use to build a simple graphical app in rust, but i didn't find examples for any ui component other than buttons, i would really appreciate examples for sliders, scroll bars and other components

Alternative Atlas formats aren't actually implemented.

During basalt creating the following formats are check for support using the highest one.

R16G16B16A16_UNORM,
R8G8B8A8_UNORM,
B8G8R8A8_UNORM,
A8B8G8R8_UNORM_PACK32,

The Atlas assumes R16G16B16A16_UNORM, so the other formats result in corrupted images. (16b source being copied onto 8b)

v.0.11 doesn't compile on stable rust

Basalt uses these Feature assignments. They are NOT supported on stable rust. The library fails to build.

#![feature(arbitrary_self_types)]
#![feature(integer_atomics)]
#![feature(drain_filter)]

The error:error[E0554]: `#![feature]` may not be used on the stable release channel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.