Code Monkey home page Code Monkey logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 13, 2024
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 [email protected] on 17 Nov 2010 at 6:06

from min3d.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 13, 2024
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 [email protected] on 13 Apr 2011 at 4:11

from min3d.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 13, 2024
Please let me know how to make vertices().speculars() too...
Thanks.

Original comment by [email protected] on 1 Aug 2012 at 7:17

from min3d.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 13, 2024
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 [email protected] on 1 Aug 2012 at 10:37

from min3d.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 13, 2024
Thanks, I will see what can I get in your provide URLs.

Original comment by [email protected] on 2 Aug 2012 at 2:35

from min3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.