|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8019 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 |
|
|
silicondale
Joined: 15 Mar 2007 Posts: 252 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: 8019 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: 252 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.
It looks to me like the website example is a "work in progress" _________________ (Steve Henley) |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2867 Location: South Pole, Antarctica
|
Posted: Sat Apr 27, 2024 4:29 pm Post subject: |
|
|
Steve,
OpenGL is mostly for 3D imaging. No sure what this will give you with your images which are inherently 2D... Still with OpenGL even 2D stills will probably look more attractive.
I denoise my 3D OpenGL data and images out of it pretty often. PIC codes data is noisy like hell.
What i miss in Silverfrost graphics library is the facility to make AVI video out of jpg/png stills we can make out of OpenGL images. Such video making facility is a must for modern presentations. MATLAB has it by the way. So for presentations i have to use the working OpenGL code which creates and animates images in real time which i manipulate manually from the keyboard. But sometimes the data sets are very large and the animation looking slow. Of course you almost can not run the FTN95 code from flash drive on someones machine (conference presentation videoprojector) and have to use your own computer/laptop ;(
It is possible to load still JPGs into third-party software, or make your own animation code showing JPGs in sequence (i did that with FTN77 32 years ago). Or we can send them into online animation server but this does not look super-duper, your code must do video files itself |
|
Back to top |
|
|
silicondale
Joined: 15 Mar 2007 Posts: 252 Location: Matlock, Derbyshire, UK
|
Posted: Sat Apr 27, 2024 5:01 pm Post subject: |
|
|
Dan -
Indeed so - though ultimately, as the robot follows a curved path, these 2D images should map to 3D point clouds which can then be viewed in 3D. Stitching multiple images together is a different problem of course! I use Agisoft Metashape for photogrammetry, and it does quite a good job, but I'd like to exercise a bit more control over the algorithm. I have a couple of colleagues (in Austria and Bulgaria) who have done a lot of work on the video generation, but although the results are very good, they don't do the de-noising. I have also tried the AVCLabs video de-noiser but it smoothes the data far too much. My comproise solution may be to send them a bunch of de-noised JPG files and leave it to them to build the videos, with some in-betweening if necessary.
Anyway, as for OpenGL, I've probably taken this as far as I need to for now. I've tried the examples, made them work, and am pleased with the results. Banking that! _________________ (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
|