Speed up gluSphere?

Started by matanui159, March 29, 2014, 01:12:30

Previous topic - Next topic

matanui159

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 :)

Daslee


matanui159

Quote from: Daslee on April 01, 2014, 11:32:42
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 :)

DapperPixpy

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.
Currently working on a 2D game. I plan to have it out in (//TODO: Make time estimation.)

Daslee

Quote from: matanui159 on April 15, 2014, 00:19:06
Quote from: Daslee on April 01, 2014, 11:32:42
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.

matanui159

Guys, I told you:
Quote from: matanui159 on March 29, 2014, 01:12:30
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 :)

DapperPixpy

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.)

Daslee

Quote from: matanui159 on April 15, 2014, 22:58:00
Guys, I told you:
Quote from: matanui159 on March 29, 2014, 01:12:30
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.