trunk/src/osd/windows/drawd3d.c
| r20094 | r20095 | |
| 787 | 787 | } |
| 788 | 788 | } |
| 789 | 789 | |
| 790 | | if (d3d->default_bitmap.valid()) |
| 791 | | { |
| 792 | | render_texinfo texture; |
| 793 | | |
| 794 | | // fake in the basic data so it looks like it came from render.c |
| 795 | | texture.base = d3d->default_bitmap.raw_pixptr(0); |
| 796 | | texture.rowpixels = d3d->default_bitmap.rowpixels(); |
| 797 | | texture.width = d3d->default_bitmap.width(); |
| 798 | | texture.height = d3d->default_bitmap.height(); |
| 799 | | texture.palette = NULL; |
| 800 | | texture.seqid = 0; |
| 801 | | |
| 802 | | // now create it |
| 803 | | d3d->default_texture = texture_create(d3d, &texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32)); |
| 804 | | } |
| 805 | | |
| 806 | 790 | int ret = d3d->hlsl->create_resources(false); |
| 807 | 791 | if (ret != 0) |
| 808 | 792 | return ret; |
| r20094 | r20095 | |
| 871 | 855 | result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); |
| 872 | 856 | result = (*d3dintf->device.present)(d3d->device, NULL, NULL, NULL, NULL, 0); |
| 873 | 857 | |
| 858 | if (d3d->default_bitmap.valid()) |
| 859 | { |
| 860 | render_texinfo texture; |
| 861 | |
| 862 | // fake in the basic data so it looks like it came from render.c |
| 863 | texture.base = d3d->default_bitmap.raw_pixptr(0); |
| 864 | texture.rowpixels = d3d->default_bitmap.rowpixels(); |
| 865 | texture.width = d3d->default_bitmap.width(); |
| 866 | texture.height = d3d->default_bitmap.height(); |
| 867 | texture.palette = NULL; |
| 868 | texture.seqid = 0; |
| 869 | |
| 870 | // now create it |
| 871 | d3d->default_texture = texture_create(d3d, &texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32)); |
| 872 | } |
| 873 | |
| 874 | 874 | // experimental: if we have a vector bitmap, create a texture for it |
| 875 | 875 | if (d3d->vector_bitmap.valid()) |
| 876 | 876 | { |
| r20094 | r20095 | |
| 952 | 952 | d3d->vertexbuf = NULL; |
| 953 | 953 | |
| 954 | 954 | global_free(d3d->default_texture); |
| 955 | d3d->default_texture = NULL; |
| 955 | 956 | } |
| 956 | 957 | |
| 957 | 958 | |