Very well spotted Mark! I had forgotten that this was allowed - indeed
looks like a possible bug. Let me see if I can produce a test case.

   Jukka


2014-01-31 Mark Callow <[email protected]>:

>  On 2014/01/27 9:49, wolfviking0 wrote:
>
> Hi Jukka I found my trouble,
>
>  the code was :
>
>      m_program = glCreateProgram();
>     if ( !m_program )
>         error::throw_ex("unable to create GLSL program",__FILE__,__LINE__);
>
>     glBindAttribLocation(m_program, 0, "a_position");
>      glBindAttribLocation(m_program, 1, "a_color");
>     glBindAttribLocation(m_program, 2, "a_texCoord0");
>
>      for ( auto it = shaders.begin(); it != shaders.end(); ++it )
>         glAttachShader(m_program, *it);
>
>  As you see the attach shader was call after bindAttrib, if I change the
> order call the attachShader before it's working :)
>
>  Theorically must be work natively, but may be some limitation in webgl,
> anyway thanks for the link
>
>
>  It looks like a bug in the WebGL implementation. The OpenGL ES spec says
> "BindAttribLocation may be issued before any shaders are attached to the
> program object."
>
> Regards
>
>     -Mark
> --
>  注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、
> 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます.
>
> NOTE: This electronic mail message may contain confidential and privileged
> information from HI Corporation. If you are not the intended recipient, any
> disclosure, photocopying, distribution or use of the contents of the
> received information is prohibited. If you have received this e-mail in
> error, please notify the sender immediately and permanently delete this
> message and all related copies.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to