PDA

View Full Version : Fast Rendering



Balu
11-18-2003, 10:49 PM
Hi,

I am displaying 50 images on the Screen with the help of texture mapping, and I am selecting one image out of 50. Now I want to rotate the selected image. When i rotate & re render the whole 50 images, the rotation process is verly slowly. How to get the fast rendering? Is there any techniques? Please give answers.

Mazy
11-18-2003, 11:58 PM
It can be that your card cannot handle all 50 images as once on the card tso it has to swap in and out them from system mem. 50 images sounds a bit much, can you really see them all at the same time, in that case they have to be pretty small.

another consideration is to use mipmaps. large images drawn on a small polygon produces alot of cache misses. by using mipmaps those misses can be avoided.

Balu
11-19-2003, 12:12 AM
I am using gluBuild2DMipmaps also. But the rendering process is slow. I have one application, in that the 50 images are rendered at a time, selecting and rotating the images are also fast. How to get the same thing with my application.

AdrianD
11-19-2003, 04:28 AM
displaying 50 textured quads on a screen isn't fast enough ?
you are using textured quads, right?
did you get hw acceleration ?(checkout the vendor/renderer strings, if they say it's "Microsoft GDI generic", there are possible 2 solutions: buy a HW-accelerated card or checkout your opengl-setup code)

Tom Nuydens
11-19-2003, 05:33 AM
... Or make sure you're not calling gluBuild2DMipmaps() for every image for every frame.

-- Tom

Balu
11-19-2003, 07:33 PM
In my OpenGL setup-code the PFD is like this:
int nPixelFormat;

static PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // Size of this structure
1, // Version of this structure
PFD_DRAW_TO_WINDOW | // Draw to Window (not to bitmap)
PFD_SUPPORT_OPENGL | // Support OpenGL calls in window
PFD_GENERIC_FORMAT |
PFD_DOUBLEBUFFER, // Double buffered mode
PFD_TYPE_RGBA, // RGBA Color mode
32, // Want 32 bit color
0,0,0,0,0,0, // Not used to select mode
0,0, // Not used to select mode
0,0,0,0,0, // Not used to select mode
16, // Size of depth buffer
0, // Not used to select mode
0, // Not used to select mode
0, // Not used to select mode
0, // Not used to select mode
0,0,0 }; // Not used to select mode

// Choose a pixel format that best matches that described in pfd
nPixelFormat = ChoosePixelFormat(m_hDC, &pfd);

But i didn't able to get the fast rendering.

Is it possible to increase the rendering speed with wglCreateLayerContext function

[This message has been edited by Balu (edited 11-19-2003).]

Relic
11-20-2003, 01:46 AM
First check if the glGetString(GL_VENDOR) is Microsoft. If yes, check if it changes to your graphics chip vendor if you remove the PFD_GENERIC_FORMAT from you pixelformatdescriptor flags.
wglCreateLayerContext is used to create overlay plane contexts, which you probably won't have, except if you're on a workstation graphics system. You want wglCreateContext, but that has nothing to do with your performance problem.

Balu
11-20-2003, 07:37 PM
When I call glGetString(GL_VENDOR) it gives the string Microsoft Corporation; when I remove the PFD_GENERIC_FOMAT from PFD it gives the same result.

My Graphics Card is Intel810 ,Driver is i81xdnt5.dll OS is Windows 2000. I think the driver supports ARB_Multitexture, but when i run the multitexturing programs this gives the error(ARB_Multitexture is not supported).
In http://www.delphi3d.net/hardware/listreports.php it shows the all the available extensions. But when i call glGetString(GL_EXTENSIONS) it gives "GL_WIN_swap_hint GL_EXT_bgra GL_EXT_paletted_texture" only. What is the problem?

When I run DirectX programs on my machine it runs very fast. How to solve this problem?

Tom Nuydens
11-21-2003, 12:17 AM
Originally posted by Balu:
When I run DirectX programs on my machine it runs very fast. How to solve this problem?

By asking for help on the beginner's forum.

-- Tom

Balu
11-23-2003, 08:29 PM
In my machine the OpenGL info is: Through this config. how to achieve the fast rendering? I have one application in that it displays 50 images very fast. But through my application it is slow. How to solve this? Please give the info.

Driver info
-----------
Driver version 5.12.1.2641
Vendor Microsoft Corporation
Renderer GDI Generic
OpenGL version 1.1.0

Extension lists
---------------
Extensions GL_EXT_bgra
GL_EXT_paletted_texture
GL_WIN_swap_hint
WGL extensions

Implementation specifics
------------------------
Various limitations Max. texture size 1024 x 1024
Max. number of light sources 8
Max. number of clipping planes 6
Max. pixel map table size 65536
Max. display list nesting level 64
Max. evaluator order 30
Point size range 0.500 to 10.000
Point size granularity 0.125
Line width range 0.500 to 10.000
Line width granularity 0.125

Maximum stack depths Modelview matrix stack 32
Projection matrix stack 10
Texture matrix stack 10
Name stack 128
Attribute stack 16

Framebuffer properties Sub-pixel precision bits 3
Max. viewport size 16384 x 16384
Number of auxiliary buffers 0

Balu
11-26-2003, 10:32 PM
How to achieve the better rendering performance with the above config. ?

knackered
11-26-2003, 11:31 PM
Try removing PFD_GENERIC_FORMAT from your PFD structure.
edit] ok you've tried that - try adding PFD_GENERIC_ACCELERATED to it.
Try installing the latest drivers, then if that doesn't work, go to the beginners forum like Tom says.

[This message has been edited by knackered (edited 11-27-2003).]