Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17063

glBufferSubData() Isn't Updating My VBO

$
0
0

I started learning Rust, and I'm using OpenGL with it for now. I'm able to create and render my VBO just fine, but I can't seem to be able to update my VBO. Here's the function that I use to do that:

#[derive(Debug, Copy, Clone)]
pub enum BufferMode {
    StaticDraw,
    StaticRead,
    StaticCopy,
    DynamicDraw,
    DynamicRead,
    DynamicCopy,
    StreamDraw,
    StreamRead,
    StreamCopy,
}

impl BufferMode {
    pub fn to_raw_enum(&self) -> GLenum {
        match self {
            BufferMode::StaticDraw => gl::STATIC_DRAW,
            BufferMode::StaticRead => gl::STATIC_READ,
            BufferMode::StaticCopy => gl::STATIC_COPY,
            BufferMode::DynamicDraw => gl::DYNAMIC_DRAW,
            BufferMode::DynamicRead => gl::DYNAMIC_READ,
            BufferMode::DynamicCopy => …

Viewing all articles
Browse latest Browse all 17063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>