Changeset 1053 for OGRE/trunk/ogre_changes/Ogre1.2/RenderSystems/Direct3D9
- Timestamp:
- 06/26/06 09:33:12 (19 years ago)
- Location:
- OGRE/trunk/ogre_changes/Ogre1.2/RenderSystems/Direct3D9
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OGRE/trunk/ogre_changes/Ogre1.2/RenderSystems/Direct3D9/include/OgreD3D9RenderSystem.h
r768 r1053 241 241 void _setTextureBorderColour(size_t stage, const ColourValue& colour); 242 242 void _setTextureMatrix( size_t unit, const Matrix4 &xform ); 243 #ifdef GAMETOOLS_ILLUMINATION_MODULE 244 virtual void _setSceneBlending(SceneBlendFactor sourceFactor, 245 SceneBlendFactor destFactor, 246 SceneBlendOperation blendOp = SBOP_ADD, 247 bool separateAlpha = false, 248 SceneBlendFactor sourceFactorAlpha = SBF_ONE, 249 SceneBlendFactor destFactorAlpha = SBF_ZERO, 250 SceneBlendOperation blendOpAlpha = SBOP_ADD); 251 #else 243 252 void _setSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor ); 253 #endif 244 254 void _setAlphaRejectSettings( CompareFunction func, unsigned char value ); 245 255 void _setViewport( Viewport *vp ); -
OGRE/trunk/ogre_changes/Ogre1.2/RenderSystems/Direct3D9/src/OgreD3D9RenderSystem.cpp
r768 r1053 1912 1912 } 1913 1913 } 1914 1915 #ifdef GAMETOOLS_ILLUMINATION_MODULE 1916 1917 void D3D9RenderSystem::_setSceneBlending(SceneBlendFactor sourceFactor, 1918 SceneBlendFactor destFactor, 1919 SceneBlendOperation blendOp, 1920 bool separateAlpha, 1921 SceneBlendFactor sourceFactorAlpha, 1922 SceneBlendFactor destFactorAlpha, 1923 SceneBlendOperation blendOpAlpha) 1924 { 1925 HRESULT hr; 1926 if( sourceFactor == SBF_ONE && destFactor == SBF_ZERO && 1927 sourceFactorAlpha == SBF_ONE && destFactorAlpha == SBF_ZERO) 1928 { 1929 if (FAILED(hr = __SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE))) 1930 OGRE_EXCEPT( hr, "Failed to set alpha blending option", "D3D9RenderSystem::_setSceneBlending" ); 1931 } 1932 else 1933 { 1934 if (FAILED(hr = __SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE))) 1935 OGRE_EXCEPT( hr, "Failed to set alpha blending option", "D3D9RenderSystem::_setSceneBlending" ); 1936 1937 if(separateAlpha) 1938 { 1939 if (FAILED(hr = __SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, TRUE))) 1940 OGRE_EXCEPT( hr, "Failed to set alpha blending option", "D3D9RenderSystem::_setSceneBlending" ); 1941 1942 if (FAILED(hr = __SetRenderState(D3DRS_BLENDOPALPHA, D3D9Mappings::get(blendOp)))) 1943 OGRE_EXCEPT( hr, "Failed to set alpha blending option", "D3D9RenderSystem::_setSceneBlending" ); 1944 1945 if( FAILED( hr = __SetRenderState( D3DRS_SRCBLENDALPHA, D3D9Mappings::get(sourceFactor) ) ) ) 1946 OGRE_EXCEPT( hr, "Failed to set source blend", "D3D9RenderSystem::_setSceneBlending" ); 1947 if( FAILED( hr = __SetRenderState( D3DRS_DESTBLENDALPHA, D3D9Mappings::get(destFactor) ) ) ) 1948 OGRE_EXCEPT( hr, "Failed to set destination blend", "D3D9RenderSystem::_setSceneBlending" ); 1949 1950 } 1951 else 1952 { 1953 if (FAILED(hr = __SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE))) 1954 OGRE_EXCEPT( hr, "Failed to set alpha blending option", "D3D9RenderSystem::_setSceneBlending" ); 1955 } 1956 1957 if (FAILED(hr = __SetRenderState(D3DRS_BLENDOP, D3D9Mappings::get(blendOpAlpha)))) 1958 OGRE_EXCEPT( hr, "Failed to set alpha blending option", "D3D9RenderSystem::_setSceneBlending" ); 1959 if( FAILED( hr = __SetRenderState( D3DRS_SRCBLEND, D3D9Mappings::get(sourceFactor) ) ) ) 1960 OGRE_EXCEPT( hr, "Failed to set source blend", "D3D9RenderSystem::_setSceneBlending" ); 1961 if( FAILED( hr = __SetRenderState( D3DRS_DESTBLEND, D3D9Mappings::get(destFactor) ) ) ) 1962 OGRE_EXCEPT( hr, "Failed to set destination blend", "D3D9RenderSystem::_setSceneBlending" ); 1963 } 1964 } 1965 #else 1914 1966 //--------------------------------------------------------------------- 1915 1967 void D3D9RenderSystem::_setSceneBlending( SceneBlendFactor sourceFactor, SceneBlendFactor destFactor ) … … 1931 1983 } 1932 1984 } 1985 #endif 1933 1986 //--------------------------------------------------------------------- 1934 1987 void D3D9RenderSystem::_setAlphaRejectSettings( CompareFunction func, unsigned char value )
Note: See TracChangeset
for help on using the changeset viewer.