44 char strTexFile[128], label[64];
52 if(strstr(label,
"clear-color")!=NULL)
break;
54 fp->readText(strTexFile, M_FALSE);
56 _arLayers[_nLayers]._texTexture.load(strTexFile,
M_TEX_TMAP);
58 fp->readObj(&(_arLayers[_nLayers]._uvRepeat));
59 fp->readObj(&(_arLayers[_nLayers]._uvSpeed));
61 _arLayers[_nLayers]._uvSpeed *=
M_UNIT;
66 fp->readObj(&_rgbColor, M_FALSE);
71 PROFILE_REN(laSky_draw);
73 laSettings* ps = laSystemIntegrator::getSettings();
75 r->styleBackground( _rgbColor );
76 r->styleSet( laColor(255) );
79 for(
unsigned i=0; i<_nLayers; i++)
82 laPoint3(), laPoint3(ps->graphics_resolution_w, ps->graphics_resolution_h),
83 _arLayers[i]._uvTexPos, _arLayers[i]._uvRepeat);
85 _arLayers[i]._texTexture.use();
90 void laSky::animate(laTimer &t)
92 for(
unsigned i=0; i<_nLayers; i++)
93 _arLayers[i]._uvTexPos += _arLayers[i]._uvSpeed * t.delta();
#define M_UNIT
Unit of 1 meter.
virtual void vquadsDrawSingle(laPoint2 *ar_uv=NULL)=0
Draw a single VQ (Note this is slower than drawing an array of VQ and should be avoided) ...
void vquadsMakeXYRect(unsigned nIndex, const laPoint3 &pos, const laPoint3 &sz, const laPoint2 &uv, const laPoint2 &uv_sz)
Makes a quad aligned to the XY plane; (handy for GUI rendering )
Virtual interface for the Engine graphics renderer.
#define M_TEX_TMAP
Transparent texture with an alpha channel.