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

resurrecting an old open_gl program

chunky_lover_23
Beginner
576 Views

I'm trying to bring an old program back to life.

I believe GLUT is now dead and I'm trying to get the fauxInitWindow routine to setup the graphics window. 

Upon linking, however I get unresolved external symbols in

Error 1  error LNK2019: unresolved external symbol _auxInitDisplayMode@4 referenced in function _JM_GRAPHIC_WIN_INIT_SIZE_2D jm_gl_junction_box.obj 
Error 2  error LNK2019: unresolved external symbol _auxInitPosition@16 referenced in function _JM_GRAPHIC_WIN_INIT_SIZE_2D jm_gl_junction_box.obj 
Error 3  error LNK2019: unresolved external symbol _auxInitWindowA@4 referenced in function _JM_GRAPHIC_WIN_INIT_SIZE_2D jm_gl_junction_box.obj 

 

Any ideas what's else is required

These come from the following routine:

subroutine jm_graphic_win_init_size_2d(title,npx,npy)

c

c routine to initialise graphics window to a specific pixel size

c

USE IFOPNGL

c use opengl_glut

use ifwin

character*(*) title

logical ferror

integer(4) iret

 

c

c call fglutinit

c call fglutinitdisplaymode(ior(k_GLUT_double,k_GLUT_RGB))

call fauxInitDisplayMode (IOR(AUX_SINGLE , AUX_RGB))

call fauxInitPosition (0, 0, 500, 500)

c iret=fglutCreateWindow(title)

iret=fauxInitWindow(title//char(0))

c call fglutReshapeWindow(npx, npy)

c

return

end

 

 

0 Kudos
7 Replies
Steven_L_Intel1
Employee
576 Views

Microsoft pulled the AUX library routines several VS versions ago. Take a look at the Rings sample for how to get a window started now.

0 Kudos
andrew_4619
Honored Contributor II
576 Views

I followed the route Steve suggest above on my OGL applications but did ultimately end up writing quite a few Glut like routines to handle things like dynamic (mouse driven) zoom/pan/rotate etc.

You could look at the FreeGlut libraries but that will also involve some work (probably much less work in my case) to get working Fortran interfaces. I chose not to because a) I didn't want to be reliant on third party libraries and b) I wanted full control of the user interface via the windows API.

 

0 Kudos
JVanB
Valued Contributor II
576 Views

AFAIK, GLUT doesn't offer the capability to render to a file or to the printer. Thus, you really have to go through the wgl* path, but that's OK because ifort conveniently provides example code that does this. I don't know if it has examples that render to devices other than the screen, though.

 

0 Kudos
andrew_4619
Honored Contributor II
576 Views

@RO I am note sure about rendering to a printer but capturing the OGL frame buffer as a bmp file is pretty straight forward and there is a  C examples on MSDN that was easy to convert.

0 Kudos
JVanB
Valued Contributor II
576 Views

I would consider capturing the OpenGL frame buffer as a *.BMP file and rendering to a file to be different things in that the frame buffer might have limitations around the resolution of the monitor but a *.BMP file can have any dimensions you want. Rendering to a printer has the same problem in spades because my monitor has 3840 X 2160 resolution, but my color laser printer has significantly more resolution. Add to that the complication that Microsoft left an example on their web site someplace that was totally wrong so that any time spent working from that starting point was wasted until you found their correct example.

 

0 Kudos
chunky_lover_23
Beginner
576 Views

Thanks to all

I'm using VS2010 with IntelFortrain installed - but cannot find the latest opengl samples.  Is there a link to them anywhere ?.

My installation has some samples - but no open gl.  Specifically I get in:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\IntelFortran

only the console, quickwin, com server & general Windowing samples.

 

 

 

0 Kudos
Steven_L_Intel1
Employee
576 Views

C:\Program Files (x86)\Intel\Composer XE 2015\Samples\en_US\Fortran\OpenGL.zip

You're looking at the project templates, which are not really samples.

0 Kudos
Reply