[Mesa-dev] mesa-demos: Fixes a bug in demo2 application

Submitted by Yasir Khan on Jan. 13, 2014, 1:31 p.m.

Details

Message ID 1389619894-43444-1-git-send-email-yasir_khan@mentor.com
State New
Headers show

Not browsing as part of any series.

Commit Message

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

Vertices array is being passed to glColorPointer whereas
its supposed to pass the color array

Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>

Patch hide | download patch | download mbox

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);
 

Comments

On 01/13/2014 05:31 AM, Yasir Khan wrote:
> From: Yasir-Khan <yasir_khan@mentor.com>
>
> Vertices array is being passed to glColorPointer whereas
> its supposed to pass the color array
>
> Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>
>
> 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);
>


Reviewed-by: Brian Paul <brianp@vmware.com>

I presume you need someone to push this for you?

-Brian