How to find the correct scale

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

How to find the correct scale

Postby raich » Wed Feb 24, 2010 7:50 pm


I'm trying to draw rectangles on the camera screen.

I've drawn a rectangle defined by:

float myVertices1 []= {
-0.0625f, -0.5f, 0.0f,
0.0625f, -0.5f, 0.0f,
-0.0625f, 0.5f, 0.0f,
0.0625f, 0.5f, 0.0f

with indices:
byte indices[] = { 0,1,2, 2,3,1};

and scale is set to:


With the above values I can clearly see the rectangle.

Now I have to draw another rectangle where vertices are very close:

float myVertices1 []= {
-0.33969933f, 0.20863467f, 0.0f,
-0.33968616f, 0.20865479f, 0.0f,
-0.33969933f, 0.20868467f, 0.0f,
-0.33968616f, 0.20870478f, 0.0f

In order to see the rectangle I have to definitely change the scale value. But how much?

I'm doing some trail and error - without any success.
Thanking you all in advance

Posts: 2
Joined: Fri Feb 19, 2010 11:57 pm


Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests