PDA

View Full Version : d3d on a tpanel



tux
03-10-2004, 06:04 PM
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

http://www.vadertrophy.com/~files/d3d.JPG

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

tux
03-10-2004, 09:16 PM
ive fixed the clipping problem, but my z buffer and screen clearing is still bad :(

also. after loading the .x mesh file, is it possible to get the vertices and save it into my own custom format?

WILL
03-10-2004, 11:20 PM
Hmm... interesting. Well it's much farther with 3D than I've ever gone. I could hardly get a damn 3D box to work. Mind you that was over 5 years ago using Turbo Pascal 7.

tux
03-10-2004, 11:41 PM
hehe. this is the furthest ive got with d3d :) i understand opengl better

Clootie
08-10-2004, 07:36 PM
Have you tried this: Templates (http://clootie.narod.ru/delphi/download_custom.html#D3Dex_Templates) or VCLfullscreenD3D (http://clootie.narod.ru/delphi/download_custom.html#D3Dex_VCLfullscreenD3D)?

This is EXACTLY what you need: Direct3D on a TPanel :) :) :)
(sample uses Summer 2003 SDK D3DFramework).

As for you picture - seems that you are not clearing back buffer (and depth buffer) at start of the frame.