tex = gr.createTexture(256,256,TEXTURE_DYNAMIC)
gr.CurrentRenderTarget = tex
--draw stuff
gr.setTarget()
then use texture replacement to swap a ships textures or you can draw it to something. also you can call also call renderFrame() while rendering to a texture to create a camera view.
see the old cockpit demo
http://www.game-warden.com/nukemod-cos/downloads/cockpitdemo2.7zor wait for the next version, it will be modder friendly, having a table much like the ones theyre familiar with and you can add new cockpits and other features to ships without having to even touch the script. it also supports other things, like player operated turrets, guided drones, cockpit animation, and camera display features. id like to improve mfds, right now you can cycle through cameras with the number keys. id like to improve on this, you would have a key to toggle between mfds, and then use the number keys to change display specific settings. right now the number of useful displays is kinda slim. i might try to recreate some of the existing gauges to give it something you can play with. id like to also implement multi targeting, and a 3d heads up display, which have ideas on how to make work, but havent coded anything yet.