[mutter/wip/3-monitors-on-nvidia] fixup! wip! renderer-native-gles3: add function for drawing pixels to egl surface



commit 0549d0367a2adfefc0745a7384fb0762aecf3c8c
Author: Ray Strode <rstrode redhat com>
Date:   Tue Sep 18 16:12:10 2018 -0400

    fixup! wip! renderer-native-gles3: add function for drawing pixels to egl surface

 src/backends/native/meta-renderer-native-gles3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native-gles3.c 
b/src/backends/native/meta-renderer-native-gles3.c
index 8fb53ec0e..9f97ce5dd 100644
--- a/src/backends/native/meta-renderer-native-gles3.c
+++ b/src/backends/native/meta-renderer-native-gles3.c
@@ -277,9 +277,9 @@ meta_renderer_native_gles3_draw_pixels (MetaEgl        *egl,
 
   GLBAS (gles3, glBindBuffer, (GL_ARRAY_BUFFER, vertex_buffer));
   GLBAS (gles3, glEnableVertexAttribArray, (0));
-  GLBAS (gles3, glVertexAttribPointer, (0, 2, GL_FLOAT, GL_FALSE, sizeof (struct vertex), (void *) offsetof 
(struct vertex, position)));
+  GLBAS (gles3, glVertexAttribPointer, (0, sizeof (struct position) / sizeof (float), GL_FLOAT, GL_FALSE, 
sizeof (struct vertex), (void *) offsetof (struct vertex, position)));
   GLBAS (gles3, glEnableVertexAttribArray, (1));
-  GLBAS (gles3, glVertexAttribPointer, (1, 2, GL_FLOAT, GL_FALSE, sizeof (struct vertex), (void *) offsetof 
(struct vertex, texture_coordinate)));
+  GLBAS (gles3, glVertexAttribPointer, (1, sizeof (struct texture_coordinate) / sizeof (float), GL_FLOAT, 
GL_FALSE, sizeof (struct vertex), (void *) offsetof (struct vertex, texture_coordinate)));
   GLBAS (gles3, glDrawElements, (GL_TRIANGLES, G_N_ELEMENTS (triangles) * (sizeof (struct triangle) / sizeof 
(unsigned int)), GL_UNSIGNED_INT, 0));
 
   return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]