Page 2 of 3
Re: glsl fragment and vertex shader 4.60
Posted: Fri Nov 18, 2011 1:56 pm
by idle
@kuron
sorry you would have to pay me to fire up windows
but I will make an exception and can compile you a 32 bit windows version if you want!
I've updated the demo and added a few controls to the shader utilizing the method that DarkDragon mentioned, it's not ideal
but it at least means we can interact with a shader.
Re: glsl fragment and vertex shader 4.60
Posted: Fri Nov 18, 2011 2:32 pm
by Kuron
Don't bother on my account.
I would love to see a screenshot of the example, though.
Re: glsl fragment and vertex shader 4.60
Posted: Fri Nov 18, 2011 8:00 pm
by luis
Kuron wrote:Is anybody willing to share a compiled Windows EXE for the example?
Here it is ... but why ? Cannot you build it ?
http://dl.dropbox.com/u/38644496/ocean.zip (source included)
Please let me know when I can delete it

Re: glsl fragment and vertex shader 4.60
Posted: Sat Nov 19, 2011 3:57 pm
by Michael Vogel
luis wrote:Kuron wrote:Is anybody willing to share a compiled Windows EXE for the example?
Here it is ... but why ? Cannot you build it ?
Maybe, because the source isn't available for the moment

Re: glsl fragment and vertex shader 4.60
Posted: Sat Nov 19, 2011 4:50 pm
by Kuron
Thank you, very much. I really appreciate it.
I currently don't have access to either of my development machines and do not have PB installed on my Internet system.
Re: glsl fragment and vertex shader 4.60
Posted: Sat Nov 19, 2011 6:58 pm
by luis
Michael Vogel wrote:
Maybe, because the source isn't available for the moment

Oh, sorry, I put only the exe online and since I'm not interested in using the PB 3D commands I deleted the source.
I had a voice telling me "add the exe to the source and upload it all, come on!" but I didn't listen
I'm sure idle will put it online again.
@kuron
No probs
I added the source to the zip, get it if you need it I'll remove it in a couple of days.
EDIT: removed.
Re: glsl fragment and vertex shader 4.60
Posted: Sat Nov 19, 2011 9:00 pm
by idle
Michael Vogel wrote:luis wrote:Kuron wrote:Is anybody willing to share a compiled Windows EXE for the example?
Here it is ... but why ? Cannot you build it ?
Maybe, because the source isn't available for the moment

I didn't realize I had to change the link when I updated the folder.
Re: glsl fragment and vertex shader 4.60
Posted: Sat Nov 19, 2011 9:49 pm
by Andre
J. Baker wrote:Looks great on Mac! Just had to comment out lines 3-6 and remove the OpenGL subsystem. Nice work!

I would also like to see it running on my MacOS 10.5.8 using PB4.60, but I only get a black window (windowed mode) or an empty screen (fullscreen mode)...

Re: glsl fragment and vertex shader 4.60
Posted: Sun Nov 20, 2011 10:12 am
by Danilo
Nice example, but the PureBasic implementation of OGRE still has BIG problems.
First test some days ago just crashed your program after moving forward with the cursor key
in Fullscreen mode. Now i tested again:
The Mouse Cursor is not captured in fullscreen mode, so i can not look around.
It works in windowed mode.
I changed OpenControls() to OpenControls(1) to display the GUI. It worked!
After clicking the last UpDown Control (for ScaleV) of the GUI in fullscreen mode,
i got a bluescreen, memory dump, and PC rebootet.
This 3D Engine stuff is still not useable if it crashes everywhere with VC++ isNaN()
runtime errors or if it crashes the whole operating system and reboots.
- Windows 7 x64 Ultimate
- AMD Radeon HD 6950 with 2GB memory
- Intel Core2 Quad CPU Q9450 with 8GB memory
Re: glsl fragment and vertex shader 4.60
Posted: Sun Nov 20, 2011 1:40 pm
by PMV
Danilo wrote:Nice example, but the PureBasic implementation of OGRE still has BIG problems.
First test some days ago just crashed your program after moving forward with the cursor key
in Fullscreen mode. Now i tested again:
The Mouse Cursor is not captured in fullscreen mode, so i can not look around.
It works in windowed mode.
I changed OpenControls() to OpenControls(1) to display the GUI. It worked!
After clicking the last UpDown Control (for ScaleV) of the GUI in fullscreen mode,
i got a bluescreen, memory dump, and PC rebootet.
This 3D Engine stuff is still not useable if it crashes everywhere with VC++ isNaN()
runtime errors or if it crashes the whole operating system and reboots.
- Windows 7 x64 Ultimate
- AMD Radeon HD 6950 with 2GB memory
- Intel Core2 Quad CPU Q9450 with 8GB memory
isNaN is a result of not allowed data submitted to the PB-OGRE implementation.
It is annoying that you don't get a Debugger-Message at the right line, but
as long as such checks aren't implemented, you can only search yourself against
this call. It is not a bug, it is more like an IMA because of not checked memory-
calls.

With a little bit of luck you can find the error inside of OGRE.log
or CEGUI.log ... good to check this files always when you have problems.
And i remember i had similar problems at my start. Don't know what i have changed
then ... my used coordinates in my game are always positive, could be related to
that.
Or the MoveXXX-Commands are buggy, i always use LocateXXX for absolut position.
The Mouse-cursor is never captured by CEGUI, you need to submit the coordinates
to CEGUI by calling InputEvent3D(...) and ShowGUI(255, #True) or displaying
your own mousesprite at the current position.
I don't know what is really going wrong, i never had a bluescreen since my
development with PB-OGRE. But it is really hard to get a own created GUI
work. That is really a big problem especially many commands are still
unusable. But Fred knows that and hopefully we get fixes with 4.61.
MFG PMV
Re: glsl fragment and vertex shader 4.60
Posted: Sun Nov 20, 2011 5:57 pm
by idle
Danilo wrote:Nice example, but the PureBasic implementation of OGRE still has BIG problems.
First test some days ago just crashed your program after moving forward with the cursor key
in Fullscreen mode. Now i tested again:
Thanks, I haven't had any problems on Linux with the new engine it's improved a lot
the only issues I've had is that it doesn't release the mouse or keyboard which means
I'd need to reboot if I produced an IMA while the debugger was on.
After clicking the last UpDown Control (for ScaleV) of the GUI in fullscreen mode,
i got a bluescreen, memory dump, and PC rebootet.
Sorry about that! There was an issue with the inputs in the material script
it should be fine declaring them as light_position x but apparently it wasn't working
but then there's really no point use them there since you can just access the
light directly in the shader. I'll post a fix soon
This 3D Engine stuff is still not useable if it crashes everywhere with VC++ isNaN()
runtime errors or if it crashes the whole operating system and reboots.
True it shouldn't be spitting out isNaN() though it may not be fair to blame the 3Dengine for the system crash
with the demo, there was clearly a bug with the inputs to the shader.
Re: glsl fragment and vertex shader 4.60
Posted: Sun Nov 20, 2011 8:18 pm
by idle
did a quick update and changed the shader inputs to use a single light
though I'm not sure if I've got the import function right for windows
It's not exactly an ideal way to interact with shaders though it's probably the best compromise
until the Engine gets updated to allow us to set uniforms, attributes, varings and samples
SpaceBar shows the gui
Re: glsl fragment and vertex shader 4.60
Posted: Mon Nov 21, 2011 2:45 pm
by [blendman]
wow, thank you, it's a really great example

!
It should be include with the standard edition of purebasic 4.60, in the examples directory.
Re: glsl fragment and vertex shader 4.60
Posted: Mon Nov 21, 2011 8:18 pm
by idle
It will need to be retested on Windows and Mac but if it's works on all platforms
then yes it would be a good example to add, well at least until Fred gets around
to adding shader functions
Re: glsl fragment and vertex shader 4.60
Posted: Mon Nov 21, 2011 8:50 pm
by PMV
don't know how the second ocean should look like, but it seems to working well on windows
