Jump to content
  • Advertisement
Sign in to follow this  

DX UT rendering

This topic is 4481 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing a small engine, for now i can load a mesh and wrote a texture manager and small stuff. I am trying to get it running with DXUT. I have no idea on ID3DXEffect and honestly I do not want to use it at this stage. So All I am doing is the following:
void CALLBACK OnFrameRender( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext )
    HRESULT hr;

    // Clear the render target and the zbuffer 
    V( pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0, 45, 50, 170), 1.0f, 0) );

    // Render the scene
    if( SUCCEEDED( pd3dDevice->BeginScene() ) )
		pd3dDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );
        V( pd3dDevice->EndScene() );

the engine Render will loop through the objects and call their rendering function:
void Object::Render(IDirect3DDevice9* device,Scene * parentScene)
	D3DXMATRIX identityMatrix;
	//device->SetTransform( D3DTS_WORLD, &matWorld );
	device->SetTransform( D3DTS_WORLD, &identityMatrix );
	for(DWORD i =0 ; i < NumMaterials; ++i)
		device->SetMaterial( &pMeshMaterials );
		//get the texture:
		int textureIndex = textureIndices;

I debugged and the Textures returned are the ones I need, still I cannot see anything on the screen. All the samples on DXUT load a DX Effect File and run several passes or something like that. All I want to do is a simple rendering of an object, I do not know the structure of the Effect file so is there a way around it?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!