hi,i want to write a program to make the user interface into 3D world,but my program runs not as fast as i want.
sorry,i’m not good at English.
my program runs under linux + Xwindow,the source is here: http://download.gro.clinux.org/myworld/my3dgui-0.1_1.7.tar.gz
the demo is here: http://download.gro.clinux.org/myworld/my3dgui_demo_1-0.1_1.7.tar.gz
need glut
Here ,i am chinese too.Nice to meet you
But I think your post is a little too broad to answer ,people here tend to answer more specific problem,usually not code/bug analysis .
The
Red book page 678 has peformance tips like use glcalllist ,something like that that i don’t repeat here.
Give it look and Good Luck
For the gllist all you have to do is:
Glcalllist ListNumber, GL_COMPILE
DrawModel()
GlEndList
that will save the rendereing information inside OpenGL
then when you run the program and want to draw that list you call
GlCalllist ListNumber
Thats it, real easy, and it made my programs jump from 5 FPS to 60 FPS
thank you all ~~
and i want to do frustum culling , how ?
culling is very simple (now i just have to remeber how to do it…)
to enable first call, glEnable GL_CULLFACE
then call glCullFace and then the method; either front and back, front, or back
3q,but this is just back face culling,how about the object culling ?
google with the keywords “view-frustum culling” gave this interessting link:
http://www.cg.tuwien.ac.at/studentwork/CESCG/CESCG-2002/DSykoraJJelinek/
I think it explains in detail what you are looking for.
Jan.
…
i’m a Chinese and my English is not good
so many English words … my god …