mirror of https://github.com/aap/librw.git
removed alpha channel from d3d cam textures
This commit is contained in:
parent
343694329f
commit
49c218b3a7
|
@ -469,6 +469,13 @@ rasterSetFormat(Raster *raster)
|
|||
break;
|
||||
|
||||
case Raster::CAMERATEXTURE:
|
||||
// let's not use this because we apparently don't want alpha
|
||||
// raster->format = findFormatInfoD3D(d3d9Globals.present.BackBufferFormat)->rwFormat;
|
||||
raster->format = findFormatInfoD3D(d3d9Globals.startMode.mode.Format)->rwFormat;
|
||||
// can this even happen? just do something...
|
||||
if(raster->format == 0)
|
||||
raster->format = Raster::C888;
|
||||
break;
|
||||
case Raster::CAMERA:
|
||||
raster->format = findFormatInfoD3D(d3d9Globals.present.BackBufferFormat)->rwFormat;
|
||||
// can this even happen? just do something...
|
||||
|
|
|
@ -1077,9 +1077,10 @@ startD3D(void)
|
|||
|
||||
uint32 width, height, depth;
|
||||
D3DFORMAT format, zformat;
|
||||
format = d3d9Globals.modes[d3d9Globals.currentMode].mode.Format;
|
||||
d3d9Globals.startMode = d3d9Globals.modes[d3d9Globals.currentMode];
|
||||
format = d3d9Globals.startMode.mode.Format;
|
||||
|
||||
bool windowed = !(d3d9Globals.modes[d3d9Globals.currentMode].flags & VIDEOMODEEXCLUSIVE);
|
||||
bool windowed = !(d3d9Globals.startMode.flags & VIDEOMODEEXCLUSIVE);
|
||||
|
||||
// Use window size in windowed mode, otherwise get size from video mode
|
||||
if(windowed){
|
||||
|
@ -1090,8 +1091,8 @@ startD3D(void)
|
|||
}else{
|
||||
// this will be much better for restoring after iconification
|
||||
SetWindowLong(d3d9Globals.window, GWL_STYLE, WS_POPUP);
|
||||
width = d3d9Globals.modes[d3d9Globals.currentMode].mode.Width;
|
||||
height = d3d9Globals.modes[d3d9Globals.currentMode].mode.Height;
|
||||
width = d3d9Globals.startMode.mode.Width;
|
||||
height = d3d9Globals.startMode.mode.Height;
|
||||
}
|
||||
|
||||
// See if we can get an alpha channel
|
||||
|
|
|
@ -37,6 +37,7 @@ struct D3d9Globals
|
|||
DisplayMode *modes;
|
||||
int numModes;
|
||||
int currentMode;
|
||||
DisplayMode startMode;
|
||||
|
||||
D3DPRESENT_PARAMETERS present;
|
||||
|
||||
|
|
Loading…
Reference in New Issue