PDA

View Full Version : Using Lighting with Textures..



gokhan
05-06-2008, 06:52 PM
Hi to all,

I have a problem with using lighting with textures.
I want to use lighting with textures but i really confused about this, I finished my model and tried to use some lighting sources but it doesn't worked,
Any suggestions about this ?

If I should send the other files like textures or other classes please let me know..


You can see my code below:

Thanks.


/************************************************** ********************
ESC: exit

CAMERA movement:
w : forwards
s : backwards
a : turn left
d : turn right
x : turn up
y : turn down
v : strafe right
c : strafe left
r : move up
f : move down
b : switch between BfC and drawing the frontfaces wired
************************************************** *********************/

#include <GL\glut.h>
#include <GL\glaux.h> //Used for loading the textures

#include "camera.h"
#include "textures.h"

CCamera Camera;

GLfloat YRotated = 0.0;

COGLTexture Tex1, Tex2, Tex3, Tex4, Tex5, Tex6, Tex7, Tex8, Tex9, Tex10, Tex11;



void InitTextures(void)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);

Tex1.LoadFromFile("a.bmp");
Tex2.LoadFromFile("e.bmp");
Tex3.LoadFromFile("d.bmp");
Tex4.LoadFromFile("c.bmp");
Tex5.LoadFromFile("c.bmp");
Tex6.LoadFromFile("duvar.bmp");
Tex7.LoadFromFile("zemin.bmp");
Tex8.LoadFromFile("kapi1.bmp");
Tex9.LoadFromFile("kapi2.bmp");
Tex10.LoadFromFile("tavan.bmp");
Tex11.LoadFromFile("camli.bmp");

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

}

void DrawCube(void)
{
//Draws a cube with two shaded, two one-colored and two textured faces

//glEnable(GL_CULL_FACE);


glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
//glEnable(GL_BLEND);
//glColor4f(0.0,0.0,1.0,0.1);
// glBegin(GL_QUADS);
// //sol duvar:
//
// //glTexCoord2f(0.0,0.0);
// glVertex3f(0.0,2.0,0.0);
// //glTexCoord2f(0.0,1.0);
// glVertex3f(0.0,2.0,-50.0);
// //glTexCoord2f(1.0,1.0);
// glVertex3f(8.24,2.0,-50.0);
// //glTexCoord2f(1.0,0.0);
// glVertex3f(8.24,2.0,0.0);
//glEnd();



// 0 zemin
glEnable(GL_TEXTURE_2D);

Tex7.SetActive();
//Tex3.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f); // Red
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,0.0,-50.0);
glTexCoord2f(1.0,1.0);
glVertex3f(18.24,0.0,-50.0);
glTexCoord2f(1.0,0.0);
glVertex3f(18.24,0.0,0.0);
glEnd();
//Tex3.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f); // Red
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(18.24,0.0,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(18.24,0.0,-50.0);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,0.0,-50.0);
glEnd();
glDisable(GL_TEXTURE_2D);

// 0 tavan
glEnable(GL_TEXTURE_2D);
Tex10.SetActive();
//Tex3.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f); // Red
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,3.51,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,3.51,-36.02);
glTexCoord2f(1.0,1.0);
glVertex3f(18.24,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(18.24,3.51,0.0);
glEnd();
//Tex3.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f); // Red
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,3.51,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(18.24,3.51,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(18.24,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,3.51,-36.02);
glEnd();
glDisable(GL_TEXTURE_2D);

// 1
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
//Tex3.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f); // Red
glTexCoord2f(0.0,0.0);
glVertex3f(6.30,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(6.30,1.0,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,1.0,0.0);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,0.0);

glEnd();

//Tex3.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f); // Red
glTexCoord2f(0.0,0.0);
glVertex3f(6.30,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,1.0,0.0);
glTexCoord2f(1.0,0.0);
glVertex3f(6.30,1.0,0.0);
glEnd();
glDisable(GL_TEXTURE_2D);

// 2
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.0f,1.0f,0.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(6.30,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(6.30,1.0,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(6.30,1.0,-2.58);
glTexCoord2f(1.0,0.0);
glVertex3f(6.30,0.0,-2.58);

glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.0f,1.0f,0.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(6.30,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(6.30,0.0,-2.58);
glTexCoord2f(1.0,1.0);
glVertex3f(6.30,1.0,-2.58);
glTexCoord2f(1.0,0.0);
glVertex3f(6.30,1.0,0.0);
glEnd();
glDisable(GL_TEXTURE_2D);

// 3
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.0f,0.0f,1.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(6.30,0.0,-2.58);
glTexCoord2f(0.0,1.0);
glVertex3f(6.30,1.0,-2.58);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,1.0,-2.58);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,0.0,-2.58);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.0f,0.0f,1.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(6.30,0.0,-2.58);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,0.0,-2.58);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,1.0,-2.58);
glTexCoord2f(1.0,0.0);
glVertex3f(6.30,1.0,-2.58);
glEnd();
glDisable(GL_TEXTURE_2D);

// 4
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-2.58);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,3.51,-2.58);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,3.51,-6.46);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,0.0,-6.46);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(1.0f,0.0f,0.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-2.58);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,0.0,-6.46);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,3.51,-6.46);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,3.51,-2.58);
glEnd();
glDisable(GL_TEXTURE_2D);


// 5
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.0f,1.0f,0.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-6.46);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,3.51,-6.46);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-6.46);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-6.46);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.0f,1.0f,0.0f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-6.46);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-6.46);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-6.46);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,3.51,-6.46);
glEnd();
glDisable(GL_TEXTURE_2D);


// 6
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.807f,0.80f,0.341f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-6.46);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-6.46);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-8.52);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-8.52);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.807f,0.80f,0.341f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-6.46);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-8.52);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-8.52);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-6.46);
glEnd();
glDisable(GL_TEXTURE_2D);



// 7
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-8.52);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-8.52);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-8.52);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-8.52);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,0.0);
glEnd();
glDisable(GL_TEXTURE_2D);



// 8 sanayi i&amp;#351;lem lab&amp;#305; kap&amp;#305;s&amp;#305;
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-6.21);
glVertex3f(8.235,2.31,-6.21);
glVertex3f(8.235,2.31,-8.12);
glVertex3f(8.235,0.0,-8.12);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-6.21);
glVertex3f(8.235,0.0,-8.12);
glVertex3f(8.235,2.31,-8.12);
glVertex3f(8.235,2.31,-6.21);
glEnd();
// kap&amp;#305;n&amp;#305;n ic kismi buraya texture gelecek..
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glVertex3f(8.23,0.01,-6.23);
glVertex3f(8.23,2.29,-6.23);
glVertex3f(8.23,2.29,-8.10);
glVertex3f(8.23,0.01,-8.10);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glVertex3f(8.23,0.01,-6.23);
glVertex3f(8.23,0.01,-8.10);
glVertex3f(8.23,2.29,-8.10);
glVertex3f(8.23,2.29,-6.23);
glEnd();


// 9
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-8.52);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-8.52);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-9.42);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-9.42);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-8.52);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-9.42);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-9.42);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-8.52);
glEnd();
glDisable(GL_TEXTURE_2D);


// 10
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-9.42);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-9.42);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-9.42);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-9.42);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-9.42);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-9.42);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-9.42);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-9.42);
glEnd();
glDisable(GL_TEXTURE_2D);


// 11
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-11.97);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-11.97);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-11.97);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-11.97);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-11.97);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-11.97);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-11.97);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-11.97);
glEnd();
glDisable(GL_TEXTURE_2D);


// 12
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-11.97);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-11.97);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-12.39);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-12.39);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-11.97);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-12.39);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-12.39);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-11.97);
glEnd();
glDisable(GL_TEXTURE_2D);


// 13
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-12.39);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-12.39);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-12.39);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-12.39);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-12.39);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-12.39);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-12.39);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-12.39);
glEnd();
glDisable(GL_TEXTURE_2D);


// 14
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-15.03);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-15.03);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-15.03);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,0.0,-15.03);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-15.03);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,0.0,-15.03);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-15.03);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-15.03);
glEnd();
glDisable(GL_TEXTURE_2D);


// 15
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-8.52);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-8.52);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-15.03);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-15.03);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-8.52);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-15.03);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-15.03);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-8.52);
glEnd();
glDisable(GL_TEXTURE_2D);


// 16 goruntu isleme lab&amp;#305; kap&amp;#305;s&amp;#305;


glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-10.97);
glVertex3f(8.235,2.31,-10.97);
glVertex3f(8.235,2.31,-11.92);
glVertex3f(8.235,0.0,-11.92);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-10.97);
glVertex3f(8.235,0.0,-11.92);
glVertex3f(8.235,2.31,-11.92);
glVertex3f(8.235,2.31,-10.97);
glEnd();
// kap&amp;#305;n&amp;#305;n ic kismi buraya texture gelecek..
glEnable(GL_TEXTURE_2D);
Tex8.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.23,0.01,-10.99);
glTexCoord2f(1.0,0.0);
glVertex3f(8.23,2.29,-10.99);
glTexCoord2f(1.0,1.0);
glVertex3f(8.23,2.29,-11.90);
glTexCoord2f(0.0,1.0);
glVertex3f(8.23,0.01,-11.90);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.23,0.01,-10.99);
glTexCoord2f(1.0,0.0);
glVertex3f(8.23,0.01,-11.90);
glTexCoord2f(1.0,1.0);
glVertex3f(8.23,2.29,-11.90);
glTexCoord2f(0.0,1.0);
glVertex3f(8.23,2.29,-10.99);
glEnd();
glDisable(GL_TEXTURE_2D);


// 17
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-15.03);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-15.03);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-15.45);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,0.0,-15.45);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-15.03);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,0.0,-15.45);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-15.45);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-15.03);
glEnd();
glDisable(GL_TEXTURE_2D);

// 18
//glEnable(GL_TEXTURE_2D);
//Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
// glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-15.45);
// glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-15.45);
// glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-15.45);
// glTexCoord2f(1.0,0.0);
glVertex3f(4.85,0.0,-15.45);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
// glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-15.45);
// glTexCoord2f(0.0,1.0);
glVertex3f(4.85,0.0,-15.45);
// glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-15.45);
// glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-15.45);
glEnd();
//glDisable(GL_TEXTURE_2D);

// 19
glEnable(GL_TEXTURE_2D);
Tex9.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.85,0.0,-15.45);
glTexCoord2f(0.0,1.0);
glVertex3f(4.85,2.31,-15.45);
glTexCoord2f(1.0,1.0);
glVertex3f(4.85,2.31,-16.40);
glTexCoord2f(1.0,0.0);
glVertex3f(4.85,0.0,-16.40);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.85,0.0,-15.45);
glTexCoord2f(0.0,1.0);
glVertex3f(4.85,0.0,-16.40);
glTexCoord2f(1.0,1.0);
glVertex3f(4.85,2.31,-16.40);
glTexCoord2f(1.0,0.0);
glVertex3f(4.85,2.31,-15.45);
glEnd();
glDisable(GL_TEXTURE_2D);

// 20
//glEnable(GL_TEXTURE_2D);
//Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
// glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-16.40);
// glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-16.40);
// glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-16.40);
// glTexCoord2f(1.0,0.0);
glVertex3f(4.85,0.0,-16.40);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
// glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-16.40);
// glTexCoord2f(0.0,1.0);
glVertex3f(4.85,0.0,-16.40);
// glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-16.40);
// glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-16.40);
glEnd();
//glDisable(GL_TEXTURE_2D);


// 21
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-16.40);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-16.40);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-22.60);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,0.0,-22.60);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-16.40);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,0.0,-22.60);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-22.60);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-16.40);
glEnd();
glDisable(GL_TEXTURE_2D);

// 22
//glEnable(GL_TEXTURE_2D);
//Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
// glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-22.60);
// glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-22.60);
// glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-22.60);
// glTexCoord2f(1.0,0.0);
glVertex3f(4.85,0.0,-22.60);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
// glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-22.60);
// glTexCoord2f(0.0,1.0);
glVertex3f(4.85,0.0,-22.60);
// glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-22.60);
// glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-22.60);
glEnd();
//glDisable(GL_TEXTURE_2D);

// 23
glEnable(GL_TEXTURE_2D);
Tex9.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.85,0.0,-22.60);
glTexCoord2f(0.0,1.0);
glVertex3f(4.85,2.31,-22.60);
glTexCoord2f(1.0,1.0);
glVertex3f(4.85,2.31,-23.55);
glTexCoord2f(1.0,0.0);
glVertex3f(4.85,0.0,-23.55);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.85,0.0,-22.60);
glTexCoord2f(0.0,1.0);
glVertex3f(4.85,0.0,-23.55);
glTexCoord2f(1.0,1.0);
glVertex3f(4.85,2.31,-23.55);
glTexCoord2f(1.0,0.0);
glVertex3f(4.85,2.31,-22.60);
glEnd();
glDisable(GL_TEXTURE_2D);

// 24
//glEnable(GL_TEXTURE_2D);
//Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
//glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-23.55);
//glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-23.55);
//glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-23.55);
//glTexCoord2f(1.0,0.0);
glVertex3f(4.85,0.0,-23.55);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
//glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-23.55);
//glTexCoord2f(0.0,1.0);
glVertex3f(4.85,0.0,-23.55);
//glTexCoord2f(1.0,1.0);
glVertex3f(4.85,3.51,-23.55);
//glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-23.55);
glEnd();
//glDisable(GL_TEXTURE_2D);


// 25
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-23.55);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-23.55);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-24.01);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,0.0,-24.01);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-23.55);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,0.0,-24.01);
glTexCoord2f(1.0,1.0);
glVertex3f(5.10,3.51,-24.01);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-23.55);
glEnd();
glDisable(GL_TEXTURE_2D);

// 26
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-19.5);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-19.5);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-24.10);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-24.10);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-19.5);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-24.10);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-24.10);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-19.5);
glEnd();
glDisable(GL_TEXTURE_2D);

// 27
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-19.5);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-19.5);
glTexCoord2f(1.0,1.0);
glVertex3f(14.13,3.51,-19.5);
glTexCoord2f(1.0,0.0);
glVertex3f(14.13,0.0,-19.5);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-19.5);
glTexCoord2f(0.0,1.0);
glVertex3f(14.13,0.0,-19.5);
glTexCoord2f(1.0,1.0);
glVertex3f(14.13,3.51,-19.5);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-19.5);
glEnd();
glDisable(GL_TEXTURE_2D);


// 28
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.59,0.0,-18.07);
glTexCoord2f(0.0,1.0);
glVertex3f(8.59,3.51,-18.07);
glTexCoord2f(1.0,1.0);
glVertex3f(14.13,3.51,-18.07);
glTexCoord2f(1.0,0.0);
glVertex3f(14.13,0.0,-18.07);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.59,0.0,-18.07);
glTexCoord2f(0.0,1.0);
glVertex3f(14.13,0.0,-18.07);
glTexCoord2f(1.0,1.0);
glVertex3f(14.13,3.51,-18.07);
glTexCoord2f(1.0,0.0);
glVertex3f(8.59,3.51,-18.07);
glEnd();
glDisable(GL_TEXTURE_2D);

// 29
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.59,0.0,-18.07);
glTexCoord2f(0.0,1.0);
glVertex3f(8.59,3.51,-18.07);
glTexCoord2f(1.0,1.0);
glVertex3f(8.59,3.51,-18.28);
glTexCoord2f(1.0,0.0);
glVertex3f(8.59,0.0,-18.28);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.59,0.0,-18.07);
glTexCoord2f(0.0,1.0);
glVertex3f(8.59,0.0,-18.28);
glTexCoord2f(1.0,1.0);
glVertex3f(8.59,3.51,-18.28);
glTexCoord2f(1.0,0.0);
glVertex3f(8.59,3.51,-18.07);
glEnd();
glDisable(GL_TEXTURE_2D);

// 30
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-18.28);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-18.28);
glTexCoord2f(1.0,1.0);
glVertex3f(8.59,3.51,-18.28);
glTexCoord2f(1.0,0.0);
glVertex3f(8.59,0.0,-18.28);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-18.28);
glTexCoord2f(0.0,1.0);
glVertex3f(8.59,0.0,-18.28);
glTexCoord2f(1.0,1.0);
glVertex3f(8.59,3.51,-18.28);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-18.28);
glEnd();
glDisable(GL_TEXTURE_2D);

// 31
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-15.03);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-15.03);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-18.28);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-18.28);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-15.03);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-18.28);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-18.28);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-15.03);
glEnd();
glDisable(GL_TEXTURE_2D);

// 32 t&amp;#305;bbi bili&amp;#351;im lab&amp;#305; kap&amp;#305;s&amp;#305;
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-15.45);
glVertex3f(8.235,2.31,-15.45);
glVertex3f(8.235,2.31,-16.40);
glVertex3f(8.235,0.0,-16.40);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-15.45);
glVertex3f(8.235,0.0,-16.40);
glVertex3f(8.235,2.31,-16.40);
glVertex3f(8.235,2.31,-15.45);
glEnd();
// kap&amp;#305;n&amp;#305;n ic kismi buraya texture gelecek..
glEnable(GL_TEXTURE_2D);
Tex8.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.23,0.01,-15.47);
glTexCoord2f(1.0,0.0);
glVertex3f(8.23,2.29,-15.47);
glTexCoord2f(1.0,1.0);
glVertex3f(8.23,2.29,-16.38);
glTexCoord2f(0.0,1.0);
glVertex3f(8.23,0.01,-16.38);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.23,0.01,-15.47);
glTexCoord2f(1.0,0.0);
glVertex3f(8.23,0.01,-16.38);
glTexCoord2f(1.0,1.0);
glVertex3f(8.23,2.29,-16.38);
glTexCoord2f(0.0,1.0);
glVertex3f(8.23,2.29,-15.47);
glEnd();
glDisable(GL_TEXTURE_2D);

// 33
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(14.13,0.0,-18.07);
glTexCoord2f(0.0,1.0);
glVertex3f(14.13,3.51,-18.07);
glTexCoord2f(1.0,1.0);
glVertex3f(14.13,3.51,-19.50);
glTexCoord2f(1.0,0.0);
glVertex3f(14.13,0.0,-19.50);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(14.13,0.0,-18.07);
glTexCoord2f(0.0,1.0);
glVertex3f(14.13,0.0,-19.50);
glTexCoord2f(1.0,1.0);
glVertex3f(14.13,3.51,-19.50);
glTexCoord2f(1.0,0.0);
glVertex3f(14.13,3.51,-18.07);
glEnd();
glDisable(GL_TEXTURE_2D);

// 34
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-24.01);
glTexCoord2f(0.0,1.0);
glVertex3f(5.10,3.51,-24.01);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-24.01);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-24.01);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(5.10,0.0,-24.01);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-24.01);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-24.01);
glTexCoord2f(1.0,0.0);
glVertex3f(5.10,3.51,-24.01);
glEnd();
glDisable(GL_TEXTURE_2D);


// 35
glEnable(GL_TEXTURE_2D);
Tex11.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-24.01);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-24.01);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-26.78);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-26.78);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-24.01);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-26.78);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-26.78);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-24.01);
glEnd();
glDisable(GL_TEXTURE_2D);


// 36
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-26.78);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-26.78);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-26.78);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-26.78);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-26.78);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-26.78);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-26.78);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-26.78);
glEnd();
glDisable(GL_TEXTURE_2D);

// 38
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-27.23);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-27.23);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-27.23);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-27.23);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-27.23);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-27.23);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-27.23);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-27.23);
glEnd();
glDisable(GL_TEXTURE_2D);


// 39
glEnable(GL_TEXTURE_2D);
Tex11.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-27.23);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-27.23);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-29.77);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-29.77);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-27.23);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-29.77);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-29.77);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-27.23);
glEnd();
glDisable(GL_TEXTURE_2D);

// 40
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-29.77);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-29.77);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-29.77);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-29.77);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-29.77);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-29.77);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-29.77);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-29.77);
glEnd();
glDisable(GL_TEXTURE_2D);


// 40
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-26.78);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,3.51,-26.78);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-27.23);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,0.0,-27.23);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.30,0.0,-26.78);
glTexCoord2f(0.0,1.0);
glVertex3f(4.30,0.0,-27.23);
glTexCoord2f(1.0,1.0);
glVertex3f(4.30,3.51,-27.23);
glTexCoord2f(1.0,0.0);
glVertex3f(4.30,3.51,-26.78);
glEnd();
glDisable(GL_TEXTURE_2D);

// 41
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-24.01);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-24.01);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-29.77);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-29.77);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-24.01);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-29.77);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-29.77);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-24.01);
glEnd();
glDisable(GL_TEXTURE_2D);


// 44
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.3,0.0,-29.77);
glTexCoord2f(0.0,1.0);
glVertex3f(4.3,3.51,-29.77);
glTexCoord2f(1.0,1.0);
glVertex3f(4.3,3.51,-32.72);
glTexCoord2f(1.0,0.0);
glVertex3f(4.3,0.0,-32.72);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.3,0.0,-29.77);
glTexCoord2f(0.0,1.0);
glVertex3f(4.3,0.0,-32.72);
glTexCoord2f(1.0,1.0);
glVertex3f(4.3,3.51,-32.72);
glTexCoord2f(1.0,0.0);
glVertex3f(4.3,3.51,-29.77);
glEnd();
glDisable(GL_TEXTURE_2D);


// 45
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.3,0.0,-32.72);
glTexCoord2f(0.0,1.0);
glVertex3f(4.3,3.51,-32.72);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,3.51,-32.72);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,0.0,-32.72);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.3,0.0,-32.72);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,0.0,-32.72);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,3.51,-32.72);
glTexCoord2f(1.0,0.0);
glVertex3f(4.3,3.51,-32.72);
glEnd();
glDisable(GL_TEXTURE_2D);

// 46
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-32.72);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,3.51,-32.72);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,0.0,-36.02);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-32.72);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,0.0,-36.02);
glTexCoord2f(1.0,1.0);
glVertex3f(0.0,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,3.51,-32.72);
glEnd();
glDisable(GL_TEXTURE_2D);


// 47
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-36.02);
glTexCoord2f(0.0,1.0);
glVertex3f(0.0,3.51,-36.02);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-36.02);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,-36.02);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-36.02);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(0.0,3.51,-36.02);
glEnd();
glDisable(GL_TEXTURE_2D);


// 48 sistem odasi kap&amp;#305;s&amp;#305;
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(2.67,0.0,-36.017);
glVertex3f(2.67,2.31,-36.017);
glVertex3f(3.62,2.31,-36.017);
glVertex3f(3.62,0.0,-36.017);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(2.67,0.0,-36.017);
glVertex3f(3.62,0.0,-36.017);
glVertex3f(3.62,2.31,-36.017);
glVertex3f(2.67,2.31,-36.017);
glEnd();
// kap&amp;#305;n&amp;#305;n ic kismi buraya texture gelecek..
glEnable(GL_TEXTURE_2D);
Tex8.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(2.69,0.01,-36.015);
glTexCoord2f(0.0,01.0);
glVertex3f(2.69,2.29,-36.015);
glTexCoord2f(1.0,1.0);
glVertex3f(3.60,2.29,-36.015);
glTexCoord2f(1.0,0.0);
glVertex3f(3.60,0.01,-36.015);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(2.69,0.01,-36.015);
glTexCoord2f(0.0,1.0);
glVertex3f(3.60,0.01,-36.015);
glTexCoord2f(1.0,1.0);
glVertex3f(3.60,2.29,-36.015);
glTexCoord2f(1.0,0.0);
glVertex3f(2.69,2.29,-36.015);
glEnd();
glDisable(GL_TEXTURE_2D);


// 50 ogrenci uygulama lab&amp;#305; kap&amp;#305;s&amp;#305;
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-33.76);
glVertex3f(8.235,2.31,-33.76);
glVertex3f(8.235,2.31,-35.71);
glVertex3f(8.235,0.0,-35.71);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.90f,0.42f,0.15f);
glVertex3f(8.235,0.0,-33.76);
glVertex3f(8.235,0.0,-35.71);
glVertex3f(8.235,2.31,-35.71);
glVertex3f(8.235,2.31,-33.76);
glEnd();
// kap&amp;#305;n&amp;#305;n ic kismi buraya texture gelecek..
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glVertex3f(8.23,0.0,-33.78);
glVertex3f(8.23,2.31,-33.78);
glVertex3f(8.23,2.31,-35.69);
glVertex3f(8.23,0.0,-35.69);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glVertex3f(8.23,0.0,-33.78);
glVertex3f(8.23,0.0,-35.69);
glVertex3f(8.23,2.31,-35.69);
glVertex3f(8.23,2.31,-33.78);
glEnd();


// 49
glEnable(GL_TEXTURE_2D);
Tex6.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-29.77);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,3.51,-29.77);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,0.0,-36.02);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(8.24,0.0,-29.77);
glTexCoord2f(0.0,1.0);
glVertex3f(8.24,0.0,-36.02);
glTexCoord2f(1.0,1.0);
glVertex3f(8.24,3.51,-36.02);
glTexCoord2f(1.0,0.0);
glVertex3f(8.24,3.51,-29.77);
glEnd();
glDisable(GL_TEXTURE_2D);

// 51
glEnable(GL_TEXTURE_2D);
Tex11.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-12.39);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-12.39);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-15.03);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-15.03);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-12.39);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-15.03);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-15.03);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-12.39);
glEnd();
glDisable(GL_TEXTURE_2D);

// 35
glEnable(GL_TEXTURE_2D);
Tex11.SetActive();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-9.42);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,3.51,-9.42);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-11.97);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,0.0,-11.97);
glEnd();
glBegin(GL_QUADS);
//sol duvar:
glColor3f(0.82f,0.82f,0.35f);
glTexCoord2f(0.0,0.0);
glVertex3f(4.09,0.0,-9.42);
glTexCoord2f(0.0,1.0);
glVertex3f(4.09,0.0,-11.97);
glTexCoord2f(1.0,1.0);
glVertex3f(4.09,3.51,-11.97);
glTexCoord2f(1.0,0.0);
glVertex3f(4.09,3.51,-9.42);
glEnd();
glDisable(GL_TEXTURE_2D);
}


void DrawEngel(void)
{
//Draws a cube with two shaded, two one-colored and two textured faces
glEnable(GL_TEXTURE_2D);
Tex3.SetActive();
glBegin(GL_QUADS);

glTexCoord2f(0.0,0.0);
glVertex3f(6.0,0.0,-20.0);
glTexCoord2f(0.0,1.0);
glVertex3f(10.0,0.0,-20.0);
glTexCoord2f(1.0,1.0);
glVertex3f(10.0,0.0,-24.0);
glTexCoord2f(1.0,0.0);
glVertex3f(6.0,0.0,-24.0);

glEnd();

glBegin(GL_QUADS);

glTexCoord2f(0.0,0.0);
glVertex3f(6.0,4.0,-20.0);
glTexCoord2f(0.0,1.0);
glVertex3f(10.0,4.0,-20.0);
glTexCoord2f(1.0,1.0);
glVertex3f(10.0,4.0,-24.0);
glTexCoord2f(1.0,0.0);
glVertex3f(6.0,4.0,-24.0);

glEnd();
glBegin(GL_QUADS);

glTexCoord2f(0.0,0.0);
glVertex3f(6.0,0.0,-20.0);
glTexCoord2f(0.0,1.0);
glVertex3f(6.0,4.0,-20.0);
glTexCoord2f(1.0,1.0);
glVertex3f(6.0,4.0,-24.0);
glTexCoord2f(1.0,0.0);
glVertex3f(6.0,0.0,-24.0);

glEnd();

glBegin(GL_QUADS);

glTexCoord2f(0.0,0.0);
glVertex3f(10.0,0.0,-20.0);
glTexCoord2f(0.0,1.0);
glVertex3f(10.0,4.0,-20.0);
glTexCoord2f(1.0,1.0);
glVertex3f(10.0,4.0,-24.0);
glTexCoord2f(1.0,0.0);
glVertex3f(10.0,0.0,-24.0);

glEnd();
glDisable(GL_TEXTURE_2D);


}




void reshape(int x, int y)
{
if (y == 0 || x == 0) return; //Nothing is visible then, so return

//Set a new projection matrix
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
//Angle of view:40 degrees
//Near clipping plane distance: 0.5
//Far clipping plane distance: 20.0
gluPerspective(40.0,(GLfloat)x/(GLfloat)y,0.5,100.0);

glMatrixMode(GL_MODELVIEW);
glViewport(0,0,(GLsizei)x,(GLsizei)y); //Use the whole window for rendering
}
void Display(void)
{
glClearColor(0,0,0,0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
Camera.Render();
glTranslatef(0.0,0.0,0.0);

glScalef(0.5,0.5,0.5);

DrawCube();

glFlush();
glutSwapBuffers();

}

void KeyDown(unsigned char key, int x, int y)
{
switch (key)
{
case 27: //ESC
PostQuitMessage(0);
break;
case 'a':
Camera.RotateY(1.0);
Display();
break;
case 'd':
Camera.RotateY(-1.0);
Display();
break;
case 'w':
Camera.MoveForwards( -0.1 ) ;
Display();
break;
case 's':
Camera.MoveForwards( 0.1 ) ;
Display();
break;
case 'e':
Camera.MoveForwards( -0.1 ) ;
Camera.RotateY(-1.0);
Display();
break;
case 'q':
Camera.MoveForwards( -0.1 ) ;
Camera.RotateY(1.0);
Display();
break;
case 'x':
Camera.RotateX(5.0);
Display();
break;
case 'y':
Camera.RotateX(-5.0);
Display();
break;
case 'c':
Camera.StrafeRight(-0.1);
Display();
break;
case 'v':
Camera.StrafeRight(0.1);
Display();
break;
case 'f':
Camera.Move(F3dVector(0.0,-0.3,0.0));
Display();
break;
case 'r':
Camera.Move(F3dVector(0.0,0.3,0.0));
Display();
break;

case 'l':
Camera.Move( F3dVector(0.0, 0.0, 0.0 ));
Display();
break;
}
}

void Idle(void)
{
YRotated += 0.4;
Display();
}

int main(int argc, char **argv)
{
glutInit(&amp;argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(800,600);
glutInitWindowPosition(100,100);
glutCreateWindow("Yol Goster");
glFrontFace(GL_CW); //Clockwise is front in "DrawCube()"
glCullFace(GL_BACK);
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
Camera.Move( F3dVector(0.0, 0.0, 0.0 ));
Camera.MoveForwards( 1.0 );
InitTextures();
glutDisplayFunc(Display);
//glutDisplayFunc(Display2);
glutReshapeFunc(reshape);
glutKeyboardFunc(KeyDown);
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}
[/B]

rgpc
05-06-2008, 10:11 PM
Lighting with textures is no different to lighting without textures. If you do not provide normals for your vertices then your lighting will not work. Have a look at nehe's tutorial on lighting - http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=07

dorbie
05-07-2008, 12:14 AM
You use a GL_REPLACE texture environment:

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

Use GL_MODULATE instead, (which incidentally is the default).