Replaced Vertex struct with Vector class

This commit is contained in:
2019-02-20 11:00:42 -06:00
parent 7b903fbdb9
commit a6e175d9e0
6 changed files with 59 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ class IMICFPS
# Allocate arrays for future use
@vertex_array_id = nil
buffer = " " * 4
glGenVectorArrays(1, buffer)
glGenVertexArrays(1, buffer)
@vertex_array_id = buffer.unpack('L2').first
# Allocate buffers for future use
@@ -101,9 +101,9 @@ class IMICFPS
end
def populate_arrays
glBindVectorArray(@vertex_array_id)
glBindVertexArray(@vertex_array_id)
glBindBuffer(GL_ARRAY_BUFFER, @vertices_buffer)
glBindVectorArray(0)
glBindVertexArray(0)
glBindBuffer(GL_ARRAY_BUFFER, 0)
end