Hello.
We have strange upload times of dynamic textures (videos) using h3dmap/unmapstream functionality on Nvidia cards. No matter the size of the uploaded texture (from 400*400 up to 1920*1080), it takes about 12-17 ms to upload. Tested on 3 machines with Nvidia cards: Core 2 Quad 2.66, GeForce 250, XP sp3; Xeon Quad, GeForce 275, XP sp3; Notebook Core 2 Duo 2.53, GeForce 240, Win 7. Used different versions of drivers, from rather old to latest.
Our architecture is the following:
In main horde loop:
Code:
...
video.UpdateVideo();
// Render scene
h3dRender( _cam );
// Finish rendering of frame
h3dFinalizeFrame();
// Remove all overlays
h3dClearOverlays();
// Write all messages to log file
h3dutDumpMessages();
Logger->WriteLog();
In UpdateVideo:
-Check for updating the dynamic texture in horde
-Upload new texture to horde.
Time is checked before h3dmapResStream and after unmapResStream, as well as in the check procedure. The most interesting part is that most of the time the difference between the time after texture uploading and the time of check for uploading of the next video frame is about 1-7 ms. That means that horde somehow manages to render the whole frame in about 3-4ms (h3dRender, Finalize, DumpMessages, swap buffers in glfw and go on to the next loop).
Any ideas how to fix the uploading times? Our scene is not very complex, and we use 8x MSAA (forward lighting) and v-sync. This gives us steady 60fps when not playing videos.
On old P4 3Ghz, ATI x1950 Pro, XP sp3 uploading times are 3-5ms.