How do I get mouse position x,y in a %og window? CLEARWIN_STRING@ gives MOUSE_LEFT_CLICK and MOUSE_RIGHT_CLICK callback reasons but CLEARWIN_INFO@(GRAPHICS_MOUSE_X) and Y return only zeros. Are there different parameters to be used for OpenGL, or is this something that is just not implemented ?
OpenGL and mouse position
Answering my own question. Found a post from 2008 - John Horspool gave the answer - many thanks, John. I'll try it. https://forums.silverfrost.com/viewtopic.php?p=4594&sid=d19d1f698516bc5ef2bf888e8685886b Seems it's very simple if it still works
CALL GET_OPENGL_MOUSE_STATE@(mx,my,mflag)
where mx and my is cursor position (obviously!)
and:-
mflag=1 for left mouse button pressed mflag=2 for right mouse button mflag=3 for middle mouse button mflag=16 for both left and right buttons pressed
Ah. John Horspool. RIP.
Thanks for letting me know. That's sad. But the call still works.
However, I'm shelving the %og work despite the better quality graphics, and reverting to %gr - problem is the lack of Ftn95 documentation for OpenGL. I've made the example programs work OK, and have even managed to display a digital photo image using OpenGL (each pixel is a little coloured square), but without documentation it's an uphill struggle to do much more with it.
Steve,
John Horspool was a regular and fantastically helpful contributor to this forum until shortly before he passed away from cancer. He made his living from a finite element stress analysis system with exquisite OpenGL graphics - graduated colours on 3D objects that could be rotated in real time etc. I wish that I'd met him in person.
Even though I don't need anything better than %gr graphics (including mouse interaction and hard copy), I have always envied the results obtainable with OpenGL. I really do wish some generous soul would write a comprehensible and simple guide - ideally, providing it free (Just as I wrote that 200 page intro to Clearwin+ for old-style Fortran programmers that is on this site if I'm allowed to brag).
Eddie
Wow! You are indeed allowed to brag, Eddie. That is an amazing body of work. To think that all these years I have been struggling with the old Salford manuals plus the ftn95.enh and cwplus.enh updates.