Skip to content

Commit 4e6aae3

Browse files
committed
Fix default vertex formats;
1 parent b9f79c8 commit 4e6aae3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/modules/graphics/graphics.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ bool lovrGraphicsInit(GraphicsConfig* config) {
805805

806806
state.vertexFormats[VERTEX_SHAPE] = (gpu_vertex_format) {
807807
.bufferCount = 2,
808-
.attributeCount = 5,
808+
.attributeCount = 6,
809809
.bufferStrides[0] = sizeof(ShapeVertex),
810810
.attributes[0] = { 0, 10, offsetof(ShapeVertex, position), GPU_TYPE_F32x3 },
811811
.attributes[1] = { 0, 11, offsetof(ShapeVertex, normal), GPU_TYPE_F32x3 },
@@ -817,7 +817,7 @@ bool lovrGraphicsInit(GraphicsConfig* config) {
817817

818818
state.vertexFormats[VERTEX_POINT] = (gpu_vertex_format) {
819819
.bufferCount = 2,
820-
.attributeCount = 5,
820+
.attributeCount = 6,
821821
.bufferStrides[0] = 12,
822822
.attributes[0] = { 0, 10, 0, GPU_TYPE_F32x3 },
823823
.attributes[1] = { 1, 11, 0, GPU_TYPE_F32x4 },
@@ -829,7 +829,7 @@ bool lovrGraphicsInit(GraphicsConfig* config) {
829829

830830
state.vertexFormats[VERTEX_GLYPH] = (gpu_vertex_format) {
831831
.bufferCount = 2,
832-
.attributeCount = 5,
832+
.attributeCount = 6,
833833
.bufferStrides[0] = sizeof(GlyphVertex),
834834
.attributes[0] = { 0, 10, offsetof(GlyphVertex, position), GPU_TYPE_F32x2 },
835835
.attributes[1] = { 1, 11, 0, GPU_TYPE_F32x4 },
@@ -841,7 +841,7 @@ bool lovrGraphicsInit(GraphicsConfig* config) {
841841

842842
state.vertexFormats[VERTEX_MODEL] = (gpu_vertex_format) {
843843
.bufferCount = 2,
844-
.attributeCount = 5,
844+
.attributeCount = 6,
845845
.bufferStrides[0] = sizeof(ModelVertex),
846846
.attributes[0] = { 0, 10, offsetof(ModelVertex, position), GPU_TYPE_F32x3 },
847847
.attributes[1] = { 0, 11, offsetof(ModelVertex, normal), GPU_TYPE_SN10x3 },
@@ -853,7 +853,7 @@ bool lovrGraphicsInit(GraphicsConfig* config) {
853853

854854
state.vertexFormats[VERTEX_EMPTY] = (gpu_vertex_format) {
855855
.bufferCount = 2,
856-
.attributeCount = 5,
856+
.attributeCount = 6,
857857
.attributes[0] = { 1, 10, 0, GPU_TYPE_F32x3 },
858858
.attributes[1] = { 1, 11, 0, GPU_TYPE_F32x3 },
859859
.attributes[2] = { 1, 12, 0, GPU_TYPE_F32x2 },

0 commit comments

Comments
 (0)