Beispiel #1
0
void setup_gl_matrices()
{
#ifdef USE_OLDGL
	Matrix4x4 modelview = get_world_matrix() * get_view_matrix();
	Matrix4x4 proj = get_projection_matrix();
	Matrix4x4 tex = get_texture_matrix();

	glMatrixMode(GL_TEXTURE);
	glLoadTransposeMatrixf(tex[0]);
	glMatrixMode(GL_PROJECTION);
	glLoadTransposeMatrixf(proj[0]);
	glMatrixMode(GL_MODELVIEW);
	glLoadTransposeMatrixf(modelview[0]);
#endif
}
	void video_stream_instance::display()
	{
		if (m_ns != NULL)	// is video attached ?
		{
			video_handler* vh = m_ns->get_video_handler();
			assert(vh != NULL);
		
			rect bounds;
			bounds.m_x_min = 0.0f;
			bounds.m_y_min = 0.0f;
			bounds.m_x_max = PIXELS_TO_TWIPS(m_def->m_width);
			bounds.m_y_max = PIXELS_TO_TWIPS(m_def->m_height);

			cxform cx = get_world_cxform();
			gameswf::rgba color = cx.transform(gameswf::rgba());

			matrix m = get_world_matrix();
			vh->display(&m, &bounds, color);
		}
	}