It is currently Thu Oct 17, 2019 1:54 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: OpenGL & CreateWater()
PostPosted: Tue Jul 16, 2019 3:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 606
Location: France
[5.71 Beta2 LTS (x64)] - Windows 10

Water creation does not work with the OpenGL subsystem.
Code:
EnableExplicit

Define Camera

InitEngine3D(#PB_Engine3D_DebugLog)
InitSprite()
InitKeyboard()

OpenWindow(0, 0, 0, 1024, 768, "Create Water", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1024, 768, 0, 0, 0)

Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Packs/desert.zip", #PB_3DArchive_Zip)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Water/", #PB_3DArchive_FileSystem)
Parse3DScripts() 

Camera = CreateCamera(#PB_Any, 0, 0, 100, 100)
MoveCamera(Camera, 0, 100, 200)
CameraLookAt(Camera, 0, 70, 0)

CreateLight(#PB_Any, RGB(255, 255, 255), 1000, 1000, -500)

SkyBox("desert07.jpg")

WorldShadows(#PB_Shadow_TextureAdditive, 1024, RGB(150, 150, 150))

CreateWater(Camera, 0, -17.5, 0, 0, #PB_World_WaterLowQuality | #PB_World_WaterSmooth | #PB_World_WaterSun)

Repeat
  ExamineKeyboard()   
  RenderWorld() 
  FlipBuffers()
Until WindowEvent() = #PB_Event_CloseWindow Or KeyboardReleased(#PB_Key_Escape)
Quote:
16:48:15: [Hydrax] Hydrax created.
16:48:15: [Hydrax] Creating module...
16:48:15: [Hydrax] Creating ProjectedGridVertex module.
16:48:15: [Hydrax] ProjectedGridVertex created.
16:48:15: [Hydrax] Module created.
16:48:15: [Hydrax] Initializating RTT Manager...
16:48:15: [Hydrax] RTT manager initialized.
16:48:15: [Hydrax] Registring device restored listener...
16:48:15: [Hydrax] Device restored listener registred.
16:48:15: [Hydrax] Creating materials...
16:48:15: [Hydrax] Creating water material...
16:48:15: Texture: Fresnel.bmp: Loading 1 faces(PF_L8,256x1x1) with 8 hardware generated mipmaps from Image. Internal format is PF_L8,256x1x1.
16:48:15: [Hydrax] Water material created.
16:48:15: [Hydrax] Creating depth material...
16:48:15: OGRE EXCEPTION(2:InvalidParametersException): Parameter called uWorld does not exist. in GpuProgramParameters::_findNamedConstantDefinition at OgreGpuProgramParams.cpp (line 1451)

_________________

➽ Windows 10 - PB 5.62 & PB 5.70 LTS

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Joubarbe, kenmo and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye