mirror of
https://github.com/aap/librw.git
synced 2024-11-30 15:45:42 +00:00
removed alpha channel from d3d cam textures
This commit is contained in:
parent
343694329f
commit
49c218b3a7
@ -469,6 +469,13 @@ rasterSetFormat(Raster *raster)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Raster::CAMERATEXTURE:
|
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:
|
case Raster::CAMERA:
|
||||||
raster->format = findFormatInfoD3D(d3d9Globals.present.BackBufferFormat)->rwFormat;
|
raster->format = findFormatInfoD3D(d3d9Globals.present.BackBufferFormat)->rwFormat;
|
||||||
// can this even happen? just do something...
|
// can this even happen? just do something...
|
||||||
|
@ -1077,9 +1077,10 @@ startD3D(void)
|
|||||||
|
|
||||||
uint32 width, height, depth;
|
uint32 width, height, depth;
|
||||||
D3DFORMAT format, zformat;
|
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
|
// Use window size in windowed mode, otherwise get size from video mode
|
||||||
if(windowed){
|
if(windowed){
|
||||||
@ -1090,8 +1091,8 @@ startD3D(void)
|
|||||||
}else{
|
}else{
|
||||||
// this will be much better for restoring after iconification
|
// this will be much better for restoring after iconification
|
||||||
SetWindowLong(d3d9Globals.window, GWL_STYLE, WS_POPUP);
|
SetWindowLong(d3d9Globals.window, GWL_STYLE, WS_POPUP);
|
||||||
width = d3d9Globals.modes[d3d9Globals.currentMode].mode.Width;
|
width = d3d9Globals.startMode.mode.Width;
|
||||||
height = d3d9Globals.modes[d3d9Globals.currentMode].mode.Height;
|
height = d3d9Globals.startMode.mode.Height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if we can get an alpha channel
|
// See if we can get an alpha channel
|
||||||
|
@ -37,6 +37,7 @@ struct D3d9Globals
|
|||||||
DisplayMode *modes;
|
DisplayMode *modes;
|
||||||
int numModes;
|
int numModes;
|
||||||
int currentMode;
|
int currentMode;
|
||||||
|
DisplayMode startMode;
|
||||||
|
|
||||||
D3DPRESENT_PARAMETERS present;
|
D3DPRESENT_PARAMETERS present;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user