Original Post
I wrote an OpenGL program with swiching scenes. I have a problem with one of the scenes- it shows the objects, but the texture put on quad doesnt work. (I have used this textures in previous scenes and everything was ok). I am curious if anybody could check up on my code? this is function switching between the scenes: void __fastcall TFormMain::DrawObjects() { UpDate(); double hour, min, sec; hour=floor(T/60/60); min=floor((T-hour*60*60)/60); sec=floor(T-hour*60*60-min*60); String time, timeh, timem, times; String dates, yrs,mos,ds,hs,mins,ss, timest; timeh=FloatToStr(hour); timem=FloatToStr(min); times=FloatToStr(sec); yrs=IntToStr(int(yr)); mos=IntToStr(int(mo)); ds=IntToStr(int(d)); hs=IntToStr(int(h)); mins=IntToStr(int(m)); ss=IntToStr(int(s)); dates=yrs+'.'+mos+'.'+ds; timest=hs+':'+mins+':'+ss; time=timeh+'h'+timem+'m'+times+'s'; FormMain->Label2->Caption=time; FormMain->Label3->Caption=dates; FormMain->Label4->Caption=timest; switch(object) { case 0: SceneOne(); break; case 1: SceneTwo(); break; case 2: SceneThree(); break; case 3: SceneFour(); break; case 4: SceneFive(); break; case 5: SceneSix(); break; } } this is scene five - the problematic one: void __fastcall TFormMain::SceneFive() { glLoadIdentity(); GroundTrackMap(); if(Child->CheckBox5->Checked) { glLoadIdentity(); DrawGroundTrack(); } glLoadIdentity(); AnimTrack(); } and this the function with texture which is not working: void __fastcall TFormMain::GroundTrackMap() { glLoadIdentity(); glColor3f(1.0,1.0,1.0); glBindTexture(GL_TEXTURE_2D, texture1); glBegin(GL_QUADS); glTexCoord2f(1.0f, 0.0f); glVertex3f(8400,-6400,-15000); glTexCoord2f(0.0f, 0.0f); glVertex3f(-8400,-6400,-15000); glTexCoord2f(0.0f, 1.0f); glVertex3f(-8400,6400,-15000); glTexCoord2f(1.0f, 1.0f); glVertex3f(8400,6400,-15000); glEnd(); } the rest of the functions in scene five is working ok. Could anybody help me with that? actually if there is anybody who can check all my code, than i can pay for that- i am desperate to finish this thing quick :)