Giter VIP home page Giter VIP logo

libktx-rs's People

Contributors

uberlambda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

danhedron

libktx-rs's Issues

build error when adding as a depedency to cargo.toml

Thanks for making these crates, super useful stuff!

While building the library by recursively cloning the repo as said in the README works fine, I'm getting the following build script error when adding libktx-rs = "*" to my Cargo.toml dependency list:

  --- stderr
  CMake Warning at cmake/version.cmake:151 (message):
    Error retrieving version from GIT tag.  Falling back to 0.0.0-noversion
  Call Stack (most recent call first):
    CMakeLists.txt:10 (include)


  CMake Error at CMakeLists.txt:200 (add_library):
    Cannot find source file:

      lib/internalexport.def

    Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
    .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


  CMake Error at CMakeLists.txt:200 (add_library):
    No SOURCES given to target: ktx_read


  CMake Error at CMakeLists.txt:195 (add_library):
    No SOURCES given to target: ktx


  CMake Generate step failed.  Build files cannot be regenerated correctly.
  thread 'main' panicked at '
  command did not execute successfully, got: exit code: 1

Iteration over array layers?

Is it possible to access specific layers of a (2d) texture array?

The method iterate_levels iterates over mip levels and cube map faces, but not over array layers. I guess the data for all layers is included in pixel_data?

Error code 15 when trying to parse a ktx file

I'm trying to parse this ktx file using this code:

unsafe fn libktx_rs() {
    let data = std::fs::read("uffizi_rgba16f_cube.ktx").unwrap();
    let mut result = zeroed();
    dbg!(ktxTexture2_CreateFromMemory(
        data.as_ptr(),
        data.len(),
        ktxTextureCreateFlagBits_KTX_TEXTURE_CREATE_NO_FLAGS,
        &mut result
    ));
    let result = &*result;
    dbg!(result.numFaces);
    dbg!(result.numLayers);
    dbg!(result.numLevels);
}

But the call to createfrommemory returns error code 15. C++ code that uses libktx directly works fine:

https://github.com/KhronosGroup/Vulkan-Samples/tree/master/framework/scene_graph/components/image/ktx.cpp#L64

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.