示例#1
0
void xdk_d3d_init_fbo(void *data)
{
   xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)data;

#if 0
   xdk_d3d_deinit_fbo(d3d);

   ret = d3d->d3d_render_device->CreateTexture(d3d->tex_w * g_settings.video.fbo.scale_x, d3d->tex_h * g_settings.video.fbo.scale_y,
         1, 0, g_extern.console.screen.gamma_correction ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_X8R8G8B8 ) : D3DFMT_X8R8G8B8,
         0, &d3d->lpTexture_ot, NULL);

   if (ret != S_OK)
   {
      RARCH_ERR("[xdk_d3d_init_fbo::] Failed at CreateTexture.\n");
      return;
   }

   ret = d3d->d3d_render_device->CreateRenderTarget(d3d->tex_w * g_settings.video.fbo.scale_x, d3d->tex_h * g_settings.video.fbo.scale_y,
         g_extern.console.screen.gamma_correction ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_X8R8G8B8 ) : D3DFMT_X8R8G8B8, D3DMULTISAMPLE_NONE, 
         0, 0, &d3d->lpSurface, NULL);

   if (ret != S_OK)
   {
      RARCH_ERR("[xdk_d3d_init_fbo::] Failed at CreateRenderTarget.\n");
      return;
   }

   d3d->lpTexture_ot_as16srgb = *d3d->lpTexture_ot;
   xdk_convert_texture_to_as16_srgb(d3d->lpTexture);
   xdk_convert_texture_to_as16_srgb(&d3d->lpTexture_ot_as16srgb);

   d3d->fbo_inited = true;
#endif
}
示例#2
0
void xdk_d3d_init_fbo(xdk_d3d_video_t *d3d)
{
   if(!g_settings.video.render_to_texture)
      return;

   xdk_d3d_deinit_fbo(d3d);

   d3d->d3d_render_device->CreateTexture(d3d->tex_w * g_settings.video.fbo.scale_x, d3d->tex_h * g_settings.video.fbo.scale_y,
         1, 0, g_extern.console.screen.gamma_correction ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_X8R8G8B8 ) : D3DFMT_X8R8G8B8,
         0, &d3d->lpTexture_ot, NULL);

   d3d->d3d_render_device->CreateRenderTarget(d3d->tex_w * g_settings.video.fbo.scale_x, d3d->tex_h * g_settings.video.fbo.scale_y,
         g_extern.console.screen.gamma_correction ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_X8R8G8B8 ) : D3DFMT_X8R8G8B8, D3DMULTISAMPLE_NONE, 
         0, 0, &d3d->lpSurface, NULL);

   d3d->lpTexture_ot_as16srgb = *d3d->lpTexture_ot;
   xdk_convert_texture_to_as16_srgb(d3d->lpTexture);
   xdk_convert_texture_to_as16_srgb(&d3d->lpTexture_ot_as16srgb);

   d3d->fbo_inited = true;
}