Can people test the following for GL and DX drivers?
The GL drawlineaa works for me but I don't have a card which supports DX AA so no idea if it works.
P.S. If you do have a DX AA OK card and know what the AA code should be can you edit the code?
Thanks.
The GL drawlineaa works for me but I don't have a card which supports DX AA so no idea if it works.
SuperStrict SetGraphicsDriver GLMax2DDriver() Graphics 640,480 Global mycaps:TG_D3DDEVICEDESC7 If _max2dDriver.ToString() = "DirectX7" mycaps = New TG_D3DDEVICEDESC7 D3D7GraphicsDriver().Direct3DDevice7().getcaps mycaps EndIf While Not KeyHit(KEY_ESCAPE) Cls SetBlend ALPHABLEND If MouseDown(1) DRAWLINEAA 0,0,MouseX(),MouseY() Else DrawLine 0,0,MouseX(),MouseY() EndIf Flip Wend Function DRAWLINEAA(from_x:Float,from_y:Float,to_x:Float,to_y:Float) If _max2dDriver.ToString() = "DirectX7" If mycaps.dwRasterCaps_LINE & 4096 Local D3DRS_EDGEANTIALIAS:Int=40 D3D7GraphicsDriver().Direct3DDevice7().setRenderState D3DRS_EDGEANTIALIAS,True DrawLine from_x,from_y,to_x,to_y D3D7GraphicsDriver().Direct3DDevice7().setRenderState D3DRS_EDGEANTIALIAS,False Else DebugLog "AA not supported" DrawLine from_x,from_y,to_x,to_y EndIf Else Local saveblend:Int=GetBlend() SetBlend alphablend glEnable(GL_LINE_SMOOTH) DrawLine from_x,from_y,to_x,to_y SetBlend saveblend glDisable(GL_LINE_SMOOTH) EndIf End Function Type TG_D3DDeviceDesc7 Field dwDevCaps:Int Field dwSize_LINE:Int 'Size of structure Field dwMiscCaps_LINE:Int 'Miscellaneous capabilities Field dwRasterCaps_LINE:Int 'Raster capabilities Field dwZCmpCaps_LINE:Int 'Z-comparison capabilities Field dwSrcBlendCaps_LINE:Int 'Source-blending capabilities Field dwDestBlendCaps_LINE:Int 'Destination-blending capa bilities Field dwAlphaCmpCaps_LINE:Int 'Alpha-test-comparison capabilities Field dwShadeCaps_LINE:Int 'Shading capabilities Field dwTextureCaps_LINE:Int 'Texture capabilities Field dwTextureFilterCaps_LINE:Int 'Texture-filtering capabilities Field dwTextureBlendCaps_LINE:Int 'Texture-blending capabilities Field dwTextureAddressCaps_LINE:Int 'Texture-addressing capabilities Field dwStippleWidth_LINE:Int 'Stipple width Field dwStippleHeight_LINE:Int 'Stipple height Field dwSize_TRI:Int 'Size of structure Field dwMiscCaps_TRI:Int 'Miscellaneous capabilities Field dwRasterCaps_TRI:Int 'Raster capabilities Field dwZCmpCaps_TRI:Int 'Z-comparison capabilities Field dwSrcBlendCaps_TRI:Int 'Source-blending capabilities Field dwDestBlendCaps_TRI:Int 'Destination-blending capa bilities Field dwAlphaCmpCaps_TRI:Int 'Alpha-test-comparison capabilities Field dwShadeCaps_TRI:Int 'Shading capabilities Field dwTextureCaps_TRI:Int 'Texture capabilities Field dwTextureFilterCaps_TRI:Int 'Texture-filtering capabilities Field dwTextureBlendCaps_TRI:Int 'Texture-blending capabilities Field dwTextureAddressCaps_TRI:Int 'Texture-addressing capabilities Field dwStippleWidth_TRI:Int 'Stipple width Field dwStippleHeight_TRI:Int 'Stipple height Field dwDeviceRenderBitDepth:Int Field dwDeviceZBufferBitDepth:Int Field dwMinTextureWidth:Int Field dwMinTextureHeight:Int Field dwMaxTextureWidth:Int Field dwMaxTextureHeight:Int Field dwMaxTextureRepeat:Int Field dwMaxTextureAspectRatio:Int Field dwMaxAnisotropy:Float Field dvGuardBandLeft:Float Field dvGuardBandTop:Float Field dvGuardBandRight:Float Field dvGuardBandBottom:Float Field dvExtentsAdjust:Float Field dwStencilCaps:Int Field dwFVFCaps:Int Field dwTextureOpCaps:Int Field wMaxTextureBlendStages:Short Field wMaxSimultaneousTextures:Short Field dwMaxActiveLights:Int Field dvMaxVertexW:Float Field GUID_Interface_type:Int Field GUID_1:Short Field GUID_2:Short Field GUID_3:Byte Field GUID_4:Byte Field GUID_5:Byte Field GUID_6:Byte Field GUID_7:Byte Field GUID_8:Byte Field GUID_9:Byte Field GUID_10:Byte Field wMaxUserClipPlanes:Short Field wMaxVertexBlendMatrices:Short Field dwVertexProcessingCaps:Int Field dwReserved1:Int Field dwReserved2:Int Field dwReserved3:Int Field dwReserved4:Int End Type
P.S. If you do have a DX AA OK card and know what the AA code should be can you edit the code?
Thanks.