Esempio n. 1
0
	virtual void draw(ID3D11DeviceContext* ctx, ID3D11RenderTargetView* rtv, unsigned width, unsigned height, double time)
	{
		D3D11_VIEWPORT vp;
		memset(&vp, 0, sizeof(vp));
		vp.Width = (float)width;
		vp.Height = (float)height;
		vp.MaxDepth = 1.0f;

		ctx->OMSetRenderTargets(1, &rtv, 0);
		ctx->RSSetViewports(1, &vp);

		ctx->VSSetShader(vs, NULL, 0);
		ctx->PSSetShader(ps, NULL, 0);	

		ctx->PSSetShaderResources(0, 2, srv);
		ctx->PSSetSamplers(0, 2, samp);

		quad->bind_and_draw(ctx);
	}