winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
720 discussions
Start a n
N
ew thread
Alexandre Julliard : shlwapi: Fixed string tests for non-English locales.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: f662e2548b87d578bf9188f220541e45887aa1c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f662e2548b87d578bf9188f22…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 8 12:55:43 2006 +0100 shlwapi: Fixed string tests for non-English locales. --- dlls/shlwapi/tests/string.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 5bed266..6369a87 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -761,8 +761,8 @@ START_TEST(string) TCHAR decimalDelim[8]; CoInitialize(0); - GetLocaleInfo(GetUserDefaultLCID(), LOCALE_STHOUSAND, thousandDelim, 8); - GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SDECIMAL, decimalDelim, 8); + GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, thousandDelim, 8); + GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8); hShlwapi = GetModuleHandleA("shlwapi"); if (!hShlwapi) @@ -787,11 +787,13 @@ START_TEST(string) test_StrFormatKBSizeA(); test_StrFormatKBSizeW(); } - if (0) - { - /* language-dependent test. FIXME: how to detect the language? */ + + /* language-dependent test */ + if (PRIMARYLANGID(GetUserDefaultLangID()) != LANG_ENGLISH) + trace("Skipping StrFromTimeInterval test for non English language\n"); + else test_StrFromTimeIntervalA(); - } + test_StrCmpA(); test_StrCmpW(); test_StrRetToBSTR();
1
0
0
0
Stefan Dösinger : wined3d: Move blending related states to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: 1f07e4af18f80ac0ec208b0883669dc6bff04fe5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f07e4af18f80ac0ec208b088…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:51:11 2006 +0100 wined3d: Move blending related states to the state table. --- dlls/wined3d/device.c | 93 +++------------------------------------ dlls/wined3d/state.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 117 insertions(+), 93 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1f07e4af18f80ac0ec208…
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_AMBIENT to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: 28cc3c8d6b3ab9fd500f94aa3976c0b47eda8fcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28cc3c8d6b3ab9fd500f94aa3…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:45:26 2006 +0100 wined3d: Move WINED3DRS_AMBIENT to the state table. --- dlls/wined3d/device.c | 12 +----------- dlls/wined3d/state.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b51f32d..36dd77d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3444,18 +3444,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_DITHERENABLE : case WINED3DRS_ZWRITEENABLE : case WINED3DRS_ZFUNC : - StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); - break; - case WINED3DRS_AMBIENT : - { - float col[4]; - D3DCOLORTOGLFLOAT4(Value, col); - TRACE("Setting ambient to (%f,%f,%f,%f)\n", col[0], col[1], col[2], col[3]); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, col); - checkGLcall("glLightModel for MODEL_AMBIENT"); - - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_ALPHABLENDENABLE : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 684ff94..83e05bc 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -204,6 +204,15 @@ static void state_zfunc(DWORD state, IWi } } +static void state_ambient(DWORD state, IWineD3DStateBlockImpl *stateblock) { + float col[4]; + D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_AMBIENT], col); + + TRACE("Setting ambient to (%f,%f,%f,%f)\n", col[0], col[1], col[2], col[3]); + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, col); + checkGLcall("glLightModel for MODEL_AMBIENT"); +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -348,7 +357,7 @@ const struct StateEntry StateTable[] = { /*136, WINED3DRS_CLIPPING */ STATE_RENDER(WINED3DRS_CLIPPING), state_unknown }, { /*137, WINED3DRS_LIGHTING */ STATE_RENDER(WINED3DRS_LIGHTING) /* Vertex decl! */,state_lighting }, { /*138, WINED3DRS_EXTENTS */ STATE_RENDER(WINED3DRS_EXTENTS), state_unknown }, - { /*139, WINED3DRS_AMBIENT */ STATE_RENDER(WINED3DRS_AMBIENT), state_unknown }, + { /*139, WINED3DRS_AMBIENT */ STATE_RENDER(WINED3DRS_AMBIENT), state_ambient }, { /*140, WINED3DRS_FOGVERTEXMODE */ STATE_RENDER(WINED3DRS_FOGENABLE), state_unknown }, { /*141, WINED3DRS_COLORVERTEX */ STATE_RENDER(WINED3DRS_COLORVERTEX), state_unknown }, { /*142, WINED3DRS_LOCALVIEWER */ STATE_RENDER(WINED3DRS_LOCALVIEWER), state_unknown },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_ZFUNCENABLE to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: 2ac48e81541852358a7d9ec0dddd23c882f476b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ac48e81541852358a7d9ec0d…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:44:55 2006 +0100 wined3d: Move WINED3DRS_ZFUNCENABLE to the state table. --- dlls/wined3d/device.c | 12 +----------- dlls/wined3d/state.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 291f795..b51f32d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3443,18 +3443,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_SHADEMODE : case WINED3DRS_DITHERENABLE : case WINED3DRS_ZWRITEENABLE : - StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); - break; - case WINED3DRS_ZFUNC : - { - int glParm = CompareFunc(Value); - - if(glParm) { - glDepthFunc(glParm); - checkGLcall("glDepthFunc"); - } - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_AMBIENT : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 3f9aeec..684ff94 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -195,6 +195,15 @@ static void state_zwritenable(DWORD stat } } +static void state_zfunc(DWORD state, IWineD3DStateBlockImpl *stateblock) { + int glParm = CompareFunc(stateblock->renderState[WINED3DRS_ZFUNC]); + + if(glParm) { + glDepthFunc(glParm); + checkGLcall("glDepthFunc"); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -221,7 +230,7 @@ const struct StateEntry StateTable[] = { /* 20, WINED3DRS_DESTBLEND */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_unknown }, { /* 21, WINED3DRS_TEXTUREMAPBLEND */ 0 /* Handled in ddraw */, state_undefined }, { /* 22, WINED3DRS_CULLMODE */ STATE_RENDER(WINED3DRS_CULLMODE), state_cullmode }, - { /* 23, WINED3DRS_ZFUNC */ STATE_RENDER(WINED3DRS_ZFUNC), state_unknown }, + { /* 23, WINED3DRS_ZFUNC */ STATE_RENDER(WINED3DRS_ZFUNC), state_zfunc }, { /* 24, WINED3DRS_ALPHAREF */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown }, { /* 25, WINED3DRS_ALPHAFUNC */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown }, { /* 26, WINED3DRS_DITHERENABLE */ STATE_RENDER(WINED3DRS_DITHERENABLE), state_ditherenable },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_ZWRITEENABLE to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: 8879c7d8ddf74ae6fc8ba047c9627a84ab88efeb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8879c7d8ddf74ae6fc8ba047c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:43:25 2006 +0100 wined3d: Move WINED3DRS_ZWRITEENABLE to the state table. --- dlls/wined3d/device.c | 11 +---------- dlls/wined3d/state.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 91acffd..291f795 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3442,17 +3442,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_CULLMODE : case WINED3DRS_SHADEMODE : case WINED3DRS_DITHERENABLE : - StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); - break; - case WINED3DRS_ZWRITEENABLE : - if (Value) { - glDepthMask(1); - checkGLcall("glDepthMask"); - } else { - glDepthMask(0); - checkGLcall("glDepthMask"); - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_ZFUNC : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 0d104e0..3f9aeec 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -182,6 +182,19 @@ static void state_ditherenable(DWORD sta } } +static void state_zwritenable(DWORD state, IWineD3DStateBlockImpl *stateblock) { + /* TODO: Test if in d3d z writing is enabled even if ZENABLE is off. If yes, + * this has to be merged with ZENABLE and ZFUNC + */ + if (stateblock->renderState[WINED3DRS_ZWRITEENABLE]) { + glDepthMask(1); + checkGLcall("glDepthMask(1)"); + } else { + glDepthMask(0); + checkGLcall("glDepthMask(0)"); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -199,7 +212,7 @@ const struct StateEntry StateTable[] = { /* 11, WINED3DRS_MONOENABLE */ STATE_RENDER(WINED3DRS_MONOENABLE), state_unknown }, { /* 12, WINED3DRS_ROP2 */ STATE_RENDER(WINED3DRS_ROP2), state_unknown }, { /* 13, WINED3DRS_PLANEMASK */ STATE_RENDER(WINED3DRS_PLANEMASK), state_unknown }, - { /* 14, WINED3DRS_ZWRITEENABLE */ STATE_RENDER(WINED3DRS_ZWRITEENABLE), state_unknown }, + { /* 14, WINED3DRS_ZWRITEENABLE */ STATE_RENDER(WINED3DRS_ZWRITEENABLE), state_zwritenable }, { /* 15, WINED3DRS_ALPHATESTENABLE */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown }, { /* 16, WINED3DRS_LASTPIXEL */ STATE_RENDER(WINED3DRS_LASTPIXEL), state_unknown }, { /* 17, WINED3DRS_TEXTUREMAG */ 0 /* Handled in ddraw */, state_undefined },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_DITHERENABLE to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: bb622e81bd8de7bc73a807693a05b74d604bbe42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb622e81bd8de7bc73a807693…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:42:43 2006 +0100 wined3d: Move WINED3DRS_DITHERENABLE to the state table. --- dlls/wined3d/device.c | 12 +----------- dlls/wined3d/state.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8a073be..91acffd 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3441,18 +3441,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_ZENABLE : case WINED3DRS_CULLMODE : case WINED3DRS_SHADEMODE : - StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); - break; - - case WINED3DRS_DITHERENABLE : - if (Value) { - glEnable(GL_DITHER); - checkGLcall("glEnable GL_DITHER"); - } else { - glDisable(GL_DITHER); - checkGLcall("glDisable GL_DITHER"); - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_ZWRITEENABLE : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 5f6397f..0d104e0 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -172,6 +172,16 @@ static void state_shademode(DWORD state, } } +static void state_ditherenable(DWORD state, IWineD3DStateBlockImpl *stateblock) { + if (stateblock->renderState[WINED3DRS_DITHERENABLE]) { + glEnable(GL_DITHER); + checkGLcall("glEnable GL_DITHER"); + } else { + glDisable(GL_DITHER); + checkGLcall("glDisable GL_DITHER"); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -201,7 +211,7 @@ const struct StateEntry StateTable[] = { /* 23, WINED3DRS_ZFUNC */ STATE_RENDER(WINED3DRS_ZFUNC), state_unknown }, { /* 24, WINED3DRS_ALPHAREF */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown }, { /* 25, WINED3DRS_ALPHAFUNC */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown }, - { /* 26, WINED3DRS_DITHERENABLE */ STATE_RENDER(WINED3DRS_DITHERENABLE), state_unknown }, + { /* 26, WINED3DRS_DITHERENABLE */ STATE_RENDER(WINED3DRS_DITHERENABLE), state_ditherenable }, { /* 27, WINED3DRS_ALPHABLENDENABLE */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_unknown }, { /* 28, WINED3DRS_FOGENABLE */ STATE_RENDER(WINED3DRS_FOGENABLE), state_unknown }, { /* 29, WINED3DRS_SPECULARENABLE */ STATE_RENDER(WINED3DRS_SPECULARENABLE), state_unknown },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_SHADEMODE to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: 68f1082284797a83e735cb1c2db5a3d8ca6729cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68f1082284797a83e735cb1c2…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:42:16 2006 +0100 wined3d: Move WINED3DRS_SHADEMODE to the state table. --- dlls/wined3d/device.c | 18 +----------------- dlls/wined3d/state.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 9c58a7b..8a073be 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3440,26 +3440,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_LIGHTING : case WINED3DRS_ZENABLE : case WINED3DRS_CULLMODE : + case WINED3DRS_SHADEMODE : StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; - case WINED3DRS_SHADEMODE : - switch ((WINED3DSHADEMODE) Value) { - case WINED3DSHADE_FLAT: - glShadeModel(GL_FLAT); - checkGLcall("glShadeModel"); - break; - case WINED3DSHADE_GOURAUD: - glShadeModel(GL_SMOOTH); - checkGLcall("glShadeModel"); - break; - case WINED3DSHADE_PHONG: - FIXME("WINED3DSHADE_PHONG isn't supported\n"); - break; - default: - FIXME("Unrecognized/Unhandled WINED3DSHADEMODE value %d\n", Value); - } - break; case WINED3DRS_DITHERENABLE : if (Value) { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 59f1cba..5f6397f 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -154,6 +154,24 @@ static void state_cullmode(DWORD state, } } +static void state_shademode(DWORD state, IWineD3DStateBlockImpl *stateblock) { + switch ((WINED3DSHADEMODE) stateblock->renderState[WINED3DRS_SHADEMODE]) { + case WINED3DSHADE_FLAT: + glShadeModel(GL_FLAT); + checkGLcall("glShadeModel(GL_FLAT)"); + break; + case WINED3DSHADE_GOURAUD: + glShadeModel(GL_SMOOTH); + checkGLcall("glShadeModel(GL_SMOOTH)"); + break; + case WINED3DSHADE_PHONG: + FIXME("WINED3DSHADE_PHONG isn't supported\n"); + break; + default: + FIXME("Unrecognized/Unhandled WINED3DSHADEMODE value %d\n", stateblock->renderState[WINED3DRS_SHADEMODE]); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -166,7 +184,7 @@ const struct StateEntry StateTable[] = { /* 6, WINED3DRS_WRAPV */ STATE_RENDER(WINED3DRS_WRAPV), state_unknown }, { /* 7, WINED3DRS_ZENABLE */ STATE_RENDER(WINED3DRS_ZENABLE), state_zenable }, { /* 8, WINED3DRS_FILLMODE */ STATE_RENDER(WINED3DRS_FILLMODE), state_fillmode }, - { /* 9, WINED3DRS_SHADEMODE */ STATE_RENDER(WINED3DRS_SHADEMODE), state_unknown }, + { /* 9, WINED3DRS_SHADEMODE */ STATE_RENDER(WINED3DRS_SHADEMODE), state_shademode }, { /* 10, WINED3DRS_LINEPATTERN */ STATE_RENDER(WINED3DRS_LINEPATTERN), state_unknown }, { /* 11, WINED3DRS_MONOENABLE */ STATE_RENDER(WINED3DRS_MONOENABLE), state_unknown }, { /* 12, WINED3DRS_ROP2 */ STATE_RENDER(WINED3DRS_ROP2), state_unknown },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_CULLMODE to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: e4b4c040f08e71de2c6f6be76602110a76c4441d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4b4c040f08e71de2c6f6be76…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:41:43 2006 +0100 wined3d: Move WINED3DRS_CULLMODE to the state table. --- dlls/wined3d/device.c | 40 +--------------------------------------- dlls/wined3d/state.c | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4936fa6..9c58a7b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3439,46 +3439,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl case WINED3DRS_FILLMODE : case WINED3DRS_LIGHTING : case WINED3DRS_ZENABLE : - StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); - break; - case WINED3DRS_CULLMODE : - - /* If we are culling "back faces with clockwise vertices" then - set front faces to be counter clockwise and enable culling - of back faces */ - switch ((WINED3DCULL) Value) { - case WINED3DCULL_NONE: - glDisable(GL_CULL_FACE); - checkGLcall("glDisable GL_CULL_FACE"); - break; - case WINED3DCULL_CW: - glEnable(GL_CULL_FACE); - checkGLcall("glEnable GL_CULL_FACE"); - if (This->render_offscreen) { - glFrontFace(GL_CW); - checkGLcall("glFrontFace GL_CW"); - } else { - glFrontFace(GL_CCW); - checkGLcall("glFrontFace GL_CCW"); - } - glCullFace(GL_BACK); - break; - case WINED3DCULL_CCW: - glEnable(GL_CULL_FACE); - checkGLcall("glEnable GL_CULL_FACE"); - if (This->render_offscreen) { - glFrontFace(GL_CCW); - checkGLcall("glFrontFace GL_CCW"); - } else { - glFrontFace(GL_CW); - checkGLcall("glFrontFace GL_CW"); - } - glCullFace(GL_BACK); - break; - default: - FIXME("Unrecognized/Unhandled WINED3DCULL value %d\n", Value); - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_SHADEMODE : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index b47847a..59f1cba 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -114,6 +114,46 @@ static void state_zenable(DWORD state, I } } +static void state_cullmode(DWORD state, IWineD3DStateBlockImpl *stateblock) { + /* TODO: Put this into the offscreen / onscreen rendering block due to device->render_offscreen */ + + /* If we are culling "back faces with clockwise vertices" then + set front faces to be counter clockwise and enable culling + of back faces */ + switch ((WINED3DCULL) stateblock->renderState[WINED3DRS_CULLMODE]) { + case WINED3DCULL_NONE: + glDisable(GL_CULL_FACE); + checkGLcall("glDisable GL_CULL_FACE"); + break; + case WINED3DCULL_CW: + glEnable(GL_CULL_FACE); + checkGLcall("glEnable GL_CULL_FACE"); + if (stateblock->wineD3DDevice->render_offscreen) { + glFrontFace(GL_CW); + checkGLcall("glFrontFace GL_CW"); + } else { + glFrontFace(GL_CCW); + checkGLcall("glFrontFace GL_CCW"); + } + glCullFace(GL_BACK); + break; + case WINED3DCULL_CCW: + glEnable(GL_CULL_FACE); + checkGLcall("glEnable GL_CULL_FACE"); + if (stateblock->wineD3DDevice->render_offscreen) { + glFrontFace(GL_CCW); + checkGLcall("glFrontFace GL_CCW"); + } else { + glFrontFace(GL_CW); + checkGLcall("glFrontFace GL_CW"); + } + glCullFace(GL_BACK); + break; + default: + FIXME("Unrecognized/Unhandled WINED3DCULL value %d\n", stateblock->renderState[WINED3DRS_CULLMODE]); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -139,7 +179,7 @@ const struct StateEntry StateTable[] = { /* 19, WINED3DRS_SRCBLEND */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_unknown }, { /* 20, WINED3DRS_DESTBLEND */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_unknown }, { /* 21, WINED3DRS_TEXTUREMAPBLEND */ 0 /* Handled in ddraw */, state_undefined }, - { /* 22, WINED3DRS_CULLMODE */ STATE_RENDER(WINED3DRS_CULLMODE), state_unknown }, + { /* 22, WINED3DRS_CULLMODE */ STATE_RENDER(WINED3DRS_CULLMODE), state_cullmode }, { /* 23, WINED3DRS_ZFUNC */ STATE_RENDER(WINED3DRS_ZFUNC), state_unknown }, { /* 24, WINED3DRS_ALPHAREF */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown }, { /* 25, WINED3DRS_ALPHAFUNC */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_unknown },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_ZENABLE to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: bb564dc6fa7ca6ed44ad9ca6c41050f9bfc6720d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb564dc6fa7ca6ed44ad9ca6c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:40:51 2006 +0100 wined3d: Move WINED3DRS_ZENABLE to the state table. --- dlls/wined3d/device.c | 21 +-------------------- dlls/wined3d/state.c | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dc1467b..4936fa6 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3438,27 +3438,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl switch (State) { case WINED3DRS_FILLMODE : case WINED3DRS_LIGHTING : - StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); - break; - case WINED3DRS_ZENABLE : - switch ((WINED3DZBUFFERTYPE) Value) { - case WINED3DZB_FALSE: - glDisable(GL_DEPTH_TEST); - checkGLcall("glDisable GL_DEPTH_TEST"); - break; - case WINED3DZB_TRUE: - glEnable(GL_DEPTH_TEST); - checkGLcall("glEnable GL_DEPTH_TEST"); - break; - case WINED3DZB_USEW: - glEnable(GL_DEPTH_TEST); - checkGLcall("glEnable GL_DEPTH_TEST"); - FIXME("W buffer is not well handled\n"); - break; - default: - FIXME("Unrecognized WINED3DZBUFFERTYPE value %d\n", Value); - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_CULLMODE : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 06cb342..b47847a 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -94,6 +94,26 @@ static void state_lighting(DWORD state, } } +static void state_zenable(DWORD state, IWineD3DStateBlockImpl *stateblock) { + switch ((WINED3DZBUFFERTYPE) stateblock->renderState[WINED3DRS_ZENABLE]) { + case WINED3DZB_FALSE: + glDisable(GL_DEPTH_TEST); + checkGLcall("glDisable GL_DEPTH_TEST"); + break; + case WINED3DZB_TRUE: + glEnable(GL_DEPTH_TEST); + checkGLcall("glEnable GL_DEPTH_TEST"); + break; + case WINED3DZB_USEW: + glEnable(GL_DEPTH_TEST); + checkGLcall("glEnable GL_DEPTH_TEST"); + FIXME("W buffer is not well handled\n"); + break; + default: + FIXME("Unrecognized D3DZBUFFERTYPE value %d\n", stateblock->renderState[WINED3DRS_ZENABLE]); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -104,7 +124,7 @@ const struct StateEntry StateTable[] = { /* 4, WINED3DRS_TEXTUREPERSPECTIVE */ STATE_RENDER(WINED3DRS_TEXTUREPERSPECTIVE), state_unknown }, { /* 5, WINED3DRS_WRAPU */ STATE_RENDER(WINED3DRS_WRAPU), state_unknown }, { /* 6, WINED3DRS_WRAPV */ STATE_RENDER(WINED3DRS_WRAPV), state_unknown }, - { /* 7, WINED3DRS_ZENABLE */ STATE_RENDER(WINED3DRS_ZENABLE), state_unknown }, + { /* 7, WINED3DRS_ZENABLE */ STATE_RENDER(WINED3DRS_ZENABLE), state_zenable }, { /* 8, WINED3DRS_FILLMODE */ STATE_RENDER(WINED3DRS_FILLMODE), state_fillmode }, { /* 9, WINED3DRS_SHADEMODE */ STATE_RENDER(WINED3DRS_SHADEMODE), state_unknown }, { /* 10, WINED3DRS_LINEPATTERN */ STATE_RENDER(WINED3DRS_LINEPATTERN), state_unknown },
1
0
0
0
Stefan Dösinger : wined3d: Move WINED3DRS_LIGHTNING to the state table.
by Alexandre Julliard
08 Dec '06
08 Dec '06
Module: wine Branch: master Commit: 53e788956aa02b77b7b7c17912642c9e12ed60d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53e788956aa02b77b7b7c1791…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Dec 8 01:39:55 2006 +0100 wined3d: Move WINED3DRS_LIGHTNING to the state table. --- dlls/wined3d/device.c | 11 +---------- dlls/wined3d/state.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 077ac42..dc1467b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3437,17 +3437,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl switch (State) { case WINED3DRS_FILLMODE : - StateTable[STATE_RENDER(WINED3DRS_FILLMODE)].apply(STATE_RENDER(WINED3DRS_FILLMODE), This->stateBlock); - break; - case WINED3DRS_LIGHTING : - if (Value) { - glEnable(GL_LIGHTING); - checkGLcall("glEnable GL_LIGHTING"); - } else { - glDisable(GL_LIGHTING); - checkGLcall("glDisable GL_LIGHTING"); - } + StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; case WINED3DRS_ZENABLE : diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 32b8032..06cb342 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -79,6 +79,21 @@ static void state_fillmode(DWORD state, } } +static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock) { + + /* TODO: Lighting is only enabled if Vertex normals are passed by the application, + * so merge the lighting render state with the vertex declaration once it is available + */ + + if (stateblock->renderState[WINED3DRS_LIGHTING]) { + glEnable(GL_LIGHTING); + checkGLcall("glEnable GL_LIGHTING"); + } else { + glDisable(GL_LIGHTING); + checkGLcall("glDisable GL_LIGHTING"); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -221,7 +236,7 @@ const struct StateEntry StateTable[] = { /*134, WINED3DRS_WRAP6 */ STATE_RENDER(WINED3DRS_WRAP0), state_unknown }, { /*135, WINED3DRS_WRAP7 */ STATE_RENDER(WINED3DRS_WRAP0), state_unknown }, { /*136, WINED3DRS_CLIPPING */ STATE_RENDER(WINED3DRS_CLIPPING), state_unknown }, - { /*137, WINED3DRS_LIGHTING */ STATE_RENDER(WINED3DRS_LIGHTING) /* Vertex decl! */,state_unknown }, + { /*137, WINED3DRS_LIGHTING */ STATE_RENDER(WINED3DRS_LIGHTING) /* Vertex decl! */,state_lighting }, { /*138, WINED3DRS_EXTENTS */ STATE_RENDER(WINED3DRS_EXTENTS), state_unknown }, { /*139, WINED3DRS_AMBIENT */ STATE_RENDER(WINED3DRS_AMBIENT), state_unknown }, { /*140, WINED3DRS_FOGVERTEXMODE */ STATE_RENDER(WINED3DRS_FOGENABLE), state_unknown },
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200