Yes it is normal.
Some info about it:
http://stackoverflow.com/questions/8551935/opengl-es-2-0-specifiying-position-attribute-vec3-or-vec4
On Wednesday, January 9, 2013 10:02:12 AM UTC+1, Fabien R wrote:
>
> On 07/01/2013 20:18, Zoltan Hubai wrote:
> > Hi
> >
> > I need some help with the following problem.
> >
> > I took the hello-gl2 example from the android-ndk and rewrote a bit to
> > suite my needs.
> > The GL2JNIView class is the same except the init function where I added
> > setRenderMode(RENDERMODE_WHEN_DIRTY);
> >
> > In the Render class onSurfaceChanged function I call the native
> > method setupGraphics(int w, int h) (see attached file)
> > In the Render class onDrawFrame function i call the native method void
> > render(jbyteArray bArray) (bArray contains a jpg image with some other
> data)
> >
> >
> Can you show onSurfaceChanged, onSurfaceCreated and onSurfaceCreated ?
> > I'm using the GL2JNIView inside a Fragment that is displayed at user
> > request. The GL2JNIView is created in the Fragments onCreateView and
> added
> > to a FrameLayout.
> >
> Can you show onCreateView ?
> > This all works fine except the first time the Fragment is displayed I
> get
> > the following error:
> >
> >
> You declare the vertices as:
> GLfloat vVertices[] = { -1.0f, 1.0f, 0.0f, // Position 0
>
> And in your vertex shader, you expect:
> static const char gVertexShader[] = "attribute vec4 a_position; \n"
>
> Is it normal ?
>
> -
> Fabien
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en