|
![](/i/fill.gif) |
"Xilo Musimene" <xil### [at] hotpop com> schreef in bericht
news:3EC### [at] hotpop com...
> I found it in your zip file:
>
> void setSkyBox(GLuint texture,GLfloat helderheid){
> glDisable(GL_LIGHTING);
> glDisable(GL_CULL_FACE);
> glBindTexture(GL_TEXTURE_2D,texture);
> gluLookAt
>
(0.0,0.0,0.0,_lookat.getX()-_locatie.getX(),_lookat.getY()-_locatie.getY(),_
lookat.getZ()-_locatie.getZ(),_up.getX(),_up.getY(),_up.getZ());
> glColor4f(helderheid*2,helderheid*1.5,helderheid,1.0);
> glBegin(GL_QUADS);
> // Top
> glTexCoord2f(1.0/4.0,1.0/3.0); glVertex3f(-1.0,1.0,-1.0);
> glTexCoord2f(0.0/4.0,1.0/3.0); glVertex3f(1.0,1.0,-1.0);
> glTexCoord2f(0.0/4.0,2.0/3.0); glVertex3f(1.0,1.0,1.0);
> glTexCoord2f(1.0/4.0,2.0/3.0); glVertex3f(-1.0,1.0,1.0);
>
> //Left
> glTexCoord2f(1.0/4.0,1.0/3.0); glVertex3f(-1.0,1.0,-1.0);
> glTexCoord2f(1.0/4.0,2.0/3.0); glVertex3f(-1.0,1.0,1.0);
> glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
> glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
>
> //Right
> glTexCoord2f(4.0/4.0,2.0/3.0); glVertex3f(1.0,1.0,1.0);
> glTexCoord2f(4.0/4.0,1.0/3.0); glVertex3f(1.0,1.0,-1.0);
> glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
> glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
>
> // Far
> glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
> glTexCoord2f(2.0/4.0,3.0/3.0); glVertex3f(-1.0,1.0,1.0);
> glTexCoord2f(3.0/4.0,3.0/3.0); glVertex3f(1.0,1.0,1.0);
> glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
>
> // Near
> glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
> glTexCoord2f(2.0/4.0,0.0/3.0); glVertex3f(-1.0,1.0,-1.0);
> glTexCoord2f(3.0/4.0,0.0/3.0); glVertex3f(1.0,1.0,-1.0);
> glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
>
> //Bottom
> glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
> glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
> glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
> glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
> glEnd();
> glColor4f(1.0,1.0,1.0,1.0);
> glEnable(GL_LIGHTING);
> glEnable(GL_CULL_FACE);
> glLoadIdentity();
> }
>
> But I don't really understand what texture you used... Did you paste
> the six images toghether in one?
Yes. I used a texture similar to
http://www.turbosquid.com/Previews/Content_on_4_26_2003_07_30_53/1-5-flat.jp
gC46C3EF2-BA1E-444C-ACC051D0AB9AC308.jpgLarge.jpg
I believe the texture I used, is included in the zip, probably skybox.raw (I
believe it's 1024*1024*24bit, RGB, no header). If it's not included, you
can download it here: http://sad.studentenweb.org/cg/skyboxzonderflare.raw
(3MB!!)
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"Train you will I. Train you I will. Yes! Step one: touch your tongue to
mine."
Post a reply to this message
|
![](/i/fill.gif) |