Re: 2D: Faster way to roll an image?
Posted: Thu Jul 04, 2024 9:43 am
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 


http://www.purebasic.com
https://www.purebasic.fr/english/
pf shadoko wrote: Wed Jul 03, 2024 2:57 pmCode: 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)