Here's the source that matters I think, my World class:
using System;
using System.Collections.Generic;
using System.Text;
using MTV3D65;
using System.Windows.Forms;
namespace game_v1
{
internal class World
{
private Core core;
private TVTextureFactory textureFactory;
private TVLightEngine lights;
private TVAtmosphere atmosphere;
private Water water;
public static readonly string PATH_SKYBOX = Core.PATH_MEDIA + @"Skybox\";
public World(Core core)
{
this.core = core;
textureFactory = new TVTextureFactory();
lights = new TVLightEngine();
atmosphere = new TVAtmosphere();
}
public void init()
{
initSkyBox();
initWater();
}
private void initSkyBox()
{
int front, back, right, left, up, down;
back = textureFactory.LoadTexture(PATH_SKYBOX + "Clouds_NegX.dds");
down = textureFactory.LoadTexture(PATH_SKYBOX + "Clouds_NegY.dds");
left = textureFactory.LoadTexture(PATH_SKYBOX + "Clouds_NegZ.dds");
front = textureFactory.LoadTexture(PATH_SKYBOX + "Clouds_PosX.dds");
up = textureFactory.LoadTexture(PATH_SKYBOX + "Clouds_PosY.dds");
right = textureFactory.LoadTexture(PATH_SKYBOX + "Clouds_PosZ.dds");
atmosphere.SkyBox_Enable(true);
atmosphere.SkyBox_SetTexture(front, back, left, right, up, down);
atmosphere.SkyBox_SetScale(5, 5, 5);
}
private void initWater()
{
#region SETTINGS
TV_2DVECTOR NormalMapTiling = new TV_2DVECTOR(32, 32);
int ReflectionSurfaceSquareSize = 384;
Water.NormalMapMode NormalMapMode = Water.NormalMapMode.VolumeMap;
String VolumeNormalMapTexturePath = "VolumeNormalMap.512.dds";
String NormalMapTexturePath = "DualLookupNormalMap.512.VolumeSlice.dds";
bool ParallaxMapping = true;
bool DetailNormalMapping = true;
bool TroubledWaterEnhancements = true;
bool FoamSprays = true;
bool LyonBlinnSpecularReflection = false;
TV_COLOR skyAverageColor = new TV_COLOR(0.5f, 0.62f, 0.77f, 1);
#endregion
water = new Water(core, new TV_3DVECTOR(0, 40, 0), new TV_3DVECTOR(4096, 0, 4096), NormalMapTiling, ReflectionSurfaceSquareSize);
int normalMapTexId;
if(NormalMapMode == Water.NormalMapMode.VolumeMap)
normalMapTexId = textureFactory.LoadVolumeTexture(Water.PATH_WATER + VolumeNormalMapTexturePath, "WaterNormalMap", CONST_TV_COLORKEY.TV_COLORKEY_USE_ALPHA_CHANNEL, true);
else
normalMapTexId = textureFactory.LoadTexture(Water.PATH_WATER + NormalMapTexturePath, "WaterNormalMap");
water.Initialize(NormalMapMode, normalMapTexId, ParallaxMapping,
DetailNormalMapping,TroubledWaterEnhancements,
FoamSprays, LyonBlinnSpecularReflection);
if(TroubledWaterEnhancements)
water.SkyAverageColor = skyAverageColor;
water.DistantRenderingMethod = RenderDistant;
water.CloseRenderingMethod = RenderClose;
}
public void update()
{
water.update();
}
public void render()
{
RenderClose();
RenderDistant();
atmosphere.Atmosphere_Render();
water.render();
}
public void postRender()
{
}
public void RenderDistant()
{
atmosphere.Atmosphere_Render();
}
public void RenderClose()
{
}
}
}
From what I can see, I'm doing exactly the same as the example source.. The skybox shows fine.. but no water to be found. Am I overlooking something obvious? :-/