Hi all,

im trying to add a CCTV element, basicly i am rendering a certain section of my world to a texture and then rendering it on to a face in the world, except that it isnt working that way

The CCTV class has a position and a direction that im setting the viewport to, and then render my world (without the CCTV textures) then using glCopyTexImage2D i assign it on to an already created (blank) texture, then i render my world (with the CCTV textures) but when i try and render my world to get the CCTV textures the whole screen goes blank, but if i dont then it goes ok except for the not having a texture problem.

The code i use to get the CCTV textures is ::
Code:
  glViewport(0,0,fWidth,fHeight);

  glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
  glLoadIdentity;

    glDisable(GL_DEPTH_TEST);

    fCamera.X := fPosition[0];
    fCamera.Y := fPosition[1];
    fCamera.Z := fPosition[2];
    fCamera.dX := fDirection[0];
    fCamera.dY := fDirection[1];
    fCamera.dZ := fDirection[2];
    fCamera.SetView;

  // Render my world

    fTexture.BindTexture;
    glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, fWidth, fHeight, 0);

  glEnable(GL_DEPTH_TEST);
  glViewport(0,0,vWidth,vHeight);
This is being called just before the world is rendered so that it is updated, then as im rendering the world i check to if the face has a CCTV texture, if so it is rendered.

thanx for any help