![]() |
|
#1
|
|||
|
|||
![]() Помогите создать на Delphi с помощю DirectX сцену с двумя сферами обтянутыми текстурами. Сферы должны загружаться их *.x файла, а текстура правельно ложиться, и свет на них должен падать. А при нажатии мышкой в области одной из сфер, камера приближатя к ней. Знаю для опытным это 30 мин. делов, а я уже целый месяц с лишним мучаюсь, то так, то так, но никак. Сжальтесь. Помогите!
![]() |
#2
|
|||
|
|||
![]() Для создания сферы используем функцию D3DXCreateSphere() из модуля D3DX9:
Код:
//------------------------------------------------------ // D3DXCreateSphere: // ----------------- // Creates a mesh containing a sphere. The sphere is centered at the // origin. // // Parameters: // // pDevice The D3D device with which the mesh is going to be used. // Radius Radius of the sphere (should be >= 0.0f) // Slices Number of slices about the main axis // Stacks Number of stacks along the main axis // ppMesh The mesh object which will be created // ppAdjacency Returns a buffer containing adjacency info. Can be NULL. //-------------------------------------------------------------- function D3DXCreateSphere(ppDevice: IDirect3DDevice9; Radius: Single; Slices, Stacks: LongWord; out ppMesh: ID3DXMesh; ppAdjacency: PID3DXBuffer): HResult; stdcall; external d3dx9shapesDLL; |