soccer jersey forums.silverfrost.com :: View topic - OpenGL and mouse position
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OpenGL and mouse position

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
silicondale



Joined: 15 Mar 2007
Posts: 252
Location: Matlock, Derbyshire, UK

PostPosted: Tue May 07, 2024 6:40 pm    Post subject: OpenGL and mouse position Reply with quote

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 ?
_________________
(Steve Henley)
Back to top
View user's profile Send private message Visit poster's website
silicondale



Joined: 15 Mar 2007
Posts: 252
Location: Matlock, Derbyshire, UK

PostPosted: Tue May 07, 2024 8:44 pm    Post subject: Reply with quote

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
Code:
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
_________________
(Steve Henley)
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2390
Location: Yateley, Hants, UK

PostPosted: Fri May 10, 2024 4:14 pm    Post subject: Reply with quote

Ah. John Horspool. RIP.
Back to top
View user's profile Send private message
silicondale



Joined: 15 Mar 2007
Posts: 252
Location: Matlock, Derbyshire, UK

PostPosted: Fri May 10, 2024 4:46 pm    Post subject: Reply with quote

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 Henley)
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2390
Location: Yateley, Hants, UK

PostPosted: Fri May 10, 2024 9:06 pm    Post subject: with exq Reply with quote

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
Back to top
View user's profile Send private message
silicondale



Joined: 15 Mar 2007
Posts: 252
Location: Matlock, Derbyshire, UK

PostPosted: Sat May 11, 2024 8:23 am    Post subject: Reply with quote

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.
_________________
(Steve Henley)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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