54 cubes... and all slow down?

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.

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

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?)