public NetGLControl() { if (DesignMode) { AddLabel("3D will be here"); return; } var time = new SceneTime(); Graphics graphics = null; try { graphics = new Graphics(this, time, ShadingTechnique.Forward); } catch (GLException ex) { Log.Exception(ex); AddLabel("Failed to initialize 3D: " + ex.Message); return; } Graphics = graphics; _scene = new Scene.Scene(this, graphics, time); RenderDispatcher = RenderDispatcher.Current; SetStyle(ControlStyles.UserPaint, false); StartRenderLoop(); }
internal Scene(NetGLControl control, Graphics graphics, SceneTime time) { Assert.NotNull(control); _control = control; _time = time; _graphics = graphics; SceneObjects = _sceneObjects.AsReadOnly(); DrawCalls = 0; FrameNo = 0; }
public Bitmap ReadImage() { return(Graphics.ReadImage()); }