Commit Graph

227 Commits

Author SHA1 Message Date
Glenn Maynard 55ab6954e8 update API 2007-03-26 00:35:14 +00:00
Glenn Maynard b09c06c355 typo 2007-03-22 18:58:19 +00:00
Glenn Maynard bf16705d1e handle BGRA8; nVidia cards prefer this format 2007-03-22 05:30:19 +00:00
Glenn Maynard 5dc6e79d3c X1R5G5B5 format 2007-03-20 07:51:56 +00:00
Glenn Maynard 8ae6f53bfb CopySrc blend mode 2007-02-24 23:30:29 +00:00
Glenn Maynard 7625525b81 DeleteTexture(0) noop 2007-02-14 02:01:33 +00:00
Glenn Maynard 5b4a7a6ac8 remove unused g_currentTextureUnit 2007-02-13 06:06:49 +00:00
Glenn Maynard 4a01ceaaa8 fix optimization 2007-02-13 06:05:51 +00:00
Glenn Maynard 5600e93d3a add TextureUnit param to SetSphereEnvironmentMapping 2007-02-13 06:04:30 +00:00
Glenn Maynard a9fd52cce0 add TextureUnit param to SetTextureWrapping 2007-02-13 05:56:24 +00:00
Glenn Maynard 863062f7d1 add TextureUnit param to SetTextureFiltering 2007-02-13 05:09:54 +00:00
Glenn Maynard ebb7189b88 add TextureUnit param to SetTextureMode 2007-02-13 04:59:05 +00:00
Glenn Maynard 4b707da08b merge SetTextureMode functions 2007-02-13 04:02:08 +00:00
Glenn Maynard 2cebe3ef34 fix crash with empty models 2007-02-07 05:54:13 +00:00
Glenn Maynard 74aaecc2b9 add RageDisplay::DrawSymmetricQuadStrip 2007-01-15 08:08:57 +00:00
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