davidedmonds / dot_vox_amethyst

Amethyst support library for working with `dot_vox` files
MIT License
4 stars 0 forks source link

Empty window when trying example on macOS #1

Open virtualritz opened 5 years ago

virtualritz commented 5 years ago

When running the example I get an empty window. I'm using nightly. Maybe that's the issue?

I just copied the example to a new project. Cargo.toml:

[package]
name = "voxshow"
version = "0.1.0"
authors = ["Moritz Moeller"]
edition = "2018"

[dependencies]
amethyst = "0.8.0"
dot_vox = "*"
dot_vox_amethyst = "*"
gfx_core = "*"

Console:

$ cargo run
   Compiling voxshow v0.1.0 (/Users/moritz/code/voxshow)
warning: variable does not need to be mutable
   --> src/main.rs:134:21
    |
134 |         for (_name, mut transform) in (&names, &mut transforms).join() {
    |                     ----^^^^^^^^^
    |                     |
    |                     help: remove this `mut`
    |
    = note: #[warn(unused_mut)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 8.37s
     Running `target/debug/voxshow`
[INFO][gfx_device_gl::info] parsing version '4.1 INTEL-12.2.17'
[INFO][gfx_device_gl::info] parsing version '4.10'
[INFO][gfx_device_gl] Info { platform_name: PlatformName { vendor: "Intel Inc.", renderer: "Intel Iris OpenGL Engine" }, version: 4.1, INTEL-12.2.17, shading_language: 4.10, extensions: {"GL_APPLE_flush_render", "GL_APPLE_texture_range", "GL_APPLE_client_storage", "GL_ARB_texture_swizzle", "GL_ATI_texture_mirror_once", "GL_ARB_internalformat_query", "GL_APPLE_rgb_422", "GL_NV_texture_barrier", "GL_ARB_vertex_type_2_10_10_10_rev", "GL_ARB_ES2_compatibility", "GL_ARB_explicit_attrib_location", "GL_ARB_tessellation_shader", "GL_APPLE_object_purgeable", "GL_ARB_texture_query_lod", "GL_EXT_texture_filter_anisotropic", "GL_ARB_blend_func_extended", "GL_ARB_shading_language_include", "GL_ARB_draw_buffers_blend", "GL_ARB_timer_query", "GL_APPLE_container_object_shareable", "GL_ARB_texture_rgb10_a2ui", "GL_ARB_gpu_shader5", "GL_ARB_sample_shading", "GL_EXT_texture_compression_s3tc", "GL_ARB_sampler_objects", "GL_ARB_transform_feedback2", "GL_ARB_vertex_attrib_64bit", "GL_ARB_shader_subroutine", "GL_ARB_texture_buffer_object_rgb32", "GL_EXT_framebuffer_multisample_blit_scaled", "GL_ARB_transform_feedback3", "GL_ARB_shader_bit_encoding", "GL_APPLE_row_bytes", "GL_ARB_texture_gather", "GL_ARB_texture_cube_map_array", "GL_EXT_debug_label", "GL_ARB_instanced_arrays", "GL_ARB_gpu_shader_fp64", "GL_ARB_separate_shader_objects", "GL_EXT_debug_marker", "GL_ARB_draw_indirect", "GL_ARB_occlusion_query2", "GL_EXT_texture_sRGB_decode", "GL_ARB_texture_storage", "GL_ARB_viewport_array"} }
[INFO][gfx_device_gl] Capabilities { max_vertex_count: 1048575, max_index_count: 150000, max_texture_size: 16384, max_patch_size: 32, instance_base_supported: false, instance_call_supported: true, instance_rate_supported: true, vertex_base_supported: true, srgb_color_supported: true, constant_buffer_supported: true, unordered_access_view_supported: true, separate_blending_slots_supported: true, copy_buffer_supported: true }
[INFO][gfx_device_gl] PrivateCaps { array_buffer_supported: true, frame_buffer_supported: true, immutable_storage_supported: true, sampler_objects_supported: true, program_interface_supported: false, buffer_storage_supported: false, clear_buffer_supported: true, frag_data_location_supported: true, sampler_lod_bias_supported: true, texture_border_clamp_supported: true }
[INFO][gfx_device_gl::factory]  Created frame buffer 1
[DEBUG][amethyst_renderer::pipe::effect] Building effect
[DEBUG][amethyst_renderer::pipe::effect] Compiling shaders
[INFO][gfx_device_gl::shade]    Compiled shader 1
[INFO][gfx_device_gl::shade]    Compiled shader 2
[DEBUG][amethyst_renderer::pipe::effect] Creating pipeline state
[INFO][gfx_device_gl::shade]    Linked program 3
[WARN][gfx_device_gl::shade]    Log: WARNING: Could not find fragment shader output 'Target2' to match FragDataBinding request.
WARNING: Could not find fragment shader output 'Target3' to match FragDataBinding request.
WARNING: Could not find fragment shader output 'Target1' to match FragDataBinding request.
WARNING: Could not find fragment shader output 'Target0' to match FragDataBinding request.

[INFO][gfx_device_gl::shade]        Attrib[0] = "color" F32 Vector(4)
[INFO][gfx_device_gl::shade]        Attrib[1] = "position"  F32 Vector(3)
[INFO][gfx_device_gl::shade]        Block[0] = 'VertexArgs' of size 192
[INFO][gfx_device_gl::shade]            Element at 0    = 'proj'    F32 Matrix(ColumnMajor, 4, 4)
[INFO][gfx_device_gl::shade]            Element at 64   = 'view'    F32 Matrix(ColumnMajor, 4, 4)
[INFO][gfx_device_gl::shade]            Element at 128  = 'model'   F32 Matrix(ColumnMajor, 4, 4)
[DEBUG][gfx_device_gl::shade] Program 3 reflection: ProgramInfo { vertex_attributes: [AttributeVar { name: "color", slot: 0, base_type: F32, container: Vector(4) }, AttributeVar { name: "position", slot: 1, base_type: F32, container: Vector(3) }], globals: [], constant_buffers: [ConstantBufferVar { name: "VertexArgs", slot: 0, size: 192, usage: VERTEX, elements: [ConstVar { name: "proj", location: 0, count: 1, base_type: F32, container: Matrix(ColumnMajor, 4, 4) }, ConstVar { name: "view", location: 64, count: 1, base_type: F32, container: Matrix(ColumnMajor, 4, 4) }, ConstVar { name: "model", location: 128, count: 1, base_type: F32, container: Matrix(ColumnMajor, 4, 4) }] }], textures: [], unordereds: [], samplers: [], outputs: [], output_depth: false, knows_outputs: false }
[DEBUG][amethyst_renderer::pipe::effect] Creating raw constant buffers
[INFO][gfx_device_gl::factory]  Created buffer 1
[DEBUG][amethyst_renderer::pipe::effect] Set global uniforms
[DEBUG][amethyst_renderer::pipe::effect] Process Color/Depth/Blend outputs
[DEBUG][amethyst_renderer::pipe::effect] Finished building effect
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.8.0
[INFO][amethyst::app] Platform: x86_64-apple-darwin
[INFO][amethyst::app] Amethyst git commit:
[INFO][amethyst::app] Rustc version: 1.32.0-nightly Nightly
[INFO][amethyst::app] Rustc git commit: 14997d56a550f4aa99fe737593cd2758227afc56
[DEBUG][amethyst_assets::loader] "renderer::Mesh": Loading asset "resources/mesh/placeholder.vox" with format "MAGICAVOXEL_DOT_VOX" from source "[default source]" (handle id: Handle { id: 0, marker: PhantomData })
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 0, marker: PhantomData }) has been loaded successfully
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 1, marker: PhantomData }) has been loaded successfully
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 2, marker: PhantomData }) has been loaded successfully
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 3, marker: PhantomData }) has been loaded successfully
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 4, marker: PhantomData }) has been loaded successfully
[DEBUG][dot_vox::parser] Unknown childless chunk "nTRN"
[DEBUG][dot_vox::parser] Unknown childless chunk "nGRP"
[DEBUG][dot_vox::parser] Unknown childless chunk "nTRN"
[DEBUG][dot_vox::parser] Unknown childless chunk "nSHP"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 5, marker: PhantomData }) has been loaded successfully
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][dot_vox::parser] Unknown childless chunk "LAYR"
[DEBUG][amethyst_assets::storage] "renderer::Texture": Asset "<Data>" (handle id: Handle { id: 6, marker: PhantomData }) has been loaded successfully
[DEBUG][dot_vox::parser] Unknown childless chunk "rLIT"
[DEBUG][dot_vox::parser] Unknown childless chunk "rLIT"
[DEBUG][dot_vox::parser] Unknown childless chunk "rAIR"
[DEBUG][dot_vox::parser] Unknown childless chunk "rLEN"
[DEBUG][dot_vox::parser] Unknown childless chunk "POST"
[DEBUG][dot_vox::parser] Unknown childless chunk "rDIS"
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("nTRN")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("nGRP")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("nTRN")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("nSHP")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("LAYR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("rLIT")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("rLIT")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("rAIR")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("rLEN")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("POST")
[DEBUG][dot_vox::parser] Unmapped chunk Unknown("rDIS")
[INFO][gfx_device_gl::factory]  Created buffer 2
[DEBUG][amethyst_assets::storage] "renderer::Mesh": Asset "resources/mesh/placeholder.vox" (handle id: Handle { id: 0, marker: PhantomData }) has been loaded successfully
davidedmonds commented 5 years ago

Will take a look over the next few days and get back to you - hopefully will be able to work out what the issue is.

virtualritz commented 5 years ago

Thanks! On a side note, the example doesn't build against Amethyst 0.9.0 (latest). I was unsure if that is expected.