Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: opengl slow????when i zoom in it gets incredibly slow...why?

  1. #1
    Guest

    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?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: opengl slow????when i zoom in it gets incredibly 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.

    Bob

  3. #3
    Guest

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    First, Bob, thanx
    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???

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    New Jersey, USA
    Posts
    23

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    How many quads did you have? How large
    are they? How many pixels do they fill
    in total?

    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.

    / Patric

  5. #5
    Guest

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    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

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    New Jersey, USA
    Posts
    23

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    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?

    / Patric

  7. #7
    Guest

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    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 **** i 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
    thx HELP ME!!!!

  8. #8
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    New Jersey, USA
    Posts
    23

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    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.

    / Patric

  9. #9
    Guest

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    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?

  10. #10
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: opengl slow????when i zoom in it gets incredibly slow...why?

    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.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 09-08-2018, 04:53 AM
  2. Replies: 4
    Last Post: 09-29-2017, 09:00 AM
  3. slow in slow out function
    By gbiv in forum OpenGL: General
    Replies: 3
    Last Post: 12-18-2004, 01:31 PM
  4. indexed vertexarrays slow, very slow ?
    By imported_T2k in forum OpenGL: Advanced Coding
    Replies: 13
    Last Post: 02-28-2002, 05:06 PM
  5. sscanf incredibly slow !
    By Morglum in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-23-2001, 03:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean