Results 1 to 3 of 3

Thread: Cloning

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2011
    Location
    California
    Posts
    3

    Cloning

    The reusability of vertex data, cloning if you will, is what I am after.

    Given: Vertex Data with positions and normals of one 3d object ( say a cube).
    How do I render in 1 frame:
    3 cubes, in 3 different positions, in 3 different colors.


    I am writing for the Mac iPad and objects will be rendered with ES2.

    Thanks
    Rick Tschudin

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    992

    Re: Cloning

    Draw the same cube with different modelview matrices and different colors.

    Thought, as you use ES2, you have to do it all in a shader.
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  3. #3
    Newbie Frequent Contributor
    Join Date
    Mar 2016
    Posts
    896

    Re: Cloning

    If instead of 3 you want to draw hundreds of copies of a mesh you may want to look into instancing, i.e. glDrawElementsInstanced and friends.
    It probably makes more sense to ask about that on a ES forum though, as I don't know what API ES supports in that area.

Similar Threads

  1. Cloning
    By Rick T in forum OpenGL: macOS
    Replies: 1
    Last Post: 12-21-2011, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean