Commit Graph

212 Commits

Author SHA1 Message Date
Glenn Maynard 617e8b5335 FOREACH_ENUM2 -> FOREACH_ENUM 2006-10-07 08:56:58 +00:00
Glenn Maynard b15ce96511 delete Texture 2006-09-24 18:46:06 +00:00
Glenn Maynard 7e6bd294cd revert changes that seem to not do anything 2006-09-24 18:44:55 +00:00
Renaud Lepage 6ff3755d60 Patch made by Vecais_Dumais_Laacis. No code modifications made by Renaud Lepage.
This patch finally gets Xbox colors and tex. corruption problems out, and a running product in.

1- Only one texture color mode will be allowed.
2- No palletized textures on Xbox.
3- Manually invert colors.

Thanks to Andis, the author.
2006-09-23 21:56:43 +00:00
Renaud Lepage c644c890c6 Update to use the Xbox GraphicsWindow resource. 2006-09-19 03:16:05 +00:00
Renaud Lepage 51bbfb87f3 FIXME: Aspect ratio. Solved with a recent commit to the Xbox GraphicsScreen. 2006-09-15 15:06:55 +00:00
Glenn Maynard 9c73aed254 Do SetDefaultRenderStates in BeginFrame, instead of on init,
so we don't depend on state being preserved long-term, and
so every renderer doesn't have to do this.
2006-07-25 20:10:56 +00:00
Glenn Maynard 2ddb0c2912 Use "i" for ints; don't distinguish between signed and unsigned. (If we're
marking unsigned ints, that seems to imply marking long ints, doubles vs.
floats, etc; Hungarian serves little enough purpose without being that fine-
grained.)
2006-07-24 06:11:37 +00:00
Glenn Maynard d0bcf2052d RageTexture is a wrapper around RageDisplay's textures; RageDisplay
itself doesn't use it.  Don't pass in RageTexture to SetTexture;
use RageDisplay's native texture handles.
2006-07-23 03:19:49 +00:00
Glenn Maynard 7a94b959c9 Destroy D3D after destroying the window. Fixes another DestroyWindow
crash: start in fullscreen, change to a window, close the game.

This is sort of trial-and-error: there seems to be no documentation about
the proper order of shutting down a window.  Shutting down D3D first
makes sense: restore the window to normal, then destroy it, so we don't
kill the window while D3D is still using it.  But this seems to work, and
it's how we did it in 3.9.

(I think releasing D3D first is leaving traces behind in the window, which
then cause stale dereferences; the previous FreeLibrary() change was for
the same problem, and this seems to just be another incarnation of that.)

7c918fea: ntdll!RtlpWaitForCriticalSection [7c900000+18f8f+5b]
77d48bd9: USER32!GetWindowThreadProcessId [77d40000+8a80+159]
77d4b3cc: USER32!DefWindowProcW [77d40000+b33c+90]
7c90104b: ntdll!RtlEnterCriticalSection [7c900000+1005+46]
6d9ab228: D3D8!CheckFullscreen [6d9a0000+b060+1c8]
77d48734: USER32!GetDC [77d40000+86c7+6d]
77d4b4c0: USER32!DefWindowProcW [77d40000+b33c+184]
7c90eae3: ntdll!KiUserCallbackDispatcher [7c900000+ead0+13]
77d4daf6: USER32!DestroyWindow [77d40000+daea+c]
00539971: void GraphicsWindow::DestroyGraphicsWindow(void) [00400000+1398d1+a0]
2006-04-10 15:08:04 +00:00
Glenn Maynard 663d6cc787 typo 2006-04-05 22:19:10 +00:00
Glenn Maynard df6d3fcc7e rare crash that I havn't been able to repro:
6d9ab2a0: StepMania!00000000
77d48734: USER32!GetDC [77d40000+86c7+6d]
77d4d05b: USER32!EnumDisplayMonitors [77d40000+cf63+f8]
77d4b4c0: USER32!DefWindowProcW [77d40000+b33c+184]
77d4cf9e: USER32!EnumDisplayMonitors [77d40000+cf63+3b]
7c90eae3: ntdll!KiUserCallbackDispatcher [7c900000+ead0+13]
77d4daf6: USER32!DestroyWindow [77d40000+daea+c]
005ddc02: void GraphicsWindow::DestroyGraphicsWindow(void)
005de55e: void GraphicsWindow::Shutdown(void)
7c917304: ntdll!LdrUnloadDll [7c900000+1718b+179]
006716eb: RageDisplay_D3D::~RageDisplay_D3D(void)

0x6d9ab2a0 lies within D3D8.DLL, which LdrUnloadDll unloaded.
2006-04-05 04:10:03 +00:00
Glenn Maynard 8d6c634d1e clear these; they're global (though we won't create two RageDisplay_D3D
objects in one run)
2006-03-28 12:24:00 +00:00
Glenn Maynard 52ec9b3737 The half-pixel offset fix has been in world space: the theme's resolution
is usually 640x480, and we shifted by -0.5x-0.5 there.  That works for 640x480,
but is incorrect for other resolutions.  Do this in projection space, just like
the centering matrix.

An easy way to test this is to set 1280x960 (2x resolution), create a 1280x960
texture, and display it fullscreen in-game.  Just like at 640x480 with a 640x480
graphic, the texture should be displayed pixel-for-pixel identically to the source
(when in 32-bit).
2006-03-26 22:06:19 +00:00
Glenn Maynard 72c25d79d9 now this seems backwards. Something else is funky ... 2006-03-16 00:50:47 +00:00
Glenn Maynard 6ddc84613d fix d3d output off by one pixel 2006-03-14 07:33:46 +00:00
Chris Danford 4c0038e142 fix model glow 2006-02-28 17:50:00 +00:00
Glenn Maynard fa1dec128f cleanup 2006-02-08 03:43:49 +00:00
Glenn Maynard 4b09a38d36 build fix 2006-02-08 03:39:57 +00:00
Steve Checkoway a65d13c6d1 class -> typedef set. 2006-02-07 08:29:36 +00:00
Glenn Maynard 47cd3ee640 fix vc7 compile 2006-02-07 07:12:42 +00:00
Chris Danford bcf84d9bda re-add Auto AR. Tie it to the desktop resolution which does not change when toggling between fullscreen and windowed. This assumes that the desktop resolution is using square pixels. This assumption will hold true for all out-of-the-box machines with a widescreen display. 2006-02-06 23:40:28 +00:00
Chris Danford 025e970b3d make hard-coded strings localizable 2006-02-06 20:41:05 +00:00
Chris Danford dbafa29a88 make RageDisplay::Init virtual to remove dupe code 2006-02-06 20:14:02 +00:00
Renaud Lepage 11af21d11b Reverted a change, and put the IFDEF a little higher for testing purposes. 2006-01-24 00:21:11 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Chris Danford 65aff05a13 fix compile 2006-01-20 08:33:27 +00:00
Glenn Maynard aeee577a35 cleanup 2006-01-20 05:14:31 +00:00
Glenn Maynard b11705de07 When we get D3DERR_DEVICENOTRESET, we should go back to the mode
we were in when we lost the device, not do a complete mode search
from scratch.  This fixes a dependency on the behavior of storing
the last successful mode change back into PREFSMAN.  (This is
D3D's equivalent to the WM_ACTIVATE -> ChangeDisplaySettings code
in GraphicsWindow.)
2006-01-20 00:16:26 +00:00
Glenn Maynard 626427c00c clear g_TexResourceToPaletteIndex in SetD3DParams 2006-01-19 23:59:17 +00:00
Glenn Maynard fbdfd26ae1 split out SetPresentParametersFromVideoModeParams to make
RageDisplay_D3D::TryVideoMode clearer
2006-01-19 23:57:40 +00:00
Glenn Maynard 7e5975597f cleanup 2006-01-19 22:40:06 +00:00
Glenn Maynard 466bfb054c cleanup 2006-01-19 22:38:30 +00:00
Glenn Maynard defe191939 simplify 2006-01-17 01:45:39 +00:00
Glenn Maynard affaf07d35 rename ConfigureGraphicsWindow -> CreateGraphicsWindow 2006-01-15 01:43:04 +00:00
Glenn Maynard 16c7813949 remove SetVideoModeParams call 2006-01-15 01:07:32 +00:00
Glenn Maynard 50b0f360f4 CreateGraphicsWindow is done by ConfigureGraphicsWindow 2006-01-15 00:59:32 +00:00
Glenn Maynard e8b9863052 static 2005-12-29 19:34:28 +00:00
Glenn Maynard cea50ab97c header cleanup 2005-12-29 18:33:57 +00:00
Glenn Maynard 336e3be92b call base (even though it happens to be a no-op right now) 2005-12-29 07:45:06 +00:00
Glenn Maynard a2ada6b973 Rage* shouldn't depend on ScreenDimensions (uses ThemeMan) 2005-12-04 17:16:52 +00:00
Glenn Maynard e217a25dce unused 2005-12-04 17:16:06 +00:00
Chris Danford 800158e185 move floating globals into a namespace 2005-12-02 01:16:28 +00:00
Chris Danford 730a113ed6 enumerate resolutions
use mixed case for prefs values
2005-11-26 07:22:33 +00:00
Chris Danford b3c7b9c99d fix viewport not correctly reset when alt+tabbing out of and back into full-screen opengl 2005-11-24 10:40:23 +00:00
Chris Danford 5c6457d938 make closer to OpenGL sphere mapping 2005-11-23 22:16:09 +00:00
Renaud Lepage cb34951e33 Xbox fix for RGBA8 2005-11-16 04:28:44 +00:00
Glenn Maynard 4f52fab65a In OpenGL (not D3D), it's our job to unset and reset the full-screen video mode
when we lose focus.
2005-11-11 21:22:18 +00:00
Chris Danford d081c0902c make sphere mapping texture coords look more like OpenGL (though it's still significantly different when viewing side-by-side) 2005-11-11 21:11:30 +00:00
Chris Danford 311fd70573 when resetting the D3D device, use the preferred video mode and not the current desktop mode. This fixes "Win98, full-screen, alt-tab away, alt-tab back and the game is running fullscreen at the desktop video mode" 2005-11-10 18:55:03 +00:00