Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

OpenGL and FORTRAN FGL

TinTin_9
Beginner
2,009 Views
Hi all,

I need to learn OPENGL IN FORTRAN for simulation of research results. I have been searching this forum and web for quite some time but I couldnt find a suitable documentation which can get you started on learning opengl in fortran.

Please if any one knows any good books or website on the topic. ? Also I have read in one of the posts here that OPEN GL SUPERBIBLE was a good choice but , I checked the book on amazon and it had no mention of opengl applied to fortran and the examples were from C or cC++, so am little confused here as I am a very newbie to opengl.

Also is there any difference between the fgl provided in I'fort. windows complier or the F90gl library ? I couldn't find any documentation on both of these also ( like what functions/Subroutines they have and what these functions do)

Thanks in advance, 4th of July greetings to all.

Nittin
0 Kudos
9 Replies
anthonyrichards
New Contributor III
2,009 Views

http://www.elsevier.com/wps/find/bookdescription.cws_home/677552/description#description

You could try Norman Lawrence's book, link above, which was originally written with the Compaq Visual Fortran compilerin mind, but it should apply equally well to Intel's. I do not have the book myself, but the table of contentshas several OpenGl sections.

0 Kudos
g_f_thomas
Beginner
2,009 Views

"I need to learn OPENGL IN FORTRAN for simulation of research results."

Just guessing at what you mean by 'simulation of research results' I'd say forget about OPENGL in Fortran or any other programming language. If what you want to do is graphically display data from simulations (computations using some model of a process) then use an app that uses OpenGL or DirectX written by experts in that business. IVF used to come with Array Viewer which is still available for free but is unsupported. Try the amazing ParaView from www.paraview.org or that old chestnut Gnuplot from http://sourceforge.net/projects/gnuplotwhich is easily controlled from Fortran if that's what you want to do. These read your simulation data in whatever format and display them in a window where you can rotate, slice, zoom, etc. to your heart's content. This mitigates the need to become directly embroiled in hardcore graphics and frees your time to devote to the quality of your simulations.

Gerry

0 Kudos
Steven_L_Intel1
Employee
2,009 Views
f90GL is an open-source library that presents a Fortran-friendly and platform-independent interface to OpenGL. It is different from the "standard" OpenGL interface which is what you'll see in books such as "OpenGL SuperBible".

The OpenGL module provided with Intel Visual Fortran is an interface to the Windows implementation of OpenGL. When Microsoft initially created this for its Fortran PowerStation product, they added "f" to all of the routine names, and some of the type and constant names are slightly different, but in most cases it is standard OpenGL. We also provide several sample programs using this interface.

I find it fairly simple to translate the C example code in books to Fortran - the translation is usually straightforward. It does help to look at some existing code and to also have the IFOPNGL.F90 source open to look at the declarations.

A caution - if you are using VS2008, the "glaux" library ("aux" routines), used by some of the IVF samples, is no longer provided by Microsoft. We'll be revising those samples to not use the aux routines.

You will not find ANY books or texts to teach you OpenGL from a Fortran perspective. But if you know Fortran and can read C, using any of a number of tutorial books on OpenGL should be fine.
0 Kudos
TinTin_9
Beginner
2,009 Views
Thanks 'anthonyrichards'

I looked at the CVF book and it had some good information, I can get started with it.

But as gerry has told me first I will try loking into other software options I have. Basically I have to show a space craft animation around various planest under extremely comlex gravitational effects in 3d. I just have to provide the graphics package the position vectors and velocity vectors and orientation matrix of the space craft at various times and get them to run like a movie.

So I thought OPENGL would be best suited from my experiecne of. playing games :) , but I will certainly look into other softwares if they can provide me such capability.
Thanks Gerry !

Thanks Steve for clearing out that confusion, I know C hence i guess i can read opengl tutorial book , but before that I will read some computer graphic opengl book also.

Thanks all !
0 Kudos
pgruhn
Beginner
2,009 Views

You may want to have a look at STK from AGI (http://www.stk.com/).

The Basic Version comes free of charge, as well as the AGI viewer (http://www.agi.com/products/viewer/).

0 Kudos
algraham
Beginner
2,009 Views
f90GL is an open-source library that presents a Fortran-friendly and platform-independent interface to OpenGL. It is different from the "standard" OpenGL interface which is what you'll see in books such as "OpenGL SuperBible".

The OpenGL module provided with Intel Visual Fortran is an interface to the Windows implementation of OpenGL. When Microsoft initially created this for its Fortran PowerStation product, they added "f" to all of the routine names, and some of the type and constant names are slightly different, but in most cases it is standard OpenGL. We also provide several sample programs using this interface.

I find it fairly simple to translate the C example code in books to Fortran - the translation is usually straightforward. It does help to look at some existing code and to also have the IFOPNGL.F90 source open to look at the declarations.

A caution - if you are using VS2008, the "glaux" library ("aux" routines), used by some of the IVF samples, is no longer provided by Microsoft. We'll be revising those samples to not use the aux routines.

You will not find ANY books or texts to teach you OpenGL from a Fortran perspective. But if you know Fortran and can read C, using any of a number of tutorial books on OpenGL should be fine.

Hello Steve,

I have not been able to find the IVF samples that you referred to in your post. Can you tell me how to access them?

Thanks very much

alg

0 Kudos
Steven_L_Intel1
Employee
2,009 Views
Quoting - algraham

Hello Steve,

I have not been able to find the IVF samples that you referred to in your post. Can you tell me how to access them?

Thanks very much

alg

C:Program FilesIntelCompilerFortran10.1.xxxsamplesOpenGL

0 Kudos
algraham
Beginner
2,009 Views
Thanks very much for your reply. Unfortunately, I have version 9, and there are no OpenGL samples. Is there any way I can download them from the Intel website?
alg

0 Kudos
algraham
Beginner
2,009 Views
PLease excuse - I finally found the samples, which I had installed in a weird place for some reason- thanks very much

alg

0 Kudos
Reply