Patchwork mesa-demos: Fix application demo2

login
register
mail settings
Submitter Yasir Khan
Date Jan. 9, 2014, 1:52 p.m.
Message ID <1389275573-45886-1-git-send-email-yasir_khan@mentor.com>
Download mbox | patch
Permalink /patch/64477/
State New
Headers show

Comments

Yasir Khan - Jan. 9, 2014, 1:52 p.m.
From: Yasir-Khan <yasir_khan@mentor.com>

Simple fix for demo2 application. Pass color array to glColorPointer.

Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>
---
 .../mesa/mesa-demos/fix-demo2-color.patch          |   13 +++++++++++++
 meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb     |    3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch
Ross Burton - Jan. 9, 2014, 1:58 p.m.
The patch is missing signed-off and more importantly upstream-status tags.

Ross

On 9 January 2014 13:52, Yasir Khan <yasir_khan@mentor.com> wrote:
> From: Yasir-Khan <yasir_khan@mentor.com>
>
> Simple fix for demo2 application. Pass color array to glColorPointer.
>
> Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>
> ---
>  .../mesa/mesa-demos/fix-demo2-color.patch          |   13 +++++++++++++
>  meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb     |    3 ++-
>  2 files changed, 15 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch
>
> diff --git a/meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch b/meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch
> new file mode 100644
> index 0000000..34e9994
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch
> @@ -0,0 +1,13 @@
> +diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
> +index 71a1a31..505b474 100644
> +--- a/src/egl/opengl/demo2.c
> ++++ b/src/egl/opengl/demo2.c
> +@@ -35,7 +35,7 @@ static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
> +    }
> +
> +    glVertexPointer(2, GL_FLOAT, 0, v);
> +-   glColorPointer(4, GL_FLOAT, 0, v);
> ++   glColorPointer(4, GL_FLOAT, 0, c);
> +    glEnableClientState(GL_VERTEX_ARRAY);
> +    glEnableClientState(GL_COLOR_ARRAY);
> +
> diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
> index 4bb92f4..225d466 100644
> --- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
> +++ b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
> @@ -14,7 +14,8 @@ DEPENDS = "virtual/libgl glew"
>  SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
>          file://glut.patch \
>          file://egl-mesa-screen-surface-build-fix.patch \
> -        file://egl-mesa-screen-surface-query.patch"
> +        file://egl-mesa-screen-surface-query.patch \
> +       file://fix-demo2-color.patch"
>
>  SRC_URI[md5sum] = "9df33ba69a26bbfbc7c8148602e59542"
>  SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828"
> --
> 1.7.9.5
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch b/meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch
new file mode 100644
index 0000000..34e9994
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/fix-demo2-color.patch
@@ -0,0 +1,13 @@ 
+diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
+index 71a1a31..505b474 100644
+--- a/src/egl/opengl/demo2.c
++++ b/src/egl/opengl/demo2.c
+@@ -35,7 +35,7 @@ static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
+    }
+ 
+    glVertexPointer(2, GL_FLOAT, 0, v);
+-   glColorPointer(4, GL_FLOAT, 0, v);
++   glColorPointer(4, GL_FLOAT, 0, c);
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glEnableClientState(GL_COLOR_ARRAY);
+ 
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
index 4bb92f4..225d466 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
@@ -14,7 +14,8 @@  DEPENDS = "virtual/libgl glew"
 SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
         file://glut.patch \
         file://egl-mesa-screen-surface-build-fix.patch \
-        file://egl-mesa-screen-surface-query.patch"
+        file://egl-mesa-screen-surface-query.patch \
+	file://fix-demo2-color.patch"
 
 SRC_URI[md5sum] = "9df33ba69a26bbfbc7c8148602e59542"
 SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828"