trunk/src/osd/windows/d3dhlsl.c
| r20388 | r20389 | |
| 2355 | 2355 | |
| 2356 | 2356 | (*d3dintf->effect.end)(curr_effect); |
| 2357 | 2357 | |
| 2358 | | curr_effect = effect; |
| 2358 | //curr_effect = effect; |
| 2359 | 2359 | |
| 2360 | 2360 | //blit(backbuffer, rt->bloom_texture[5], NULL, poly->type, vertnum, poly->count); |
| 2361 | | blit(rt->target[2], rt->texture[0], NULL, poly->type, vertnum, poly->count); |
| 2361 | //blit(rt->target[2], rt->texture[0], NULL, poly->type, vertnum, poly->count); |
| 2362 | 2362 | blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count); |
| 2363 | 2363 | //blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count); |
| 2364 | 2364 | |
| r20388 | r20389 | |
| 2369 | 2369 | result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); |
| 2370 | 2370 | if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); |
| 2371 | 2371 | |
| 2372 | /*curr_effect = post_effect; |
| 2373 | |
| 2374 | (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); |
| 2375 | |
| 2376 | (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); |
| 2377 | (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); |
| 2378 | (*d3dintf->effect.set_float)(curr_effect, "RawWidth", (float)poly->texture->rawwidth); |
| 2379 | (*d3dintf->effect.set_float)(curr_effect, "RawHeight", (float)poly->texture->rawheight); |
| 2380 | (*d3dintf->effect.set_float)(curr_effect, "WidthRatio", 1.0f / (poly->texture->ustop - poly->texture->ustart)); |
| 2381 | (*d3dintf->effect.set_float)(curr_effect, "HeightRatio", 1.0f / (poly->texture->vstop - poly->texture->vstart)); |
| 2382 | |
| 2383 | result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); |
| 2384 | if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); |
| 2385 | |
| 2386 | (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); |
| 2387 | |
| 2388 | for (UINT pass = 0; pass < num_passes; pass++) |
| 2389 | { |
| 2390 | (*d3dintf->effect.begin_pass)(curr_effect, pass); |
| 2391 | // add the primitives |
| 2392 | result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); |
| 2393 | if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); |
| 2394 | (*d3dintf->effect.end_pass)(curr_effect); |
| 2395 | } |
| 2396 | |
| 2397 | (*d3dintf->effect.end)(curr_effect);*/ |
| 2398 | |
| 2372 | 2399 | vecbuf_type = poly->type; |
| 2373 | 2400 | vecbuf_index = vertnum; |
| 2374 | 2401 | vecbuf_count = poly->count; |
| r20388 | r20389 | |
| 2432 | 2459 | { |
| 2433 | 2460 | d3d_cache_target* target = (d3d_cache_target*)global_alloc_clear(d3d_cache_target); |
| 2434 | 2461 | |
| 2435 | | if (!target->init(d3d, d3dintf, width, height, xprescale, yprescale, true)) |
| 2462 | if (!target->init(d3d, d3dintf, width, height, xprescale, yprescale, false)) |
| 2436 | 2463 | { |
| 2437 | 2464 | global_free(target); |
| 2438 | 2465 | return false; |