[Solved]createSphere: Doesn't work with much Segments/Rings?

Problems building or running the engine, queries about how to use features etc.
Post Reply
Baalzamon
Gnoblar
Posts: 16
Joined: Sun Nov 27, 2005 11:23 am

[Solved]createSphere: Doesn't work with much Segments/Rings?

Post by Baalzamon »

Hi there,

I wanted to manually build up a simple sphere with Ogre, so used the Code-Snippet from the wiki, which I used out-of-the-box:

Now, everything is fine, as long as my Rings and Segments count isn't greater than 256. For Values greater than that, I only get a spherical cap. :(

Image

Anyone experienced similiar problems with this Code Snippet?
Help would be appreciatetd. :)
Last edited by Baalzamon on Fri Jun 06, 2008 2:22 pm, edited 1 time in total.
User avatar
manowar
Orc
Posts: 419
Joined: Thu Apr 07, 2005 2:11 pm
Location: UK
Contact:

Post by manowar »

I guess because it reaches the maximum indices when using 16bits indices and you get more than 65536 vertices in the sphere.
Baalzamon
Gnoblar
Posts: 16
Joined: Sun Nov 27, 2005 11:23 am

Post by Baalzamon »

Thanks for the Hint.

I changed the IndexType to 32 bit, adjusted the pointers and it works like a charm. :)

Again thank you for that really quick help.
Post Reply