Can I use glTranslatef?

This topic contains 5 replies, has 3 voices, and was last updated by  DDd 9 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29561

    cxzeng
    Member

    to move the point/object in OGLES?

    How to use that? Thanks.

    #32225

    cxzeng
    Member

    is there anyone who can answer me? Thanks a lot!

    #32226

    aking
    Member

    You can update the model vertices before you pass them to the vertex shader – or better yet, update them in the vertex shader when setting the gl_Position variable. 

    #32227

    cxzeng
    Member

    Thanks, could you explain more specifically? how to write the shader to show glTranslate()? Thanks a lot!

    #32228

    aking
    Member

    It’s all basic matrix math – maybe you should get a copy of the new OpenGL ES 2.0 book: 

    http://www.amazon.com/OpenGL-ES-2-0-Programming-Guide/dp/0321502795/ref=pd_bbs_1

    Is has some nice example code available at:
    http://www.opengles-book.com/downloads.html

    Unzip the example code and if you look at the Simple_VertexShader.c code in the Chapter_8 directory, you’ll see that uses its own internal ‘esTranslate()’ method to replicate the old ES 1.1 glTranslatef() functionality.  That should be about all you need.

      Adam

    #32229

    DDd
    Member

    Plus one recommendation for that book. It is a very nice book.

    Even though it uses AMD emulator in the examples (same authors as of the book) and not PowerVRs (that i personally consider to be better documented and with a more rich feature set).

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.