mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
D3D: Fix 8-bit signed normals. Fixes lighting problems in Super Smash Bros Melee. misc tiny things
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4265 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -68,8 +68,9 @@ D3DDECLTYPE VarToD3D(VarType t, int size)
|
||||
static const D3DDECLTYPE lookup3[5] = {
|
||||
D3DDECLTYPE_UNUSED, D3DDECLTYPE_UNUSED, D3DDECLTYPE_UNUSED, D3DDECLTYPE_UNUSED, D3DDECLTYPE_FLOAT3,
|
||||
};
|
||||
// Sadly, D3D9 has no SBYTE4N. D3D10 does, though.
|
||||
static const D3DDECLTYPE lookup4[5] = {
|
||||
D3DDECLTYPE_UBYTE4N, D3DDECLTYPE_UBYTE4N, D3DDECLTYPE_SHORT4N, D3DDECLTYPE_USHORT4N, D3DDECLTYPE_FLOAT4,
|
||||
D3DDECLTYPE_UNUSED, D3DDECLTYPE_UBYTE4N, D3DDECLTYPE_SHORT4N, D3DDECLTYPE_USHORT4N, D3DDECLTYPE_FLOAT4,
|
||||
};
|
||||
D3DDECLTYPE retval = D3DDECLTYPE_UNUSED;
|
||||
switch (size) {
|
||||
@ -84,9 +85,6 @@ D3DDECLTYPE VarToD3D(VarType t, int size)
|
||||
return retval;
|
||||
}
|
||||
|
||||
// TODO: Ban signed bytes as normals - not likely that ATI supports them natively.
|
||||
// We probably won't see much of a speed loss, and any speed loss will be regained anyway
|
||||
// when we finally compile display lists.
|
||||
void D3DVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl)
|
||||
{
|
||||
vertex_stride = _vtx_decl.stride;
|
||||
|
@ -61,6 +61,7 @@ static bool s_AVIDumping;
|
||||
|
||||
#define NUMWNDRES 6
|
||||
extern int g_Res[NUMWNDRES][2];
|
||||
char st[32768];
|
||||
|
||||
void SetupDeviceObjects()
|
||||
{
|
||||
@ -266,15 +267,13 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
|
||||
D3D::GetBackBufferSurface(), dst_rect.AsRECT(),
|
||||
D3DTEXF_LINEAR);
|
||||
|
||||
char st[8192];
|
||||
// Finish up the current frame, print some stats
|
||||
if (g_ActiveConfig.bOverlayStats)
|
||||
{
|
||||
Statistics::ToString(st);
|
||||
D3D::font.DrawTextScaled(0,30,20,20,0.0f,0xFF00FFFF,st,false);
|
||||
}
|
||||
|
||||
if (g_ActiveConfig.bOverlayProjStats)
|
||||
else if (g_ActiveConfig.bOverlayProjStats)
|
||||
{
|
||||
Statistics::ToStringProj(st);
|
||||
D3D::font.DrawTextScaled(0,30,20,20,0.0f,0xFF00FFFF,st,false);
|
||||
|
@ -72,6 +72,11 @@ bool HandleDisplayList(u32 address, u32 size)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsD3D()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// This is used for the functions right below here which use wxwidgets
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
#ifdef _WIN32
|
||||
|
@ -107,6 +107,11 @@ static u32 s_swapRequested = FALSE;
|
||||
static u32 s_efbAccessRequested = FALSE;
|
||||
static bool ForceSwap = true;
|
||||
|
||||
bool IsD3D()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||
{
|
||||
_PluginInfo->Version = 0x0100;
|
||||
|
Reference in New Issue
Block a user