public void setHolder(MTimeLineHoder mTimeLineHoderT) { currentTimeLineHoder = mTimeLineHoderT; currentTimeLine = null; focusFrame = null; if (currentTimeLineHoder != null && timePosition >= currentTimeLineHoder.getMaxFrameLen()) { timePosition = currentTimeLineHoder.getMaxFrameLen() - 1; } if (timePosition<0) { timePosition = 0; } clearFrameFocus(); form_MA.form_MFrameEdit.releaseFocusClips(); }
public void Update_GlView(bool desire) { if (this.IsDisposed || !loaded || this.IsHidden || this.Width <= 0 || this.Height <= 0) { return; } if (Form_MAnimation.inResetPanels) { return; } if (!desire) { if (!(comboBox_PlayMode.SelectedIndex <= 0 || (comboBox_PlayMode.SelectedIndex == 1 && mouseInView))) { return; } } if (!glView.MakeCurrent()) { return; } //Çå³ýÑÕÉ«ºÍÉî¶ÈΪ»º³å GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); //ÖØÖÃÄ£ÐÍÊÓͼ¾ØÕó GL.MatrixMode(MatrixMode.Modelview); GL.LoadIdentity(); //»ñÈ¡ÆÁÄ»³ß´ç int glViewW = glView.Width; int glViewH = glView.Height; GLGraphics.resetClip(glViewW, glViewH); //Óð×É«Çå¿ÕÆÁÄ» GL.ClearColor(GraphicsUtil.getColor(Consts.colorDarkGray)); //Ó³Éä×ø±êϵ matrixDraw.identity(); matrixDraw.preScale(1.0f, -1.0f, 1.0f); matrixDraw.postTranslate(0, glViewH, 0.0f); float[] data = matrixDraw.getValue(); GL.MultMatrix(data); //»æÖÆÄÚÈÝ MTimeLineHoder currentTimeLineHoder = form_MA.form_MTimeLine.currentTimeLineHoder; if (currentTimeLineHoder != null) { List <MFrame> frameEditList = form_MA.form_MTimeLine.getSameTimeFrames_Visible(play_frameID); foreach (MFrame frameEdit in frameEditList) { if (frameEdit != null) { frameEdit.glDisplay(glViewW / 2, glViewH / 2, previewZoomLevel, null, false, play_frameID); } } //²½½ø play_frameID++; if (play_frameID >= currentTimeLineHoder.getMaxFrameLen()) { play_frameID = 0; } } else { play_frameID = 0; } glView.SwapBuffers(); }