Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JoGL question

 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I worked on a lot of 3d JoGL stuff before I started designing an infrastructure for a real game, and in these explorations, I flew around 1000's of polygons, lit by several different lights, constantly doing calculations to recalculate the view of the camera as it moved around. It went completely smoothly.

Now, I have about 100 some polygons, but which are much bigger. Anytime I get too near one, performance takes a really sharp and distinct hit. It's fine at a certain distance, but if I take a step closer, it slows down a whole lot. I'm a bit confused.

my init method is as follows:



I'm doing significantly less calculuations with significantly less polygons, so I'm baffled.

Thanks,
Nick
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
things it ain't:

it ain't the lighting- the problem occurs when lighting is deactivated.
it ain't the hint- I changed it to GL_CRUMMY to no avail.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nick George:
it ain't the hint- I changed it to GL_CRUMMY to no avail.


Darn, that would have been my guess.

Well, let's see. Not using GL_NORMALIZE is another classic performance tip; if you're not using glScale(), provide normalized vectors yourself so GL doesn't have to do it. But of course, it doesn't sound like you've got a very high poly count.

Since you were using that particular hint, that suggests you are using textures. Does this stop happening if you turn off texturing altogether? Do you think the performance drop happens at a mipmapping boundry?
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, here's where my patchy understanding of OpenGL becomes a problem: I don't really know what glHint is. It's one of the lines I just took from the NeHe tutorials. I'm not using textures, so that's not a problem, I can both comment out the hint line, or change it to GL_FASTEST without fixing anything. Similarly, commenting GL_NORMALIZE doesn't do anything, but I'll take note that it's better to not use it. It's just a lazy man's line.

Haven't the least idea what a mipmapping boundry is, but I assume it has to do with textures, which I'm not using.

If there's any other part of the program that would be useful to post, let me know. I appreciate any help; I tried to get an account at GameDev.net, but they refuse to email me a password.

Thanks,
Nick
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My display method looks like this:



An example thing in the world has a display method like this:

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm. I'm stumped.

What kind of hardware are we talking about? This isn't GL in software, is it? Software implementations sometimes perform proportional to the number of fragments they have to pump out, so if you're zooming in on something real close so the whole screen is full, that might do it.

Otherwise, I'm actually curious enough to want to try running the thing myself. I have JOGL all set up if you want to just email me a jar of your code.
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. There's quite a bit of code, but I bet a very small portion of it will be relavent to the problem. I cannot answer to whether it's software GL or not, but I know I ran what I would guess to be much more taxing programs without them having this problem.
[ May 14, 2005: Message edited by: Nick George ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic