设置了这么多……
Dim DispMode As DisplayMode = Manager.Adapters(Manager.Adapters.Default.Adapter).CurrentDisplayMode
Dim PresentParams As New PresentParameters
PresentParams.Windowed = True
PresentParams.SwapEffect = SwapEffect.Discard
PresentParams.EnableAutoDepthStencil = True
PresentParams.AutoDepthStencilFormat = DepthFormat.D16
PresentParams.BackBufferFormat = DispMode.Format
Device = New Device(Manager.Adapters.Default.Adapter, DeviceType.Hardware, Panel1, GetSettings, PresentParams)
Device.Transform.Projection = Matrix.PerspectiveFovLH(Math.PI / 4, 1.33, 1, 1000)
Device.RenderState.ZBufferEnable = True
Device.RenderState.AlphaBlendEnable = True
Device.RenderState.AlphaDestinationBlend = Blend.InvSourceAlpha
Device.RenderState.AlphaSourceBlend = Blend.InvDestinationAlpha
Device.RenderState.AlphaTestEnable = True
Device.RenderState.DestinationBlend = Blend.InvSourceAlpha
Device.TextureState(0).ColorOperation = TextureOperation.Modulate
Device.TextureState(0).ColorArgument1 = TextureArgument.TextureColor
Device.TextureState(0).ColorArgument2 = TextureArgument.Diffuse
Device.TextureState(0).AlphaOperation = TextureOperation.Modulate
Device.TextureState(0).AlphaArgument1 = TextureArgument.TextureColor
Device.TextureState(0).AlphaArgument2 = TextureArgument.Diffuse
Device.VertexFormat = CustomVertex.PositionNormalTextured.Format
头都大了,还是不透明。。。
显示出来是这样的:
而explor3d显示的是这样的:
现学3D现做,然后3DS里面导出已经很头疼了,又显示不正确……走过路过的大侠指点二三吧