Files
phy/ktx2/index.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

24 lines
7.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Parser for the ktx2 texture container format."><title>ktx2 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ktx2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ktx2/index.html">ktx2</a><span class="version">0.3.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#features" title="Features">Features</a></li><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>ktx2</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/ktx2/lib.rs.html#1-426">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parser for the <a href="https://github.khronos.org/KTX-Specification/">ktx2</a> texture container format.</p>
<h3 id="features"><a class="doc-anchor" href="#features">§</a>Features</h3>
<ul>
<li><input disabled="" type="checkbox" checked=""/>
Async reading</li>
<li><input disabled="" type="checkbox" checked=""/>
Parsing</li>
<li><input disabled="" type="checkbox" checked=""/>
Validating</li>
<li><input disabled="" type="checkbox" checked=""/>
<a href="https://github.khronos.org/KTX-Specification/#_data_format_descriptor">Data format description</a></li>
<li><input disabled="" type="checkbox"/>
<a href="https://github.khronos.org/KTX-Specification/#_keyvalue_data">Key/value data</a></li>
</ul>
<h3 id="example"><a class="doc-anchor" href="#example">§</a>Example</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Crate instance of reader. This validates the header
</span><span class="kw">let </span><span class="kw-2">mut </span>reader = ktx2::Reader::new(file).expect(<span class="string">"Can't create reader"</span>); <span class="comment">// Crate instance of reader.
// Get general texture information.
</span><span class="kw">let </span>header = reader.header();
<span class="comment">// Read iterator over slices of each mipmap level.
</span><span class="kw">let </span>levels = reader.levels().collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;();</code></pre></div>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.BasicDataFormatDescriptor.html" title="struct ktx2::BasicDataFormatDescriptor">Basic<wbr>Data<wbr>Format<wbr>Descriptor</a></div></li><li><div class="item-name"><a class="struct" href="struct.ChannelTypeQualifiers.html" title="struct ktx2::ChannelTypeQualifiers">Channel<wbr>Type<wbr>Qualifiers</a></div></li><li><div class="item-name"><a class="struct" href="struct.ColorModel.html" title="struct ktx2::ColorModel">Color<wbr>Model</a></div></li><li><div class="item-name"><a class="struct" href="struct.ColorPrimaries.html" title="struct ktx2::ColorPrimaries">Color<wbr>Primaries</a></div></li><li><div class="item-name"><a class="struct" href="struct.DataFormatDescriptor.html" title="struct ktx2::DataFormatDescriptor">Data<wbr>Format<wbr>Descriptor</a></div></li><li><div class="item-name"><a class="struct" href="struct.DataFormatDescriptorHeader.html" title="struct ktx2::DataFormatDescriptorHeader">Data<wbr>Format<wbr>Descriptor<wbr>Header</a></div></li><li><div class="item-name"><a class="struct" href="struct.DataFormatFlags.html" title="struct ktx2::DataFormatFlags">Data<wbr>Format<wbr>Flags</a></div></li><li><div class="item-name"><a class="struct" href="struct.Format.html" title="struct ktx2::Format">Format</a></div><div class="desc docblock-short">Known texture formats</div></li><li><div class="item-name"><a class="struct" href="struct.Header.html" title="struct ktx2::Header">Header</a></div><div class="desc docblock-short">Container-level metadata</div></li><li><div class="item-name"><a class="struct" href="struct.Reader.html" title="struct ktx2::Reader">Reader</a></div><div class="desc docblock-short">Decodes KTX2 texture data</div></li><li><div class="item-name"><a class="struct" href="struct.SampleInformation.html" title="struct ktx2::SampleInformation">Sample<wbr>Information</a></div></li><li><div class="item-name"><a class="struct" href="struct.SupercompressionScheme.html" title="struct ktx2::SupercompressionScheme">Supercompression<wbr>Scheme</a></div><div class="desc docblock-short">Known supercompression schemes</div></li><li><div class="item-name"><a class="struct" href="struct.TransferFunction.html" title="struct ktx2::TransferFunction">Transfer<wbr>Function</a></div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.ParseError.html" title="enum ktx2::ParseError">Parse<wbr>Error</a></div><div class="desc docblock-short">Error, that happend when data doesnt satisfy expected parameters.</div></li></ul></section></div></main></body></html>