ofSphere() on iOS

I’ve tryed ofSphere() method on 007 iOS, but nothing can I see on both of iPhone4s and iPhone simulator.
Building is OK.

So, I was wondering It’s not available 007 iOS ? or I’m missing something to write code like in setup() method ?

I just write code in draw() like following…

void testApp::draw(){
ofNoFill();
ofSphere(100, 100, 50, 50);
}

On 007 osx, no problem at all…

Thansk.

ofSphere calls glutsolidsphere and it looks like that is not available on iOS.

This article might help you recreate a sphere for GLES:
http://www.ashley-mills.com/Home/Blog/Entries/2009/4/16-How-to-draw-a-sphere-in-3D----.html

or
http://iphonedevelopment.blogspot.com/2009/05/procedural-spheres-in-opengl-es.html

Though using this does require a bit of toying around to get working, Andreas put together some really nice primitive drawing code that doesn’t rely on the GLUT/GLU functions that you can get here:

https://github.com/andreasmuller/openFrameworks/blob/develop-opengles2/libs/openFrameworks/3d/of3dPrimitives.h

and

https://github.com/andreasmuller/openFrameworks/blob/develop-opengles2/libs/openFrameworks/3d/of3dPrimitives.cpp

You should just be able to drop those in your project somewhere and call them as replacements.

joshua,

Thanks a lot ! I just did use ofSphere using the code you told me.

I will continue trying, anyway.

Thanks a lot !