|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Jun 20, 2018 1:08 am Post subject: OpenGL Animation Example - missing file 'danimate.ins' |
|
|
While investigating Sid's problem I came across and tried to compile the documented OpenGL example here:
https://silverfrost.com/ftn95-help/clearwinp/opengl/animationandmultiplewindows.aspx
It fails because the INCLUE-ed file 'danimate.ins' doesn't exist.
I searched for it in both the ftn95 installation directory and also in the ftn95Examples directory, but no luck finding it.
Any idea where it is Paul ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Wed Jun 20, 2018 7:29 am Post subject: |
|
|
It looks like this file has got lost. I can't find it on my machine.
A probable reconstruction for danimate.ins is
Code: | logical window1_active,window2_active,do_draw(2)
integer devicecontext(2),renderingcontext(2) |
The program fails to run correctly and the runtime message is "No OpenGL buffers are open".
I am guessing that the program ran correctly when it was written but that OpenGL has moved on since then. I will make a note that this needs to be investigated.
OpenGL samples that did run (last time I tested them) can be found in C:\Users\YourName\Documents\FTN95 Examples\OpenGL, assuming you use the C drive and you have installed the standard samples. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Jun 20, 2018 8:57 pm Post subject: |
|
|
thanks Paul
I'd checked in the examples directory so saw all those other examples.
I shall give them a try as and when I get time.
Just one point, I'm sure there are many folk who don't even know that the examples directory is put there.
Maybe it would be agood idea to modify the program install for future releases so that the user is prompted (as to where the files will be put) and given the option to specify a different directory. _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
silicondale
Joined: 15 Mar 2007 Posts: 247 Location: Matlock, Derbyshire, UK
|
Posted: Fri Apr 26, 2024 4:45 pm Post subject: |
|
|
I also hit the buffers with a missing danimate.ins.
As for the OpenGL examples, these mostly have 1998 date stamps. build.bat is March 2009, and animate.for is July 2019. And that is it.
However, that animate.for doesn't include danimate.ins but it does have a common block
logical do_draw
common /animate_com/ do_draw
Maybe that is all that is needed.
.... and wow - does it animate! - a rotating slab. Makes my eyes go funny. It's either too fast or too slow, but it does rotate. Now to try the other example.
For that one, Paul's supposition seems to be correct:
logical do_draw(2),window1_active,window2_active
integer devicecontext(2),renderingcontext(2)
common /animate_com/ do_draw,devicecontext,renderingcontext,
1 window1_active,window2_active
but I found one or two minor typos in the code. However, the program runs. It doesn't animate but it does open and display two windows.Graphs on a blue background. _________________ (Steve Henley) |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Sat Apr 27, 2024 11:28 am Post subject: |
|
|
Steve
I have had a quick look at this. I can see two "animate" samples, one with the caption "Double buffering", the other with the caption "Rotating Slab".
Both use double buffering. The first works, the second fails with "No OpenGL buffers are open".
The only thing that I noticed was that, for 64 bits, the device contexts need to be INTEGER(7).
Code: | integer(7) devicecontext(2),renderingcontext(2)
|
But I don't know why it is failing. |
|
Back to top |
|
|
silicondale
Joined: 15 Mar 2007 Posts: 247 Location: Matlock, Derbyshire, UK
|
Posted: Sat Apr 27, 2024 12:01 pm Post subject: |
|
|
Paul -Yes, there are two examples.
(1) in the examples folder, which works - I think this is the one that we have both managed to run.
(2) different coding, from the Silverfrost website. https://www.silverfrost.com/ftn95-help/clearwinp/opengl/animationandmultiplewindows.aspx
This is the one that wants danimate.ins - which I have replaced by the common block I posted. I compiled in 32-bit. It didn't need integer(7), and it ran without any problems. However, it only displayed two static windows, no animation.
All I wanted was to test whether OpenGL would possibly be of any use to me.
What I am actually working on is image processing - de-noising a series of images extracted from videos generated by submersible robots in water of varying degrees of murkiness. So I don't need animation at this stage. Only if I get good de-noising results will I (possibly) want animation to reconstruct the videos - though then it's probably easier just to use an off-the-shelf product to string all the frames together.
------------------------------------------------------
UPDATE 27/4 at 14:35
I now have the second program working. Two windows, both animated. Need to include the following in subroutine display and in mainline:
double precision spin,spin_array(2)
common/display_com/spin,spin_array
(not sure if spin_array is needed in the common block but it would allow setting the rotation at different speeds in the two windows).
Need also to add
spin=spin+2d0
after the call glFlush line in subroutine display.
When running the program, left mouse clisk starts the spin, right mouse click stops it, in each window separately. _________________ (Steve Henley) |
|
Back to top |
|
|
|
|
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 You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|