I'm trying to go over some Shader code at my university, I have forgotten it, and well, Its really confusing, The documentation we have been given is really difficult to read.
Also is there any good beginner tutorials In HLSL that can walk me through the whole thing ?
void RenderScene( float updateTime )
{
// Setup the viewport - defines which part of the back-buffer we will render to (usually all of it)
D3D10_VIEWPORT vp;
vp.Width = BackBufferWidth;
vp.Height = BackBufferHeight;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
vp.TopLeftX = 0;
vp.TopLeftY = 0;
g_pd3dDevice->RSSetViewports( 1, &vp );
//************************************************
// FIRST RENDER PASS - Render scene to texture
// Specify that the scene texture will be the render target in this first pass (rather than the backbuffer), will share the depth/stencil buffer with the backbuffer though
g_pd3dDevice->OMSetRenderTargets( 1, /* MISSING */ , DepthStencilView );
/*MISSING - specify scene texture as render target (variables near top of file)*/
// Clear the texture and the depth buffer
g_pd3dDevice->ClearRenderTargetView( SceneRenderTarget, &AmbientColour.r );
g_pd3dDevice->ClearDepthStencilView( DepthStencilView, D3D10_CLEAR_DEPTH, 1.0f, 0 );
// Prepare camera
MainCamera->SetAspect( static_cast<TFloat32>(BackBufferWidth) / BackBufferHeight );
MainCamera->CalculateMatrices();
MainCamera->CalculateFrustrumPlanes();
// Set camera and light data in shaders
SetCamera( MainCamera );
SetAmbientLight( AmbientColour );
SetLights( &Lights[0] );
// Render entities and draw on-screen text
EntityManager.RenderAllEntities( MainCamera );
//************************************************
I'm really not sure whats to go in OMSSetRenderTarget, it has aweird parameter that has Variable * const *variable which I try replicating with the values I have been given and it returns an error.