Hey Mpgh So Today Ive Been Learning The Basics Of D3D And Ive Learned Alot Actually But Ive Been A Bit Stuck !
So Ive Been Making My Projects In Microsoft Visual Basic C++ 2010 And Creating Them As A Win32 Console Application And Im Not Sure If Thats The Right Project I Need To Be Coding D3D In So Please Tell Me If Im Wrong There And Second Of All I Get This Error In My Code :
1>------ Build started: Project: 1, Configuration: Debug Win32 ------
1> 1.cpp
1>c:\d3d tut\1\1\1.cpp(54): error C2660: 'IDirect3DDevice9::Present' : function does not take 3 arguments
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Here Is My Code :

Code:
#include "stdafx.h"
#include <Windows.h>
#include <WindowsX.h>
#include <d3d9.h>

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

LPDIRECT3D9 d3d;
LPDIRECT3DDEVICE9 d3ddev;


void initD3D(HWND hWnd);
void render_frame(void);
void cleanD3D(void);


LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void initD3D(HWND hWnd)
{
	d3d = Direct3DCreate9(D3D_SDK_VERSION);

	D3DPRESENT_PARAMETERS d3dpp;

	ZeroMemory(&d3dpp, sizeof(d3dpp));
	d3dpp.Windowed = true;
	d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
	d3dpp.hDeviceWindow = hWnd;


	d3d->CreateDevice(D3DADAPTER_DEFAULT,
		D3DDEVTYPE_HAL,
		hWnd,
		D3DCREATE_SOFTWARE_VERTEXPROCESSING,
		&d3dpp,
		&d3ddev);
}
HRESULT CreateDevice(
	UINT Adapter,
	D3DDEVTYPE DeviceType,
	HWND hFocusWindow,
	DWORD BehaviourFlags,
	D3DPRESENT_PARAMETERS *pPresentationParameters,
	IDirect3DDevice9**ppReturnedDeviceInterface);

void render_frame(void)
{

	d3ddev->Clear(0,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,40,100),1.0f,0);

	d3ddev->BeginScene();

	d3ddev->EndScene();

	d3ddev->Present(NULL,NULL,NULL);
}

void cleanD3D(void)
{
	d3ddev->Release();
	d3d->Release();
}
That Code Is Supposed To Make This :


Please Help !

Kind Regards

**HACKER**