Jump to content

c++ и директХ -- д3д9


IceBars
 Share

Recommended Posts

Помогите пожалуйста с директ иксом в с++. Нужно правильно описать hwnd(окно) --

#include

#include "C:Documents and SettingsAdministratorDesktopПолезная инфаинфа для прогр-ия2Файлы для СIncluded3d9.h"

#pragma comment (lib, "d3d9.lib").

LPDIRECT3D9 direct3d = NULL;

LPDIRECT3DDEVICE9 device = NULL;

IDirect3D9* ds = Direct3DCreate9(31);

D3DDISPLAYMODE display;

D3DPRESENT_PARAMETERS params;

int main()
{
ds->GetAdapterDisplayMode(0, &display );
ZeroMemory( &params, sizeof(params) );
params.Windowed = TRUE;
params.SwapEffect = D3DSWAPEFFECT_DISCARD;
params.BackBufferFormat = display.Format;
ds->CreateDevice( 0, 1, handle, D3DCREATE_HARDWARE_VERTEXPROCESSING, &params, &device );

std::cout << "Hello world!" << std::endl;
return 0;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy