ok, i tried it with the knight sample, and couldn't get it working there either. i am trying to convert ocean shader from rendermonkey samples to horde. here's lines i added to knight Application:init():
Knight Application::init():
Code:
m_waterMaterial = Horde3D::addResource( ResourceTypes::Material, "models/jokulaatikko/Material__25-material.material.xml", 0 );
ResHandle waterRes = Horde3D::addResource( ResourceTypes::SceneGraph, "models/jokulaatikko/jokulaatikko.scene.xml", 0 );
// Load resources
Horde3DUtils::loadResourcesFromDisk( _contentDir.c_str() );
NodeHandle waterNode = Horde3D::addNodes( RootNode, waterRes );
Horde3D::setNodeTransform(waterNode, 30, 0, -20, 0, 0, 0, 1, 1, 1);
m_counter = 0.0f;
couple of variables to App.h:
Code:
class Application
{
private:
float m_counter;
ResHandle m_waterMaterial;
Application::mainLoop() :
Code:
void Application::mainLoop( float fps )
{
Horde3D::setMaterialUniform(m_waterMaterial, "myTime", m_counter, m_counter, m_counter, m_counter);
m_counter += 1.0f;
and here's link to my relevant shaders/ models/ textures/ :
http://www.drugphish.ch/~thok/monkeywater.rar