November 28, 2020, 01:49:47 AM

Author Topic: [bb] Infinite far clipplane by bytecode77 [ 1+ years ago ]  (Read 743 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Infinite far clipplane by bytecode77 [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : Infinite far clipplane
Author : bytecode77
Posted : 1+ years ago

Description : This code creates an infinitive far clipplane.
You need to download the direct x 7 dll which is included to my shadow system on www.devil-engines.net .
you also need to initialize and free the dx7 dll like in the sample below.

Note: If you are already using my shadow system, you don't have to call this code. the shadow system will do it. also you MUST use freedx7() at the end.


Code :
Code: BlitzBasic
  1. Type DX7_Matrix
  2.         Field m1#, m2#, m3#, m4#
  3.         Field m5#, m6#, m7#, m8#
  4.         Field m9#, m10#, m11#, m12#
  5.         Field m13#, m14#, m15#, m16#
  6. End Type
  7.  
  8. Function InitDX7()
  9. If DX7_SetSystemProperties(SystemProperty("Direct3D7"), SystemProperty("Direct3DDevice7"), SystemProperty("DirectDraw7"), SystemProperty("AppHWND"), SystemProperty("AppHINSTANCE")) Then RuntimeError "Error initializing dx7."
  10. If DX7_GetStencilBitDepth() < 8 Then
  11.         DX7_CreateStencilBuffer()
  12.         If DX7_GetStencilBitDepth() < 8 Then RuntimeError "Graphic card does not support stencil buffers."
  13. End If
  14. End Function
  15.  
  16. Function FreeDX7()
  17. DX7_RemoveSystemProperties()
  18. End Function
  19.  
  20. Function DX7_InfiniteFarClipPlane()
  21. m.DX7_Matrix = New DX7_Matrix
  22. DX7_GetTransform 3, m
  23. mm11# = 1
  24. mm15# = -.1
  25. DX7_SetTransform 3, m
  26. Delete m
  27. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal