Hello Guest

Speed up gluSphere?

  • 7 Replies
  • 9846 Views
*

Offline matanui159

  • *
  • 30
  • KABOOM
Speed up gluSphere?
« on: March 29, 2014, 01:12:30 »
When I create large detailed spheres with gluSphere the frame-rate drops (as expected).
So I thought I could put it into a VBO...

But I don't know how to make my own sphere (and I don't plan to either) and I can't get the vertex and texture points from gluSphere.

I have been reading up about Display Lists... Will these make it faster? Is it a problem if it is deprecated?
If not what is something that will speed it up?

Thanks in advance
ALGORITHM
A word used by programmers when they do not want to explain what they did.

WEE :)

*

Offline Daslee

  • ***
  • 126
Re: Speed up gluSphere?
« Reply #1 on: April 01, 2014, 11:32:42 »

*

Offline matanui159

  • *
  • 30
  • KABOOM
Re: Speed up gluSphere?
« Reply #2 on: April 15, 2014, 00:19:06 »
http://www.glprogramming.com/red/chapter02.html#name8 this page should help you.

Sorry but I can't really see how that can help. There's a lot of stuff on that page and that #name8 doesn't seem to scroll down
ALGORITHM
A word used by programmers when they do not want to explain what they did.

WEE :)

Re: Speed up gluSphere?
« Reply #3 on: April 15, 2014, 07:29:19 »
A quick search on Google popped up with a quick and easy pseudo-code example of sphere generation on the OpenGL forum.
https://www.opengl.org/discussion_boards/showthread.php/159584-sphere-generation
And here's a nice tutorial if you want to texture it (Should be relative easy to port.)
http://www.opengl.org/wiki/Texturing_a_Sphere

Although I do recommend you read more into Daslee's link as it's got an explanation as to how it works. (Hell, I bookmarked it.)
If it doesn't scroll down, Ctrl+F "Some Hints for Building Polygonal Models of Surfaces". It's the bottom one.
On the topic of DisplayLists, It's not recommended to use anything deprecated, however it shouldn't be a problem.
« Last Edit: April 15, 2014, 07:43:08 by DapperPixpy »
Currently working on a 2D game. I plan to have it out in (//TODO: Make time estimation.)

*

Offline Daslee

  • ***
  • 126
Re: Speed up gluSphere?
« Reply #4 on: April 15, 2014, 10:00:03 »
http://www.glprogramming.com/red/chapter02.html#name8 this page should help you.

Sorry but I can't really see how that can help. There's a lot of stuff on that page and that #name8 doesn't seem to scroll down

Scroll till you see "Some Hints for Building Polygonal Models of Surfaces". This article should really help you. I've already made sphere with uv mapping in vbo rendering mode by reading this article.

*

Offline matanui159

  • *
  • 30
  • KABOOM
Re: Speed up gluSphere?
« Reply #5 on: April 15, 2014, 22:58:00 »
Guys, I told you:
But I don't know how to make my own sphere (and I don't plan to either)...

So stop giving me links to "how to make a sphere" >:(
ALGORITHM
A word used by programmers when they do not want to explain what they did.

WEE :)

Re: Speed up gluSphere?
« Reply #6 on: April 15, 2014, 23:16:04 »
You've gotta make a sphere to put it into a VBO. (Which is, at the moment, the fastest way of drawing, and "speeding up" the functionality of gluSphere)
As you said, you could put it into a DisplayList. But again, it's deprecated, and not encouraged. However it should be faster than using regular glVertex(..)
Currently working on a 2D game. I plan to have it out in (//TODO: Make time estimation.)

*

Offline Daslee

  • ***
  • 126
Re: Speed up gluSphere?
« Reply #7 on: April 16, 2014, 12:32:05 »
Guys, I told you:
But I don't know how to make my own sphere (and I don't plan to either)...

So stop giving me links to "how to make a sphere" >:(

So google for glusphere source code if you are too lazy to read the article.