Creating a blitz3d scene using WinBlitz3d
Archives Forums/Win32 Discussion/Creating a blitz3d scene using WinBlitz3d
| ||
Hi there, sorry for the newbie question, but i have just downloaded WinBlitz3d and it's really, really good. However i want to include the blitz3d runtime window, checking the forum i see you can use the following command "Create3DScene" So from a beginner point of view, i have tried the following and it does not work. Global blitz3d_runtime_window = CreateWindow("Viewer",10,10,400,300,0,0) Create3DScene(blitz3d_runtime_window,10,10,300,400,0) To include the Create3DScene, what do i need to do? |
| ||
The Blitz runtime window creates itself when you call the regular Blitz3d function: Graphics or Graphics3d. Check the examples. I'm sure there's a good one for that stuff in your WinBlitz3d directory. |
| ||
Hi there, I'm afraid there is no example to show this function. I have tried using Graphic3d, but this make a separte window, what i want is the blitz runtime window to be embed within my main window, hence using the Create3DScene. I have also tried doing Create3DScene(parent,10,10,300,400,0) Where 'parent' is the main window. Still does not work. |
| ||
Ok after doing a bit more searching of the forum, i have found a wayGlobal GUIwindow = CreateWindow("XML Level Exporter",1,1,ScreenWidth,ScreenHeight,0,2) Graphics3D 400,300,16,2 Global BlitzRuntime = Create3DScene(GUIwindow,10,10,400,300,2) apiShowWindow BlitzRuntime,5 camera=CreateCamera() light=CreateLight() ; Rotate light to give better lighting of cube RotateEntity light,60,30,0 ; Create cube mesh cube=CreateCube() ; Position cube in front of camera so we can see it PositionEntity cube,0,0,5 However on exit, this crashes. Also because i have used Graphic3d it opening two blitz runtime window, i just want one. The cube appears in the Create3dScene window which is good. One question i do have for 'Mr. Picklesworth' is that i have look in an old copy of your modified WinBlitz3d and APE UI, you have a function called 'Build3D()'. Please could you tell me what in it. Kind Regards |
| ||
Hi nrasool, the 3D/GUI example below will add the runtime-window inside the new created window. although to will still need to hack about with Winblitz3d's include file to get the results you require.; Include "../WinBlitz3D_Include.bb" Global GUIwindow = CreateWindow("XML Level Exporter",1,1,640,480,0,2) Graphics3D 400,300,16,2 Global BlitzRuntime = Create3DScene(GUIwindow,10,10,400,300,0) camera=CreateCamera() light=CreateLight() ; Rotate light to give better lighting of cube RotateEntity light,60,30,0 ; Create cube mesh cube=CreateCube() ; Position cube in front of camera so we can see it PositionEntity cube,0,0,5 ; loop until user close's window. While events <> $803 TurnEntity cube,1,1,1 events = WaitEvent() Select events Case $803 Notify "end" End Select UpdateWorld RenderWorld apiInvalidateRect BlitzRuntime,0,1 Wend Notify "UnInitializing GUI" End kev |
| ||
Hi Kev Appreciate it, somewhere in my code, there seems to be an error. Thanks for showing the example :) Kind Regards |
| ||
Man I love WinBlinz3d! |
| ||
Hi, I have downloaded one month ago a newer version of the library, maybe 1.1 ? This version had a new function wb3d_fakefullscreen. I'm not able to find this new version anymore, but I have source that requires it to compile. Where can I find this new version ??? Thanks in advance |
| ||
Sorry to resurrect this thread, but I've only just got WinBlitz3D and I can't get Kev's example to run. Initially it couldn't find the following functions: CreateWindow Create3DScene WaitEvent apiInvalidateRect Notify I noticed in the help files that all Winblitz3D commands were prefixed with 'WB3D' so adding this made it accept the CreateWindow and WaitEvent commands. This trick didn't work on the others, though. Do I need v1.1 to get this working ? If so, does anyone know if it's available anywhere ? I must be making some sort of schoolboy error, but if anyone can help I'd be very grateful ! |