I'm making the transition from directx8 DirectX9.
but a fault, I would appreciate if you could not figure it help thank you.
BUILD ERROR:
------------
HanText.cpp
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(333) : error C2660: 'SetStreamSource' : function does not take 3 parameters
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(558) : error C2660: 'CreateVertexBuffer' : function does not take 5 parameters
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(600) : error C2660: 'CreateTexture' : function does not take 7 parameters
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(607) : error C2660: 'CreateTexture' : function does not take 7 parameters
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(614) : error C2660: 'CreateTexture' : function does not take 7 parameters
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(621) : error C2660: 'CreateTexture' : function does not take 7 parameters
D:\SuddenAttack\Johnson_Code\Johnson_Client\CLIENTSHELLDLL\ClientShellShared\HanText.cpp(953) : error C2660: 'SetStreamSource' : function does not take 3 parameters
ERROR LINE'S:
-------------
bool CSAD3DText::Render()
{
if( !m_pVertexBuffer || !m_ppTexture || !m_pszTextBuffer || m_nTextLen <= 0 ) return true;
int i;
m_pd3dDevice->SetFVF( D3DFVF_TEXT_VERTEX );
m_pd3dDevice->SetStreamSource( 0, m_pVertexBuffer, sizeof(T_TEXT_VERTEX) );
for( i=0 ; i<m_nTextureCount ; ++i )
{
m_pd3dDevice->SetTexture( 0, m_ppTexture[i] );
m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLEFAN, i*4 , 2 );
m_pd3dDevice->SetTexture( 0, NULL );
}
return true;
}
---
hResult = m_pd3dDevice->CreateVertexBuffer( m_nTextureCount*4*sizeof(T_TEXT_VERTEX),
0, D3DFVF_TEXT_VERTEX,
D3DPOOL_MANAGED,
&m_pVertexBuffer );
---
hResult = m_pd3dDevice->CreateTexture( nRight-nLeft, nBottom-nTop, 1, 0,
g_D3DFormat,
D3DPOOL_MANAGED,
&m_ppTexture[nIndex] );
if ( FAILED(hResult) )
{
g_D3DFormat = D3DFMT_A8R8G8B8;
hResult = m_pd3dDevice->CreateTexture( nRight-nLeft, nBottom-nTop, 1, 0,
g_D3DFormat,
D3DPOOL_MANAGED,
&m_ppTexture[nIndex] );
if ( FAILED(hResult) )
{
g_D3DFormat = D3DFMT_A1R5G5B5;
hResult = m_pd3dDevice->CreateTexture( nRight-nLeft, nBottom-nTop, 1, 0,
g_D3DFormat,
D3DPOOL_MANAGED,
&m_ppTexture[nIndex] );
if ( FAILED(hResult) )
{
g_D3DFormat = D3DFMT_R5G6B5;
hResult = m_pd3dDevice->CreateTexture( nRight-nLeft, nBottom-nTop, 1, 0,
g_D3DFormat,
D3DPOOL_MANAGED,
&m_ppTexture[nIndex] );
---
bool CSAD3DTextEx::Render()
{
if( !m_pd3dDevice || !m_pVertexBuffer || !m_ppTexture || !m_pszTextBuffer || m_nTextLen <= 0 ) return true;
int i;
m_pd3dDevice->SetFVF( D3DFVF_TEXT_VERTEX );
m_pd3dDevice->SetStreamSource( 0, m_pVertexBuffer, sizeof(T_TEXT_VERTEX) );
for( i=0 ; i<m_nTextureCount ; ++i )
{
m_pd3dDevice->SetTexture( 0, m_ppTexture[i] );
m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLEFAN, i*4 , 2 );
m_pd3dDevice->SetTexture( 0, NULL );
}
return true;
}