   Texture Generation using OpenGL and CG
  HiMy 3D engine  has dynamic terrain and planet generation. At present the topography and textures are created in software which is of course a little slow, especially when moving quickly towards a planet as it recursively subdivides the mesh and generates the texture in higher detail.I dont even know if what I want is possible, but can I create this texture in a shader? Is there an equilavent to the tex2D function in CG that sets the texture data rather than sampling it? (based on terrain height)?Google hasnt helped me much so far, but I could well be searching for the wrong thing. How would you implement what I am discussing?Thanks in advance,   
  It is called render to texture. Instead of rendering to the normal framebuffer, you bind a texture and whatever you render with your fixed pipeline or using shaders, is written to the texture surface.http://www.opengl.org/wiki/GL_EXT_framebuffer_object;  Thanks. That makes perfect sence. Ive already used it for reflections and shadowmaps. I really should have put 2 and 2 together and realised the solution myself.Thanks again for the reply.   