Difference between revisions of "Tutorial - Setup Horde with SDL"
From Horde3D Wiki
(Updated the code to work with Beta4 and SVN trunk.) |
m (Fixed a few mistakes with the previous update.) |
||
Line 42: | Line 42: | ||
//Sizes the Horde3D View | //Sizes the Horde3D View | ||
− | + | h3dSetupViewport( 0, 0, 800, 600, true ); | |
// Add pipeline resource | // Add pipeline resource | ||
Line 56: | Line 56: | ||
model = h3dAddNodes( H3DRootNode, modelRes ); | model = h3dAddNodes( H3DRootNode, modelRes ); | ||
// Apply animation | // Apply animation | ||
− | h3dSetupModelAnimStage( model, 0, animRes, "", false ); | + | h3dSetupModelAnimStage( model, 0, animRes, 0, "", false ); |
// Add light source | // Add light source | ||
Line 64: | Line 64: | ||
//Sets the lightnodes radius | //Sets the lightnodes radius | ||
− | + | h3dSetNodeParamF( light, H3DLight::RadiusF, 0, 50 ); | |
//Sets the lightnodes Field of view | //Sets the lightnodes Field of view | ||
− | + | h3dSetNodeParamF( light, H3DLight::FovF, 0, 90 ); | |
//Sets the lightnodes ShadowMapCOunt | //Sets the lightnodes ShadowMapCOunt | ||
− | + | h3dSetNodeParamI( light, H3DLight::ShadowMapCountI, 3 ); | |
//Sets the lightnodes ShadowSplitLambda | //Sets the lightnodes ShadowSplitLambda | ||
− | + | h3dSetNodeParamF( light, H3DLight::ShadowSplitLambdaF, 0, 0.9f ); | |
//Sets the lightnodes ShadowMapBias | //Sets the lightnodes ShadowMapBias | ||
− | + | h3dSetNodeParamF( light, H3DLight::ShadowMapBiasF, 0, 0.001f ); | |
//Sets the lightnodes red value | //Sets the lightnodes red value | ||
− | + | h3dSetNodeParamF( light, H3DLight::ColorF3, 0, 0.9f ); | |
//Sets the lightnodes green value | //Sets the lightnodes green value | ||
− | + | h3dSetNodeParamF( light, H3DLight::ColorF3, 1, 0.7f ); | |
//Sets the lightnodes blue value | //Sets the lightnodes blue value | ||
− | + | h3dSetNodeParamF( light, H3DLight::ColorF3, 2, 0.75f ); | |
// Add camera | // Add camera | ||
− | cam = h3dAddCameraNode( | + | cam = h3dAddCameraNode( H3DRootNode, "Camera", pipeRes ); |
// Our While loop | // Our While loop |
Latest revision as of 15:33, 28 June 2010
|
|