OpenGL ugh

I toyed around with some extremely basic openGL code today. My first impression of openGL is ~ugh~ I don’t like anything about it. It feels very archaic, overly difficult. I wanted to use touch to rotate a 3D cube, but something as seemingly simplistic as that requires 500 lines of code in just 1 class. I didn’t feel like diving into that especially when I just wanted to toy around.

I did learn one neat trick, something I want to remember. Using system time to rotate a 3D cube.

(also learned to use system time to conserve cpu power)


long time = SystemClock.uptimeMillis() % 4000L;
 float angle = .090f * ((int)time);
 gl.glRotatef(angle, 1, 0, 1);




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s