
Lib Screen (Sprite) (PB 6.10)
Re: Lib Screen (Sprite) (PB 6.10)
Now works nice! 

Re: Lib Screen (Sprite) (PB 6.10)
case 2 shows only a black screen with dark red text.
The rest is Ok.
PB 6.11b2 x86 on Win10 x64
Works with PB x64
The rest is Ok.
PB 6.11b2 x86 on Win10 x64
Works with PB x64
Re: Lib Screen (Sprite) (PB 6.10)
The same here, only x64 is ok on all examples.
Re: Lib Screen (Sprite) (PB 6.10)
From the folder "PureBasic 6.10 x64\Examples\3D\Data\Textures" copy the file "waternormal.png" to the folder "PureBasic_x64\Examples\3D\Data\Textures"
All demos work for me (Win10x64, PB6.10)
I had two files marked yellow in the IDE as missing. I added it and everything worked.
Re: Lib Screen (Sprite) (PB 6.10)
All files are available in PB 6.11B2 x86 and x64.
That's not the problem.
That's not the problem.
Re: Lib Screen (Sprite) (PB 6.10)
Yes you are right. I initially launched it on version 6.04 and there were 2 files missing. For the sake of compactness, I’m still using the previous version with the addition of compilers 6.10. In the second frame there is the sea, a view from above and clouds are flying. It works on 6.10 too.
- pf shadoko
- Enthusiast
- Posts: 385
- Joined: Thu Jul 09, 2015 9:07 am
Re: Lib Screen (Sprite) (PB 6.10)
well, it's progressing
I made the correction for x86
I made the correction for x86
Re: Lib Screen (Sprite) (PB 6.10)
Confirmed
Works now in x86 and x64 on WIn10 x64 with PB 6.11B2

Works now in x86 and x64 on WIn10 x64 with PB 6.11B2
Re: Lib Screen (Sprite) (PB 6.10)
Runs on Linux Fedora, Mint.
On Linux MX_i386 does not start
On Linux, hint text is upside down. Text blue instead of red.
The ground texture in the first and last frames is blue, but should be brown. The water is different from what is in Windows, it is not as contrasting.
Warning for missing files
Add path checking so Linux users can specify the correct file path for their OS
Compatible paths. In Windows, the case of letters in file names is not important, but in Linux it is important
On Linux MX_i386 does not start
On Linux, hint text is upside down. Text blue instead of red.
The ground texture in the first and last frames is blue, but should be brown. The water is different from what is in Windows, it is not as contrasting.
Warning for missing files
Code: Select all
CompilerIf #PB_Compiler_Version < 610
Debug "Check the presence of the files sky.png, waternormal.png"
CompilerEndIf
Code: Select all
CompilerElseIf #PB_Compiler_OS = #PB_OS_Linux
CompilerIf #PB_Compiler_Debugger
If FileSize("/usr/lib/x86_64-linux-gnu/libGL.so")
Debug "Please provide the correct path to the libGL.so library"
EndIf
CompilerEndIf
Code: Select all
LoadImage(1,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "water.png")
LoadImage(2,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "smoke2.png")
LoadImage(3,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "flare.png")
LoadImage(4,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "sky.png")
LoadImage(5,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "nvidia" + #PS$ + "dirt_grayrocky_diffusespecular.jpg")
LoadImage(6,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "nvidia" + #PS$ + "dirt_grayrocky_normalheight.jpg")
LoadImage(7,#PB_Compiler_Home+"examples" + #PS$ + "3d" + #PS$ + "Data" + #PS$ + "Textures" + #PS$ + "waternormal.png")
Re: Lib Screen (Sprite) (PB 6.10)
Wow, now it works for me. Very impressive indeed!!
I had to laugh, you have even put a shader editor in it - that's a genius idea.
I thought about having to make such a helper tool to learn shader programming; now I can save the time and efforts. I suppose you know that shadertoy website/app.
It would be nice if there was a shader tool that would also take into account PureBasic/Ogre interfaces so that we can make funny "shader toys" and have a productive tool for the 3D engine. "Shaders are the future" (since, a while crocodile... but I am sloooooow)
I had to laugh, you have even put a shader editor in it - that's a genius idea.

I thought about having to make such a helper tool to learn shader programming; now I can save the time and efforts. I suppose you know that shadertoy website/app.
It would be nice if there was a shader tool that would also take into account PureBasic/Ogre interfaces so that we can make funny "shader toys" and have a productive tool for the 3D engine. "Shaders are the future" (since, a while crocodile... but I am sloooooow)

Re: Lib Screen (Sprite) (PB 6.10)
+1000benubi wrote: Sun May 19, 2024 1:30 pm It would be nice if there was a shader tool that would also take into account PureBasic/Ogre...
- pf shadoko
- Enthusiast
- Posts: 385
- Joined: Thu Jul 09, 2015 9:07 am
Re: Lib Screen (Sprite) (PB 6.10)
@AZJIO
I made some corrections for linux, can you tell me if it's ok?
can you give me the paths to “libGL.so” for your different linux versions, I'll test them all
@ benubi & Caronte3D
it's planned, but it will be a bit more complicated to use.
I made some corrections for linux, can you tell me if it's ok?
can you give me the paths to “libGL.so” for your different linux versions, I'll test them all
@ benubi & Caronte3D
it's planned, but it will be a bit more complicated to use.
Re: Lib Screen (Sprite) (PB 6.10)
I haven't tested it yet, but if you use IncludeBinary, it will allow you to compile a file that does not depend on external files
I tried to translate the text into Russian, but it caused an error. Is it possible to support UTF8?
Code: Select all
DataSection
img1:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/water.png"
img2:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/smoke2.png"
img3:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/flare.png"
img4:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/sky.png"
img5:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/nvidia/dirt_grayrocky_diffusespecular.jpg"
img6:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/nvidia/dirt_grayrocky_normalheight.jpg"
img7:
IncludeBinary #PB_Compiler_Home+"examples/3d/Data/Textures/waternormal.png"
EndDataSection
CatchImage(1, ?img1)
CatchImage(2, ?img2)
CatchImage(3, ?img3)
CatchImage(4, ?img4)
CatchImage(5, ?img5)
CatchImage(6, ?img6)
CatchImage(7, ?img7)
Code: Select all
S_DrawText(8,0,"[F1] Редактировать шейдер")
S_DrawText(8,60,"[Пробел] Следующий пример")
S_DrawText(8,120,"[Esc] Выход")
S_DrawText(8,180,"Используйте мышь",40)
Re: Lib Screen (Sprite) (PB 6.10)
@pf shadoko
"I made some corrections for linux, can you tell me if it's ok?
can you give me the paths to “libGL.so” for your different linux versions, I'll test them all"
I'm using PB 6.04 but copied the missing images from 6.10/11.
As AZJIO said, the text is blue and upside down. You seem to have added a 4th texture too.
The paths to libGL.so on my Linux systems are:
Devuan - as you had originally /usr/lib/x86_64-linux-gnu/ - works OK
Void - /usr/lib/ and /usr/lib64/ - but only lib64 works
Arch - /usr/lib/ and /usr/lib64/ - very hit and miss, works in both sometimes, or not. It's a bit temperamental. Getting an error on line 722?
Moulder.
"I made some corrections for linux, can you tell me if it's ok?
can you give me the paths to “libGL.so” for your different linux versions, I'll test them all"
I'm using PB 6.04 but copied the missing images from 6.10/11.
As AZJIO said, the text is blue and upside down. You seem to have added a 4th texture too.

The paths to libGL.so on my Linux systems are:
Devuan - as you had originally /usr/lib/x86_64-linux-gnu/ - works OK
Void - /usr/lib/ and /usr/lib64/ - but only lib64 works
Arch - /usr/lib/ and /usr/lib64/ - very hit and miss, works in both sometimes, or not. It's a bit temperamental. Getting an error on line 722?
Moulder.
"If it ain't broke, fix it until it is!
This message is brought to you thanks to SenselessComments.com
My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
This message is brought to you thanks to SenselessComments.com
My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
- pf shadoko
- Enthusiast
- Posts: 385
- Joined: Thu Jul 09, 2015 9:07 am
Re: Lib Screen (Sprite) (PB 6.10)
@ AZJIO
I know, but the aim is to propose the code on the forum so...
@ moulder61
strange
I made 2 changes:
- for the color problem:
line 144: If #PB_OS_Windows:rgb=#GL_BGR_EXT:rgba=#GL_BGRA_EXT:Else:rgb=#GL_RGB:rgba=#GL_RGBA:EndIf
try with if 0... and if 1...
- for y-coordinate inversion:
line 533: If #PB_OS_Windows:codevertex=ReplaceString(codevertex,"//invertv","vuv.y=1-vuv.y;"):EndIf
try with if 0... and if 1...
I know, but the aim is to propose the code on the forum so...
@ moulder61
strange
I made 2 changes:
- for the color problem:
line 144: If #PB_OS_Windows:rgb=#GL_BGR_EXT:rgba=#GL_BGRA_EXT:Else:rgb=#GL_RGB:rgba=#GL_RGBA:EndIf
try with if 0... and if 1...
- for y-coordinate inversion:
line 533: If #PB_OS_Windows:codevertex=ReplaceString(codevertex,"//invertv","vuv.y=1-vuv.y;"):EndIf
try with if 0... and if 1...