summaryrefslogtreecommitdiff
path: root/engine/src/renderer/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/renderer/mod.rs')
-rw-r--r--engine/src/renderer/mod.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs
index bbcb5e9..364b7f4 100644
--- a/engine/src/renderer/mod.rs
+++ b/engine/src/renderer/mod.rs
@@ -4,12 +4,12 @@ use std::process::abort;
use glfw::WindowSize;
use crate::renderer::vertex_array::{PrimitiveKind, VertexArray};
-use crate::renderer::vertex_buffers::{BufferUsage, VertexBuffers};
+use crate::renderer::vertex_buffer::{BufferUsage, VertexBuffer};
use crate::vector::Vec2;
use crate::vertex::Vertex;
mod vertex_array;
-mod vertex_buffers;
+mod vertex_buffer;
pub fn initialize(window: &glfw::Window) -> Result<(), Error>
{
@@ -56,7 +56,7 @@ pub struct Renderable
vertex_arr: VertexArray,
/// Vertex buffer has to live as long as the vertex array
- _vertex_buffer: VertexBuffers<1>,
+ _vertex_buffer: VertexBuffer,
}
impl Renderable
@@ -67,11 +67,9 @@ impl Renderable
vertex_arr.bind();
- let vertex_buffer = VertexBuffers::<1>::new();
+ let vertex_buffer = VertexBuffer::new();
- vertex_buffer
- .store(0, vertices, BufferUsage::Static)
- .unwrap();
+ vertex_buffer.store(vertices, BufferUsage::Static);
VertexArray::configure_attrs();