Generic-user-small John Brewer 1 post

I’m having some trouble with the OpenGL example. I’ve verified that I’ve got things working as far as the glClear (by changing the glClearColor), but I can’t get the cube to draw.

I’m running on Mac OS 10.5.2, in case that makes a difference.

 
Burnette_ed_small Ed Burnette 20 posts

Thanks for reading. There are a couple of things you can try to figure this out. First, see if you got any error messages in the LogCat view of Eclipse (or run “adb logcat” if you’re not using Eclipse). Run the program while viewing the log messages and look for any warnings, errors, or crashes that scroll by.

If that doesn’t help, try downloading the finished version from http://www.pragprog.com/titles/eband/source_code and verify that works, then compare it against your version. If I left out something in the instructions in the book that tripped you up, let me know. If the downloaded version does not work for you on the Mac then that’s a different problem I’ll need to investigate.

Let me know how it goes,
—Ed

 
Burnette_ed_small Ed Burnette 20 posts

I just noticed that the source code zip wasn’t updated with the last beta, so the OpenGL example doesn’t appear there yet. I’ll check with the publisher to get that fixed.

 
Adamhoughton_small Adam Houghton 1 post

I grabbed the source code download that Ed referenced, which now contains the OpenGL example. I ran it from Eclipse and saw the cube correctly (rotating & semi-transparent). I’m running Mac OS X 10.3 on a Core Duo Intel Mac.

Here’s my log from Eclipse:
[2008…- OpenGL] Android Launch!
[2008…- OpenGL] adb is running normally.
[2008…- OpenGL] Launching: org.example.opengl.OpenGL
[2008…- OpenGL] Automatic Target Mode: launch emulator.
[2008…- OpenGL] Launching a new emulator.
[2008…- OpenGL] New emulator found: emulator-tcp-5555
[2008… – OpenGL] HOME is up on device ‘emulator-tcp-5555’
[2008…- OpenGL] Pushing OpenGL.apk to /data/app on device ‘emulator-tcp-5555’
[2008…- OpenGL] Starting activity on device: org.example.opengl.OpenGL
[2008…- OpenGL] ActivityManager: Starting: Intent { comp={org.example.opengl/org.example.opengl.OpenGL} }

4 posts, 3 voices