Comments (5)
TexelUpload::reserve
in luminance 0.46 is working for what I needed.
from luminance-rs.
Yeah, seems like an oversight in the new API. It should be easy to add another option to TexelUpload
.
from luminance-rs.
TexelUpload::base_level_with_mipmaps(&[], mipmaps),
Is what is currently being used. A missing bit of documentation, I guess.
from luminance-rs.
That doesn't seem to work. For example, if I modify my code to
let texture = context.new_texture(
layout.dimensions(), // [256, 256, 256]
Sampler {
wrap_s: Wrap::ClampToEdge,
wrap_t: Wrap::ClampToEdge,
wrap_r: Wrap::ClampToEdge,
mag_filter: MagFilter::Nearest,
min_filter: MinFilter::Nearest,
..Sampler::default()
},
TexelUpload::base_level_with_mipmaps(&[], 0),
)?;
then I get the runtime error NotEnoughPixels { expected_bytes: 67108864, provided_bytes: 0 }
.
Ah, I see a possible misunderstanding. I want to create a texture of a specific nonzero size so that I can later write to parts of it (in texture atlas fashion) using upload_part()
, and that used to work. Uploading 64 MiB of dummy pixels can take around 100 ms on the WebGL backend in Chrome, and I'd like to avoid a frame hiccup that large in the event I need to resize the atlas.
from luminance-rs.
Yep, I reproduce with mrt
example. Thanks for noticing.
from luminance-rs.
Related Issues (20)
- Texture swizzling HOT 1
- Decouple vertex semantics from representation HOT 4
- Intermixing of Tess's with different structures HOT 1
- `Vertex` derive macro obstructs use of the inherent method name `new`
- Placeholder `#repr_ty_name` in derived attribute wrapper type documentation HOT 2
- Incorrect(?) warning when a shader uses a subset of attributes declared in semantics HOT 1
- [luminance-glutin] How to make use of glutin:WindowedContext HOT 3
- luminance-glutin doesn't resize correctly under Wayland
- Depth-only framebuffer causes generated binding code to error?
- Web examples instructions incomplete HOT 1
- Instanced rendering using instance attributes? HOT 1
- Learn luminance book is very out of date HOT 2
- Why GL_ARB_separate_shader_objects? HOT 1
- Pure OpenGL ES renderer? HOT 1
- luminance 0.46.1 needs unpublished luminance-derive HOT 1
- Luminance 0.47 isn't on crates.io HOT 1
- Clearing textures
- Segmentation fault when dropping shader program struct HOT 3
- Fields of Vertex struct being reordered on new rust version results in incorrect render HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luminance-rs.