void pix_movieDS::render(GemState *state) { if (!m_haveMovie) { return; } getFrame(); texFrame(state,1); }
void pix_filmOS :: render(GemState *state) { if(!state)return; // m_oldImage = state->image; m_oldImage=NULL; state->get(GemState::_PIX, m_oldImage); /* get the current frame from the file */ newImage = 0; if (!m_haveMovie || !m_pixBlock.image.data)return; // do we actually need to get a new frame from the movie ? if (m_reqFrame != m_curFrame) { //newImage = 1; getFrame(); m_curFrame = m_reqFrame; if (m_film)m_pixBlock.image.data = m_frame; // this is mainly for windows } else { newImage = 0; } if (m_newFilm){ m_pixBlock.newfilm = 1; m_newFilm = 0; } //state->image = &m_pixBlock; state->set(GemState::_PIX, m_pixBlock); // whoa: the following construct seems to be a bug // i don't dare to "fix" it now #ifdef __APPLE__ if (m_reqFrame == m_curFrame) // ::MoviesTask(NULL, 0); #endif /* texture it, if needed */ texFrame(state, newImage); m_pixBlock.newimage = newImage; // automatic proceeding if (m_auto)m_reqFrame++; }