Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: OpenGL ES - set the width, height, depth of an object in 3D

  1. #1
    Newbie Newbie
    Join Date
    Dec 2013
    Posts
    1

    OpenGL ES - set the width, height, depth of an object in 3D

    I would like to ask about OPENGL ES for android, I want to build a wall with specific width, height, and depth :

    public void buildingW(float width, float height, float depth)

    in order to place into my program, anyone can suggest me the ideas how to do this ?

    Is there anyway to build one obj file then read it ? or we can draw it directly?

    Thank you very much!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,109
    One way to construct a wall is to define a cube of unit size (ie 1x1x1) with its center at the origin. Now you can draw any wall by apply a scaling, rotation and translation matrix to the mesh for the cube and them render it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •