mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +00:00
Make IndexBuffer::as_bytes
public (#2338)
This commit is contained in:
parent
a8ca0a7f7f
commit
59d7c816fe
@ -995,6 +995,7 @@ pub enum IndexBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl IndexBuffer {
|
impl IndexBuffer {
|
||||||
|
/// Returns an `IndexType` value corresponding to the type of the buffer.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn index_type(&self) -> IndexType {
|
pub fn index_type(&self) -> IndexType {
|
||||||
match self {
|
match self {
|
||||||
@ -1004,8 +1005,9 @@ impl IndexBuffer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the buffer reinterpreted as a buffer of bytes.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn as_bytes(&self) -> &Subbuffer<[u8]> {
|
pub fn as_bytes(&self) -> &Subbuffer<[u8]> {
|
||||||
match self {
|
match self {
|
||||||
IndexBuffer::U8(buffer) => buffer.as_bytes(),
|
IndexBuffer::U8(buffer) => buffer.as_bytes(),
|
||||||
IndexBuffer::U16(buffer) => buffer.as_bytes(),
|
IndexBuffer::U16(buffer) => buffer.as_bytes(),
|
||||||
|
Loading…
Reference in New Issue
Block a user