🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Mouse Cursor

Started by
6 comments, last by SKSlayer 24 years ago
Hey, I made a little prog that shows up a 3d cursor in a 3d scene and that moves with the mouse. Now, I had an Idea, what about a 3D cursor for windows ? Just got to hide the original one, but, how not to show the opengl and the background, so that just the cursoris rendered ? Could be cool, but, I have no clue ...
(you can find me on IRC : #opengl on undernet)
Advertisement
Could you show me what you are talking about?

------------------------
Captured Reality.
I mean I''d like to make a little prog that hide the windows cursor and that shows an a 3D one instead


I''t''s like you make an OGL prog and that contains a spinning cube and you only want the cube to show up, no window, no background just the cube, Like if you run the program from the windows explorer behind your cube, you''ll see, the explorer and if you run it from the desktop, you''ll see the desktop.

So I display a 3D cursor that show up instead of the windows one (I hide the win one and show the other one).

(you can find me on IRC : #opengl on undernet)
well, most people would just make a cursor set. i think it may be impossible to do what you want to do. but im not sure.
==============================
whats a signature?
htm[s]l[/s]
Well, it''ll take a lot of hacking and probably won''t be very fast. The trick is (I''m a Mac programmer, but I''ve done enough Win32 to see it''l'' work the same way) to render the OpenGL sceen into 2 offscreen buffers, one is the actual image, the other a mask, then you would take custom window drawing code which will create a window in the shape of the mask and copy the image of the cursor into it. As you would be updating the window, rendering 2 OpenGL scenes (although small), copying from the offscreen buffers and moving the window (not necissarily in that order) it would be slow. The other method would be to find where in memory, at the time, the bitmaps and mask for the cursor are being stored and copy from the offscreen buffers into that (this would be faster, but can cause some corruption in memory if not handled well). The second method is by far the best, but both are hard to implement.

Morgan
Humm, yeah, but, how could I find where is stored the cursor ?
(you can find me on IRC : #opengl on undernet)
Why not just ShowCursor(FALSE);
and just add your mouse routines using DirectInput?

The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.

?Have a nice day!?

I already knew about hiding the cursor, that doesn''t really help, the main problem is of hiding all the scene that is not being seen.
(you can find me on IRC : #opengl on undernet)

This topic is closed to new replies.

Advertisement