コード例 #1
0
ファイル: radeon_lock.c プロジェクト: Ionic/nx-libs
static void r300RegainedLock(radeonContextPtr radeon)
{
	__DRIdrawablePrivate *dPriv = radeon->dri.drawable;

	if (radeon->lastStamp != dPriv->lastStamp) {
		_mesa_resize_framebuffer(radeon->glCtx,
			(GLframebuffer*)dPriv->driverPrivate,
			dPriv->w, dPriv->h);

		radeonUpdatePageFlipping(radeon);

		if (radeon->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT)
			radeonSetCliprects(radeon, GL_BACK_LEFT);
		else
			radeonSetCliprects(radeon, GL_FRONT_LEFT);

		radeonUpdateScissor(radeon->glCtx);
		radeon->lastStamp = dPriv->lastStamp;
	}

#if R200_MERGED
	for (i = 0; i < r200->nr_heaps; i++) {
		DRI_AGE_TEXTURES(r200->texture_heaps[i]);
	}
#endif
}
コード例 #2
0
ファイル: radeon_state.c プロジェクト: astrofimov/vgallium
static void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
	if (ctx->Scissor.Enabled) {
		/* We don't pipeline cliprect changes */
		r300Flush(ctx);
		radeonUpdateScissor(ctx);
	}
}
コード例 #3
0
ファイル: radeon_state.c プロジェクト: astrofimov/vgallium
/**
 * Handle common enable bits.
 * Called as a fallback by r200Enable/r300Enable.
 */
void radeonEnable(GLcontext* ctx, GLenum cap, GLboolean state)
{
	radeonContextPtr radeon = RADEON_CONTEXT(ctx);

	switch(cap) {
	case GL_SCISSOR_TEST:
		/* We don't pipeline cliprect & scissor changes */
		r300Flush(ctx);

		radeon->state.scissor.enabled = state;
		radeonUpdateScissor(ctx);
		break;

	default:
		return;
	}
}