View Full Version : opengl slow????when i zoom in it gets incredibly slow...why?
I have a 3d accelerator, and rotating 500
points which are centers of quads which i then texture map+blending. When i zoom out at a certain point and jerks out in speed,
and when i zoom in it gets extermly slow...why?
Thea reason why it's going so slow when you zoom in, is that each quad is covering a large portion of the screen. And if you draw load of large quads, the will overlap and cause immense amounts of overdrawing. This means that each pixels is "drawn" more than once.
First, Bob, thanx http://www.opengl.org/discussion_boards/ubb/smile.gif
Second, the fact that i zoomed in and the quads are bigger, and overlap each other=blending+tex mapping, may lead to some what of a decrease in speed, but the the object doesnt even fill the whole screen, it only fills about half way, does it take so long to do that amount of pixel drawing?plus i have a 3d accel, 8 video ram on it???
How many quads did you have? How large
are they? How many pixels do they fill
If they cover 512x512 pixels each and you
have 500, then your required pixel fill is
512x512x500 = 130 M pixels. If your graphics hardware can do 500 M pixels/s, then it will only be 3.5 FPS -> SLOW!
Texture mapping parameter NEAREST is most likely faster than LINEAR interpolation. But it might only be twice as fast.
plg, thx 4 answering.
i am using about 500 quad so that may infact be the prob, i think a high amount of speed increasment may be achievable using a clipper, but i am not sure how on how to use it...can u perhaps leave a little example how to?
thx HELP ME
Well, to make it faster depends on what you actually tries to do, which I haven't understood. I've made something like it to do Volume Rendering using 3D textures, actually they are animated, so I change the 3D texture between frames (a 4D texture you might say).
In this case I draw N polygons parallell with the viewing plane, then I rotate the 3D volume texture with the texture transformation matrix. I also setup 6 clipping planes which are rotated to line up with the borders of the volume, thus they clip away areas of the polygons not inside the texture.
If you are pixel fill limited you really need to cut down on the area for the polygons. One way is to subdivide the polygons to a finer patch. Then you don't draw the subpolygons for which the texture is empty any way. But this requires you to build a hierarchy of the texture (lower resolution) and decide if a subpolygon can be removed or not.
Of course, DEPTH_TEST should be turned off. Another way is to reduce the number of polygon planes in the first place. But it depends on your goal.
Are you rendering a particle system using textured polygons? Or?
plg, i am doing a p-sys using rotating points, which i then use as centers of quads which are then textured, glEnable(GL_BLEND),glDisable(GL_DEPTHTEST), i didnt understand some of the things u said about polygon subdivision, and the clipping, infact i didnt understand **** http://www.opengl.org/discussion_boards/ubb/smile.gifi hope the info i gave above might suggest a plce for opti but i dont know, since if i am doing blending i wouldnt know where/when to clip, because i need what fits in the screen...
btw, i am newbie=dont know much 3d jargon http://www.opengl.org/discussion_boards/ubb/frown.gif
thx HELP ME!!!!
Sorry if I was to cryptic, didn't mean to.
The problem is fill-rate (pixel filling that is), the only way to come around it is to reduce the number of required pixels to draw. 500 particles is not many, converted to quads it is only 2000 vertices. 30 frames per second would then yeild in 60 000 vertices/s or 15 000 quads/s. Which I don't believe is a problem with modern low-end cards for PCs.
The conclusion is that your quads could be a few triangles (2-10) without becoming transform limited. If these triangles could be arranged so they cover less area of the texture. Say you render a star-shape texture, you have streaks extending to the borders of the texture, but there's a lot of empty space with black-texture. Avoid drawing of those parts. For a circular texture, only PI/4 of the area is used of a quad texture.
Of course you could lower the resolution. This is the ultimate test to verify fill-rate limited applications. Does it get faster when you shrink the window or lower the resolution in full-screen mode.
plg, i chnaged the res and there was somewhat of an increase in speed but that was expected in any case wasn't it?so then i made the number of quad=1000(1000 rotating centers) and again slow as hell, and dont forget i have a 3d card, is this expected?
Even if you have a 3D accelerator, you must accept it. Todays accelerators may be fast, but they do have limitations. If you overdraw that much, I would expect it to be slow. plg said it all in the fourth post. It's all (almost) about fillrate. So it's up to you to decide: lower resolution or less "particles". More particles makes it look better, and if you want it to look better, you usually has to sacrifice speed in one way or another.
Okay, i guess, if that is the final word.
thx bob, and plg
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.