Skip to content

Commit 33b291d

Browse files
committed
fix: wrong vertex attributes
1 parent beddf73 commit 33b291d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

common/src/main/kotlin/com/lambda/graphics/buffer/VertexPipeline.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class VertexPipeline(
196196
glEnableVertexAttribArray(index)
197197
glVertexAttribPointer(index, attrib.componentCount, attrib.gl, attrib.normalized, stride, pointer)
198198

199-
attrib.size.toLong()
199+
pointer + attrib.size // I'm not sure why there's no accumulator indexed iterator, this cost me many hours
200200
}
201201

202202
// Unbind everything to avoid accidental modification

common/src/main/kotlin/com/lambda/graphics/buffer/vertex/ElementBuffer.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package com.lambda.graphics.buffer.vertex
2020
import com.lambda.graphics.buffer.IBuffer
2121
import com.lambda.graphics.buffer.vertex.attributes.VertexMode
2222
import com.lambda.graphics.gl.kibibyte
23-
import com.lambda.graphics.gl.putTo
2423
import org.lwjgl.opengl.GL30C.*
2524
import java.nio.ByteBuffer
2625

0 commit comments

Comments
 (0)