summaryrefslogtreecommitdiff
path: root/engine/src/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/renderer')
-rw-r--r--engine/src/renderer/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs
index 068b8f0..f31196d 100644
--- a/engine/src/renderer/mod.rs
+++ b/engine/src/renderer/mod.rs
@@ -5,11 +5,11 @@ use cstr::cstr;
use glfw::WindowSize;
use crate::object::Object;
+use crate::opengl::buffer::{Buffer, Usage};
#[cfg(feature = "debug")]
use crate::opengl::debug::{MessageSeverity, MessageSource, MessageType};
use crate::opengl::shader::Program as ShaderProgram;
use crate::opengl::vertex_array::{PrimitiveKind, VertexArray};
-use crate::opengl::vertex_buffer::{BufferUsage, VertexBuffer};
use crate::opengl::{clear_buffers, BufferClearMask};
use crate::vector::Vec2;
use crate::vertex::Vertex;
@@ -123,7 +123,7 @@ pub struct Renderable
vertex_arr: VertexArray,
/// Vertex buffer has to live as long as the vertex array
- _vertex_buffer: VertexBuffer,
+ _vertex_buffer: Buffer<Vertex>,
}
impl Renderable
@@ -131,11 +131,11 @@ impl Renderable
pub fn new(shader_program: ShaderProgram, vertices: &[Vertex]) -> Self
{
let vertex_arr = VertexArray::new();
- let vertex_buffer = VertexBuffer::new();
+ let vertex_buffer = Buffer::new();
vertex_arr.bind(|vert_arr_curr_bound| {
vertex_buffer.bind(|vert_buf_curr_bound| {
- VertexBuffer::store(&vert_buf_curr_bound, vertices, BufferUsage::Static);
+ Buffer::store(&vert_buf_curr_bound, vertices, Usage::Static);
VertexArray::configure_attrs(&vert_arr_curr_bound, &vert_buf_curr_bound);
});