[5.70B2] Problems with PickMask and VisibilityMask values
- Psychophanta
- Addict
- Posts: 4968
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
[5.70B2] Problems with PickMask and VisibilityMask values
CreateEntity() presents problem when PickMask value is 32, because the entity is invisible.
CreateEntity() presents problem when VisibilityMask value is 32, because the compiler breaks reading address 0.
CreateEntity() presents problem when VisibilityMask value is 32, because the compiler breaks reading address 0.
Last edited by Psychophanta on Wed Sep 26, 2018 12:22 pm, edited 2 times in total.
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
Re: [5.71B1] Problems with PickMask and VisibilityMask value
Please always post small code snippet showing the issue, thank you.
- Psychophanta
- Addict
- Posts: 4968
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
Re: [5.71B1] Problems with PickMask and VisibilityMask value
Well, I put this tip as a .PB file in windows into 'D:\AL\new'
Everything runs ok.
Now I put the same file in 'D:\AL\MINE\PB\3D', and after runned there the result is the written in the first post.
????
NOTICE: It does not happen in PB 5.46LTS
Code: Select all
RX.u=1024:RY.u=768
InitEngine3D()
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,RX,RY,"tip",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,RX,RY,0,0,0,#PB_Screen_WaitSynchronization)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
Parse3DScripts()
WorldDebug(#PB_World_DebugBody)
#mascarapick=32
#mascaravisivilidad=32
luz.i=CreateLight(#PB_Any,$EEEEEE,4,4,2,#PB_Light_Point)
camara.i=CreateCamera(#PB_Any,0,0,100,100,#mascaravisivilidad)
MoveCamera(camara.i,0,0,3,#PB_Absolute)
cuerpotextura.i=LoadTexture(#PB_Any,"soil_wall.jpg")
cuerpomaterial.i=CreateMaterial(#PB_Any,TextureID(cuerpotextura.i))
cuerpomalla.i=CreateCylinder(#PB_Any,0.05,2,10,1,1)
cuerpo.i=CreateEntity(#PB_Any,MeshID(cuerpomalla.i),MaterialID(cuerpomaterial.i),0,0,0,#mascarapick,#mascaravisivilidad)
Repeat
ExamineKeyboard()
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
Now I put the same file in 'D:\AL\MINE\PB\3D', and after runned there the result is the written in the first post.
????
NOTICE: It does not happen in PB 5.46LTS
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
Re: [5.71B1] Problems with PickMask and VisibilityMask value
Hey Psychophanta
Sorry, I can't reproduce your problem. Furthermore, due to the language barrier - I'm not really sure, what you
define as a bug here.
Here is a revised example.
Remember to add an WindowEvent() loop, when using WindowedScreen() - your program might freeze, if omitted.
Sorry, I can't reproduce your problem. Furthermore, due to the language barrier - I'm not really sure, what you
define as a bug here.
Here is a revised example.
Remember to add an WindowEvent() loop, when using WindowedScreen() - your program might freeze, if omitted.
Code: Select all
RX.u=1024:RY.u=768
InitEngine3D()
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,RX,RY,"tip",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,RX,RY,0,0,0,#PB_Screen_WaitSynchronization)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
Parse3DScripts()
WorldDebug(#PB_World_DebugBody)
#mascarapick=1<<1
#mascaravisivilidad=1<<1
luz.i=CreateLight(#PB_Any,$EEEEEE,4,4,2,#PB_Light_Point)
camara1.i=CreateCamera(#PB_Any,0,0,50,100,#mascaravisivilidad)
camara2.i=CreateCamera(#PB_Any,50,0,50,100,1<<2)
MoveCamera(camara1.i,0,0,3,#PB_Absolute)
MoveCamera(camara2.i,0,0,3,#PB_Absolute)
cuerpotextura.i=LoadTexture(#PB_Any,"soil_wall.jpg")
cuerpomaterial.i=CreateMaterial(#PB_Any,TextureID(cuerpotextura.i))
cuerpomalla.i=CreateCylinder(#PB_Any,0.05,2,10,1,1)
cuerpo.i=CreateEntity(#PB_Any,MeshID(cuerpomalla.i),MaterialID(cuerpomaterial.i),0,0,0,#mascarapick,#mascaravisivilidad)
sp.i = CreateSprite(#PB_Any, 20, 20)
StartDrawing(SpriteOutput(sp))
DrawingMode(#PB_2DDrawing_Outlined)
RoundBox(0, 0, 20, 20, 4, 4, $39E07B)
StopDrawing()
TransparentSpriteColor(sp, $0)
Repeat
Repeat : Until WindowEvent() = 0
ExamineKeyboard()
ExamineMouse()
If MousePick(camara1, MouseX(), MouseY()) > -1
Debug "hit cam 1"
EndIf
; If MousePick(camara2, MouseX(), MouseY()) > -1
; Debug "hit cam 2"
; EndIf
RenderWorld()
DisplayTransparentSprite(sp, MouseX(), MouseY())
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
- Psychophanta
- Addict
- Posts: 4968
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
Re: [5.71B1] Problems with PickMask and VisibilityMask value
Thanks DK_PETER.
I know the correct way to do it in a window is to check events.
I've reproduced your code and got the same behaviour. Also with PB5.46LTS it runs good.
I posted it here because it looks like a bug, since with PB5.46LTS does not happen.
I tryed with several ways, and everytime is the same result, it is so strange.
My last reduced attempt:
If necessary I can record a video from screen.
I know the correct way to do it in a window is to check events.
I've reproduced your code and got the same behaviour. Also with PB5.46LTS it runs good.
I posted it here because it looks like a bug, since with PB5.46LTS does not happen.
I tryed with several ways, and everytime is the same result, it is so strange.
My last reduced attempt:
Code: Select all
RX.u=1024:RY.u=768
InitEngine3D()
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,RX,RY,"tip")
OpenWindowedScreen(WindowID(0),0,0,RX,RY)
#mascarapick=2
#mascaravisivilidad=2
camara.i=CreateCamera(#PB_Any,0,0,100,100)
cuerpotextura.i=CreateTexture(#PB_Any,64,64)
StartDrawing(TextureOutput(cuerpotextura))
Box(0,0,64,64,$39E07B)
StopDrawing()
cuerpomaterial.i=CreateMaterial(#PB_Any,TextureID(cuerpotextura.i))
cuerpomalla.i=CreateCylinder(#PB_Any,0.05,2,10,1,1)
cuerpo.i=CreateEntity(#PB_Any,MeshID(cuerpomalla.i),MaterialID(cuerpomaterial.i),0,0,0,#mascarapick,#mascaravisivilidad)
Repeat
ExamineKeyboard()
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
Re: [5.71B1] Problems with PickMask and VisibilityMask value
No problem here.
Add debug log
And compare ogre.log with PB5.46LTS and PB5.70LTS
Add debug log
Code: Select all
InitEngine3D(#PB_Engine3D_DebugLog)
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
- Psychophanta
- Addict
- Posts: 4968
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
Re: [5.71B1] Problems with PickMask and VisibilityMask value
No difference between 2 logs at all, except this line at the end of the one which works well:
And the other one has not that line.
This line is at the end of "D:\AL\new\Ogre.log".Can't assign material cylinder to SubEntity of E52502896 because this Material does not exist. Have you forgotten to define it in a .material script?
And the other one has not that line.
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
- Psychophanta
- Addict
- Posts: 4968
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
Re: [5.70B2] Problems with PickMask and VisibilityMask value
Same issue with the PB5.70B2 in its 32 bit windows version.
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
- Psychophanta
- Addict
- Posts: 4968
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
Re: [5.70B2] Problems with PickMask and VisibilityMask value
Damn!!!
My worry
The false alarm was i had the file 'Engine3D.dll' in 'D:\AL\MINE\PB\3D' folder. Such 'Engine3D.dll' was the one from the PB4.46LTS package, so the source, when compiled and runned inside that folder it catched the nearer 'Engine3D.dll'.
After delete the 'Engine3D.dll' file from the directory, everything works ok , because it catches the .dll from the 'compilers' directory instead.
My worry
The false alarm was i had the file 'Engine3D.dll' in 'D:\AL\MINE\PB\3D' folder. Such 'Engine3D.dll' was the one from the PB4.46LTS package, so the source, when compiled and runned inside that folder it catched the nearer 'Engine3D.dll'.
After delete the 'Engine3D.dll' file from the directory, everything works ok , because it catches the .dll from the 'compilers' directory instead.
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB