PDA

View Full Version : 54 cubes... and all slow down?



SiRioKD
05-11-2000, 02:47 PM
I coded my second try in OpenGL.
Drawed 54 Cubes (6 quad faces x cube) texture mapped with an 128x128 texture with lightsource.
When i calc few cubes it rotate speed... when i try to add cubes up to 54 (my code limit) all slow down.

I'm using a MatroxG400 with 16Mb and a Celeron450Mhz, so i think isn't a speed problem.

I've also implemented a C++ class using CPU internal clock instruction (RDTSC...) to obtain an accurate value to know how program weights. With 640x480x32bit (85Hz) fullscreen it uses less than 1/20 of frame.
Maybe a coding/driver problem... or my fast/super/duper video card slow down with 54 cubes (54 x 6 = 324 faces or 648 mapped triangle ?)...

the system slowdown else with only 2 cubes but using a 512x512 texture... maybe a texture mapping failure...

cya.

lgrosshennig
05-11-2000, 10:29 PM
Hm, could it be that you pass down the texture for each face you are drawing?

This will result in 324 transfers of the texture map to your gfx card (some drivers notice that, others not) making things slow as hell.

Look into texture objects to solve this.

Regards,

LG http://www.opengl.org/discussion_boards/ubb/biggrin.gif

SiRioKD
05-12-2000, 02:28 AM
Texture downloading is done only one time.
Every drawing pass i use a "bindtexture" command to select texture and then draw cube...
(is normal that my G400 OpenGL imaplementation doens't support waitVBL?)