large staticimage question!

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

large staticimage question!

Postby bigbearzhujun » Wed Mar 29, 2006 07:22

hi, i am a freshman to CEGUI. When i use an image file in demo4 and 6 which is 512x512 large for my background staticimage, the fps is 70, but when i change it to an 800x600 image, the fps decrease to 20. If the image size is 513x513, the fps is still 20. I don't think my pc is so slow.
I found on internet that maybe the image for D3D should not be larger than 512x512, it is too small for a 2d game background! Is there some solution?

Has someone met this problem? How can I increase the speed?Thanks! :wink:

Wolfman
Just popping in
Just popping in
Posts: 3
Joined: Tue Mar 28, 2006 22:39

Postby Wolfman » Wed Mar 29, 2006 09:16

Maybe the image has to be the Power of 2 size.

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

Postby bigbearzhujun » Wed Mar 29, 2006 09:56

hi wolfman, thanks, but i have test a image size 511x511 or 384x600, the fps can be 70.

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

Postby bigbearzhujun » Wed Mar 29, 2006 10:00

or maybe somebody else can take a test like this:
run the demo4 or 6 or 7, record the fps. Then change the background staticimage to a 800x600 size pic or some image size larger than 512x512 and compare the two fps value. I want to know how it happens on other's pc. :P

User avatar
baxissimo
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Feb 22, 2005 08:04
Location: Tokyo, JAPAN
Contact:

Postby baxissimo » Wed Mar 29, 2006 23:50

hi wolfman, thanks, but i have test a image size 511x511 or 384x600, the fps can be 70.


If CEGUI is rounding dimensions up to to the nearest power of 2 (which I think is how it deals with non-power-of-two textures) then 511x511 allocates a 512x512 texture; 384x600 allocates a 512x1024 texture. But your 800x600 leads to a 1024x1024 texture. If your card doesn't have much texture memory to begin with that could certainly put you over the limit, causing texture thrashing, and pitiful performance.

How much texture mem do you have on your card?[/quote]

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

Postby bigbearzhujun » Thu Mar 30, 2006 03:03

my graphic card is INTEL(R) 82852/82855 GM/GME GRAPHICS Controller, this is its 2D/3D feature:

Intel® 82852/82855 Graphics Controller Family
What 2D/3D graphics features are supported?



The graphics/video features are divided into two sections:

3D Graphics Features
2D Graphics Features
3D Graphics Features
Full OpenGL* 1.3 ICD (Installable Client Driver)
Direct X 7.x, 8.x, & 9.x Support
32 bpp True Color 3D Support
Allows for high quality textures and rendering
3D Performance Features
133MHz Core Graphics Clock
Support for DDR SDRAM memory improves 3D video memory performance
DDR SDRAM gives a large performance boost in 3D, which is even noticeable between PC1600 and PC2100 memory.
Since the frame buffer, depth buffer, and textures must all share memory bandwidth, increasing the bandwidth gives large gains in 3D performance.
Zone Rendering Technology (Intel Extreme Graphics Driver PV12.1 and later)
Renders the 3D scene in pieces to reduce the required memory bandwidth for a given scene
3D Setup and Render Engine
Triangles, Strips, and Fans
Pixel Accurate Fast Scissoring and Clipping Operation
Backface Culling
Anti-aliased Lines (OpenGL only)
Sprite Points
Texture Engine
Up to 4 Textures / Pixel on a Single Pass
Up to 2048x2048 Texture Size ~~~~~~~~~~~~~~~~~~~~~~~~~~~here!
Per Pixel Perspective Corrected Texture Mapping
Single Pass Texture Compositing
12 Level of Detail MIP Map Sizes from 1x1 to 2Kx2K
All Texture Formats Including 32-bit RGBA and 8-bit Paletted
Alpha and Luminance Maps
Texture ColorKeying/ChromaKeying
Bilinear, Trilinear MIP-Mapped Filtering
Anisotropic Filtering
High quality views of oblique surfaces
Cubic Environment Reflection Mapping
Embossed and Environment (DOT3) Bump-Mapping
Models realistic surface details
Compressed Textures
Rasterization Features
Flat & Gouraud Shading
Color Alpha Blending for Transparency
Vertex and Programmable Pixel Fog and Atmospheric Effects
Color Specular Lighting
Line and Full-Scene Anti-aliasing
16-bit and 24-bit Z and W Buffering
High precision depth buffer increases overall scene quality
8-bit Stencil Buffering
Often used for shadows
Double and Triple Render Buffer Support
16-bit and 32-bit Color
Transparency / Translucency (alpha blending)
Effects like force fields, flames, and plasma beams
Destination Alpha
Fast Clear Support
2D Graphics Features
32 bpp True Color 2D Support
256-bit pattern fill and BLT Engine Performance
Programmable 3-Color Transparent Cursor
Color Space Conversion
GDI+* Feature Support
Anti-aliased Lines
Alpha Blended Cursor
Anti-aliased Text
Alpha Stretch Blitter
8-bit, 16-bit and 32-bit Color
Video
Dynamic Bob and Weave Support for Video Streams
SyncLock* Display and TV-out encoders to video source
Video Overlay
Single High Quality Scalable Overlay
Multiple Overlay Functionality Provided via Stretch Blitter
5-tap Horizontal, 3-tap Vertical Filtered Scaling
Independent Gamma Correction
Independent Brightness/Contrast/Saturation
Independent Tint/Hue Support
Destination Colorkeying
Source Chromakeying

//////////////////////////////////////////////////////////////////////////////////
I think the supported max texture size can not show what the performance will be when use different size images.
I don't know how large my texture mem size is. Is there some way to so increase the mapping speed in this problem with cegui engine?
Last edited by bigbearzhujun on Thu Mar 30, 2006 03:10, edited 1 time in total.

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

Postby bigbearzhujun » Thu Mar 30, 2006 03:07

Should i split the image to 4 small tiles and their size is small enough? But how can i use them in a staticimage? I appreciate for some advice and suggestion. :P

User avatar
baxissimo
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Feb 22, 2005 08:04
Location: Tokyo, JAPAN
Contact:

Postby baxissimo » Thu Mar 30, 2006 05:14

bigbearzhujun wrote:Should i split the image to 4 small tiles and their size is small enough? But how can i use them in a staticimage? I appreciate for some advice and suggestion. :P


I dunno about that, but one approach would be to use an image editing program to shrink your 800x600 image down to a 512x512. Then display it at 800x600. --- if staticimage supports displaying at a different resolution from the source resolution.

That's basically what happens with the background image in the demos. The actual image is 512x512 but it gets stretched to whatever the screen size happens to be.

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

Postby bigbearzhujun » Thu Mar 30, 2006 10:56

......it's not a best solution. low resolution will make the background image unclear.

bigbearzhujun
Just popping in
Just popping in
Posts: 7
Joined: Wed Mar 29, 2006 03:08

Postby bigbearzhujun » Fri Mar 31, 2006 15:08

I solved this problem! My graphic card's driver was from the WinXP sp2 CD. I updated it to a new one, the fps became to 90! 8) Thanks every one!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sun Apr 02, 2006 09:04

:lol:


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests