December 09, 2019, 08:49:32 AM

Author Topic: [bb] BlitzPluz + Blitz3D by Cronos [ 1+ years ago ]  (Read 3456 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] BlitzPluz + Blitz3D by Cronos [ 1+ years ago ]
« on: June 29, 2017, 12:28:43 AM »
Title : BlitzPluz + Blitz3D
Author : Cronos
Posted : 1+ years ago

Description : BlitzPluz + Blitz3D

Code :
Code: BlitzBasic
  1. ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2. ;  3D Test: BlitzPlus + Blitz3D
  3. ;       by: Luis Enrique Braga Ramirez
  4. ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  5.  
  6. -------------- decls CODE --------------
  7. --------- Blitz3d+BlitzPluz.decls ------
  8.  
  9. .lib "User32.dll"
  10.  
  11. FindWindow%(class$, fenster$):"FindWindowA"
  12. GetActiveWindow%()
  13. SetParent%(hWndChild,hWndNewParent)
  14. ShowWindow% (hwnd%, nCmdShow%): "ShowWindow"
  15.  
  16. -------------- decls CODE END --------------
  17.  
  18.  
  19. -------------- BlitzPlus CODE --------------
  20. ---------- BlitzPlus_Blitz3D.EXE -----------
  21.  
  22. Global Window   = CreateWindow("BlitzPlus + Blitz3D" , 0 , 0 , 640 , 520 , Desktop()  , 1+4+8 )
  23. Global MainHwnd = GetActiveWindow();User32.dll
  24. SetStatusText(Window,"BlitzPlus + Blitz3D")
  25.  
  26. Global Menu  = WindowMenu( Window )
  27. Global File  = CreateMenu( "File"  , 0 , Menu )
  28. Global Close = CreateMenu( "Close" , 1 , File )
  29. UpdateWindowMenu Window
  30.  
  31.  
  32. ExecFile("Window3D.exe")
  33.  
  34. Repeat
  35.         vwprt = FindWindow("Blitz Runtime Class" , "Window3D");User32.dll
  36.         If WaitEvent() = $803 Then End
  37. Until vwprt <> 0
  38.  
  39. SetParent(vwprt,MainHwnd);User32.dll
  40. SetWindowPos( vwprt , 0 , -2 , -30 , 640 , 480 , 0);User32.dll
  41. ShowWindow% (vwprt ,1) ;User32.dll
  42.  
  43.  
  44. Repeat
  45.  
  46. If WaitEvent()>0 Then
  47.  
  48.   Select EventID()
  49.  
  50.          Case $803
  51.                End
  52.          Case $1001
  53.               Select EventData()
  54.               Case 1
  55.                    End  
  56.               End Select ;Select EventData()
  57.  
  58.   End Select ;Select EventID()
  59.  
  60.  
  61. EndIf
  62.  
  63. Forever
  64.  
  65. End ;
  66.  
  67. -------------- BlitzPlus CODE END --------------
  68.  
  69.  
  70.  
  71. -------------- Blitz3D CODE --------------
  72. -------------- Window3D.EXE --------------
  73.  
  74. If Windowed3D ()
  75.  
  76.  Graphics3D 640 , 480 , 16 , 2
  77.  AppTitle("Window3D")
  78.  hwnd = GetActiveWindow() ;User32.dll
  79.  ShowWindow% (hwnd ,0)    ;User32.dll
  80.  
  81.  SetBuffer BackBuffer()
  82.  
  83. Else
  84.  
  85.   End
  86.  
  87. EndIf
  88.  
  89. Global camera = CreateCamera()
  90. Global light  = CreateLight()
  91. Global cube   = CreateCube()
  92.  
  93. CameraViewport camera,0 ,0 , 640 , 480
  94.  
  95. PositionEntity light,-3,0,3
  96. PositionEntity camera,-3,5,-1
  97. ScaleEntity cube,2,2,2
  98. PointEntity camera,cube
  99.  
  100.  
  101. Repeat
  102.            TurnEntity cube,0.5,0.5,0.5
  103.  
  104.            UpdateWorld
  105.            RenderWorld
  106.            Flip
  107.        
  108. Until FindWindow( "BlitzMax_Window_Class" , "BlitzPlus + Blitz3D" ) = 0 ;User32.dll
  109.  
  110. End
  111.  
  112. -------------- Blitz3D CODE END --------------
  113.  
  114. PLEASE HELP ME TO IMPROVE IT!!!


Comments :


Rook Zimbabwe(Posted 1+ years ago)

 If I could get it to work...


Phoenix(Posted 1+ years ago)

 It works great!


Rook Zimbabwe(Posted 1+ years ago)

 Then perhaps a little more instruction is needed. I saved the dll in userlibs... I ran the b3d part but I get an error message.-RZ


Rook Zimbabwe(Posted 1+ years ago)

 Oh boy... face red... thought it wuld let me use Blitz+ commands in B3D... nope...


Kev(Posted 1+ years ago)

 @Rook, see winblitz3d. it enables close to blitz+ commands in blitz3d.