Open GoogleCodeExporter opened 8 years ago
I was wrong this is not it.
However what i did to make it work was:
if ($o.hasVertexColors() && $o.vertexColorsEnabled()) {
$o.vertices().colors().buffer().position(0);
_gl.glColorPointer(4, GL10.GL_UNSIGNED_BYTE, 0, $o.vertices().colors().buffer());
_gl.glMaterialfv(GL10.GL_FRONT, GL10.GL_SPECULAR, $o.vertices().speculars().floatBuffer(null));
_gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
}
else {
_gl.glColor4f(
(float)$o.defaultColor().r / 255f,
(float)$o.defaultColor().g / 255f,
(float)$o.defaultColor().b / 255f,
(float)$o.defaultColor().a / 255f
);
_gl.glDisableClientState(GL10.GL_COLOR_ARRAY);
}
So now the specular is loaded. I also always enable material (not sure if its
needed)
// Colormaterial
_gl.glEnable(GL10.GL_COLOR_MATERIAL);
/*
_gl.glGetIntegerv(GL10.GL_COLOR_MATERIAL, _scratchIntBuffer);
_scratchB = (_scratchIntBuffer.get(0) != 0);
if ($o.colorMaterialEnabled() != _scratchB) {
if ($o.colorMaterialEnabled())
_gl.glEnable(GL10.GL_COLOR_MATERIAL);
else
_gl.glDisable(GL10.GL_COLOR_MATERIAL);
}
*/
Original comment by tje...@gmail.com
on 17 Nov 2010 at 6:06
I met same trouble.
So please let me know how to make vertices().speculars().
It is not in trunk.
Thank you.
> _gl.glMaterialfv(GL10.GL_FRONT, GL10.GL_SPECULAR,
$o.vertices().speculars().floatBuffer(null));
Original comment by tom...@wh2.fiberbit.net
on 13 Apr 2011 at 4:11
Please let me know how to make vertices().speculars() too...
Thanks.
Original comment by CH.Long...@gmail.com
on 1 Aug 2012 at 7:17
This project is dead since 2011.
You might find libGDX project helpful:
http://libgdx.badlogicgames.com/
http://badlogicgames.com/forum/
http://code.google.com/p/libgdx-users/
http://www.badlogicgames.com/wordpress/?p=2411
Original comment by radiok...@gmx.de
on 1 Aug 2012 at 10:37
Thanks, I will see what can I get in your provide URLs.
Original comment by CH.Long...@gmail.com
on 2 Aug 2012 at 2:35
Original issue reported on code.google.com by
tje...@gmail.com
on 15 Nov 2010 at 10:01