2D: Faster way to roll an image?

Just starting out? Need help? Post your questions and find answers here.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: 2D: Faster way to roll an image?

Post by Fred »

mine is a R9 280 from 2014 with 3GB so I guess it can be considered as very old by now :) ! And no, onboard GFX cards now are much much better than yours :mrgreen:
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: 2D: Faster way to roll an image?

Post by dige »

:shock: 🙈 🤣






dige has left the room … going to buy a grafics Card
"Daddy, I'll run faster, then it is not so far..."
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: 2D: Faster way to roll an image?

Post by dige »

Ok, now I've tried it again on a system with an 8GB graphics card. It even works with 20,000 pixel resolution! Great! :D

@pf shadoko: Is it just as easy to make this 3D view with OpenGl?
pf shadoko wrote: Wed Jul 03, 2024 2:57 pm

Code: Select all

InitEngine3D():InitSprite():InitKeyboard():InitMouse()

ExamineDesktops()
OpenWindow(0, 0,0, DesktopWidth(0)*0.8,DesktopHeight(0)*0.8, "CreateShader - [Esc] quit",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)

image.s="C:\Users\Guillot\Downloads\Insta360_X4_Smaple_image.jpg"
If FileSize(image)<0:MessageRequester("!", "enter 360 panoramic image path (above)"):CallDebugger:EndIf
Add3DArchive(GetPathPart(image), #PB_3DArchive_FileSystem):Parse3DScripts()
LoadTexture(0,GetFilePart(image))

CreateCamera(0, 0, 0, 100, 100):MoveCamera(0,0,3,-6):CameraLookAt(0,0,0,0)
CreateMaterial(0,TextureID(0))
DisableMaterialLighting(0,1)
MaterialCullingMode(0,#PB_Material_AntiClockWiseCull)
MaterialFilteringMode(0,#PB_Material_Anisotropic)
CreateSphere(0,1000,64,64)
CreateEntity(0,MeshID(0),MaterialID(0))

Define.f MouseX,Mousey,fov=45

Repeat
	While WindowEvent():Wend
	ExamineKeyboard()
	ExamineMouse()
	MouseX = -MouseDeltaX() *  0.05
	MouseY = -MouseDeltaY() *  0.05
	FOV-MouseWheel()*5:If fov<10:fov=10:ElseIf fov>90:fov=90:EndIf
	CameraFOV(0,fov)
	RotateCamera(0, MouseY, MouseX, 0, #PB_Relative)	
	RenderWorld()
	FlipBuffers()    
Until KeyboardReleased(#PB_Key_Escape) Or MouseButton(3)
"Daddy, I'll run faster, then it is not so far..."
Post Reply