Niels... Look in jgc_sky.cpp, I have these small classes that load and set up a couple different skys ATM... Here is a snippet from the Dome one:
//============================================================================
// Begin JGC_SKY_DOME1 - Jason's HomeBrew
//============================================================================
//----------------------------------------------------------------------------
JGC_SKYDOME::JGC_SKYDOME(
char *p_szDomeModelFilename,
char *p_szDomeTextureFilename,
float p_fCameraRange
){
//----------------------------------------------------------------------------
this->ScrollU=0;
this->ScrollV=0;
this->ScrollUMult=0.00000000005f;
this->ScrollVMult=0.00000000005f;
this->CameraRangeScaleMult=5.40626;
JGC_OBJECT *SObj0 = new JGC_OBJECT(cnObject_JegasID);
dbMakeObjectTriangle(SObj0->ID,1,1,1,1,1,1,1,1,1);
this->Obj = new JGC_OBJECT();
this->Obj->Load(p_szDomeModelFilename);
dbMakeMeshFromObject(cnMesh_JegasID,this->Obj->ID);
this->Img = new JGC_IMAGE();
this->Img->LoadImageGDK(p_szDomeTextureFilename);
SObj0->LimbAdd(1,cnMesh_JegasID);
dbDeleteMesh(cnMesh_JegasID);
SObj0->LimbTexture(1,this->Img->ID);
this->Obj->Delete();
this->Obj->Clone(SObj0->ID);
delete SObj0;
this->Obj->Cull_Set(false);
//this->Obj->Light_Set(true);
this->Obj->Emissive_Set(dbRGB(255,255,255));
this->ScaleDome(p_fCameraRange);
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
JGC_SKYDOME::~JGC_SKYDOME(){
//----------------------------------------------------------------------------
delete this->Img;
delete this->Obj;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void JGC_SKYDOME::ScaleDome(float p_fCameraRange){
//----------------------------------------------------------------------------
this->Scale = this->CameraRangeScaleMult * p_fCameraRange;
this->Obj->Scale(this->Scale, this->Scale/2.5, this->Scale,false);
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void JGC_SKYDOME::Update(
float p_XPos,
float p_YPos,
float p_ZPos,
float p_fTimeElapsed
){
//----------------------------------------------------------------------------
ScrollU+=this->ScrollUMult*p_fTimeElapsed;
ScrollV+=this->ScrollVMult*p_fTimeElapsed;
this->Obj->LimbTextureScroll(1,this->ScrollU,this->ScrollV);
this->Obj->Position(p_XPos, p_YPos, p_ZPos);
};
//----------------------------------------------------------------------------
//============================================================================
// End JGC_SKY_Dome - Jason's HomeBrew
//============================================================================
The reason for the messing about... was so I could get the decent uv scroll working. I think I needed to scroll the limb texture - so it had to be a limb. I know that particular DOME model has the poly normals facing out so I turn culling off.
Does this help?