Try my new website:
www.urcho.com
- the new SIMPLE social network
Sign up
|
284
members |
114
snippets
Search for:
ALL
POPULAR
File Controls
Multiplayer Code
2D Effects
3D Effects
Oldskool demos
Basic Functions
Maths/Physics
Sound
Tutorials
Misc
Username:
Password:
Sign up
Infinite far clipplane by Devils Child
[
back
]
Author:
Archive
| Viewed:
547
times | Language:
BlitzBasic 3D
| Category:
Maths/Physics
Type DX7_Matrix Field m1#, m2#, m3#, m4# Field m5#, m6#, m7#, m8# Field m9#, m10#, m11#, m12# Field m13#, m14#, m15#, m16# End Type Function InitDX7() If DX7_SetSystemProperties(SystemProperty("Direct3D7"), SystemProperty("Direct3DDevice7"), SystemProperty("DirectDraw7"), SystemProperty("AppHWND"), SystemProperty("AppHINSTANCE")) Then RuntimeError "Error initializing dx7." If DX7_GetStencilBitDepth() < 8 Then DX7_CreateStencilBuffer() If DX7_GetStencilBitDepth() < 8 Then RuntimeError "Graphic card does not support stencil buffers." End If End Function Function FreeDX7() DX7_RemoveSystemProperties() End Function Function DX7_InfiniteFarClipPlane() m.DX7_Matrix = New DX7_Matrix DX7_GetTransform 3, m m\m11# = 1 m\m15# = -.1 DX7_SetTransform 3, m Delete m End Function
Author Comments:
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 dont have to call this code. the shadow system will do it. also you MUST use freedx7() at the end.
Login or
create an account
to comment on this snippet