im trying to create a d3d view on a TPanel and it half works.

basicly what im doing is exactly the same as the first tutorial on clooties site (create contect) but passing Form1.Panel1.Handle to the init. this works but when an object moves, the window isnt cleard properly so it smudges.

also when i close the app and re load it i have the last frame (complete with smudges) on the panel, why? (i am calling the cleanup code on exit)

hers a screenshot of it happening



also its not rendering my car properly (loaded from an xfile) but it loads perfect in the mesh example (except for dodgy lighting)