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

12-11-2013, 10:47 PM
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!

12-13-2013, 12:58 AM
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.