Fullscreen OpenGL with SDL: where is my cursor?

Hello Everyone,

Lot’s of fun with OpenGL and SDL so far. A simple question, if anyone
can shed some light:

When my application swithces to fulscreen mode, or starts in fullscreen
mode, my cursor dissappears. Am I missing something? I do set
SDL_ShowCursor back and forth as tests, and check the results to see if
it was on or off before the toggle… but no matter what the result I
still can’t see the cursor. I have only seen this happen with SDL_OPENGL
programs. (The “testwm” program in the SDL test directory shows the
cursor in fullscreen mode.)

I do make use of

XMesaSetFXmode()

to switch from windowed to fullscreen mode.

I also use the GLUT function

glutBitmapCharacter()

to draw strings to the screen.

Thanks in advance,

James Jeffers
@James_Jeffers

Organization: Loki Entertainment Software
Newsgroups: loki.open-source.sdl

Hello Everyone,

Lot’s of fun with OpenGL and SDL so far. A simple question, if anyone
can shed some light:

When my application swithces to fulscreen mode, or starts in fullscreen
mode, my cursor dissappears. Am I missing something? I do set
SDL_ShowCursor back and forth as tests, and check the results to see if
it was on or off before the toggle… but no matter what the result I
still can’t see the cursor. I have only seen this happen with SDL_OPENGL
programs. (The “testwm” program in the SDL test directory shows the
cursor in fullscreen mode.)

Your graphics card is probably 3dfx and it takes over the screen, so any
non-opengl graphics will not be displayed. The only way to get a cursor is
to render one yourself in OpenGL.> From: James Jeffers

Reply-To: sdl at lokigames.com
Date: Sun, 30 Jan 2000 11:29:06 -0500
To: sdl at lokigames.com
Subject: [SDL] Fullscreen OpenGL with SDL: where is my cursor?

I do make use of

XMesaSetFXmode()

to switch from windowed to fullscreen mode.

I also use the GLUT function

glutBitmapCharacter()

to draw strings to the screen.

Thanks in advance,

James Jeffers
jjeffers at cise.ufl.edu

Newsgroups: loki.open-source.sdl

Hello Everyone,

Lot’s of fun with OpenGL and SDL so far. A simple question, if anyone
can shed some light:

<>

to switch from windowed to fullscreen mode.

Hmm… well, first of all, if you’re using a 3D accelerator, what happens is
that the accelerator draws data directly on top of wherever it’s supposed to
go, and ignores the cursor, so it will get deleted. Second, using
XMesaSetFXmode() is the wrong way to get into an openGL mode. When you use
SDL_SetVideoMode(), make sure you use the fullscreen flag. If you want to
draw the cursor, you should display it with… well, I’d be inclined to use
a gl texture, but I don’t really know. I haven’t gotten as far as mucking
about with mouse support and GL/SDL yet… when I do, I’ll let you know.

For an example of OpenGL SDL programming, try
http://plank.yi.org/~nvining/seismic.0.0.5.tgz - released under the GNU GPL
although you’d never know because I haven’t stuck the comments on yet. This
is not done, in fact it’s a VERY early version of what I’m up to. It also
shows how to load JPGs with SDL_Image… (don’t try other image formats, it
will lead to bad crashing. Also, if you’re going to try to edit the world,
good luck, no error checking is performed)

I also use the GLUT function

glutBitmapCharacter()

to draw strings to the screen.

That’s cool. I haven’t tried interfacing GLUT and SDL yet. In fact, I wonder
how cool it would be to rewrite GLUT for SDL… we could call it SLUT.

On second thoughts, naah…

James Jeffers
jjeffers at cise.ufl.edu

Nicholas

Nicholas Vining “While you’re out there struggling
vining at pacificcoast.net with your computer, I’m naked,
icq: 20872003 clueless, and feeling good!”
- Ratbert

----- Original Message -----
From: jjeffers@cise.ufl.edu (James Jeffers)
To: sdl at lokigames.com
Date: Sunday, January 30, 2000 8:46 AM
Subject: [SDL] Fullscreen OpenGL with SDL: where is my cursor?

That’s cool. I haven’t tried interfacing GLUT and SDL yet. In fact, I wonder
how cool it would be to rewrite GLUT for SDL… we could call it SLUT.

That’s the coolest thing I have ever heard…

“SLUT”. Awww yeah ;).

m.On Sun, Jan 30, 2000 at 11:25:41AM -0800, Nicholas Vining wrote:


Programmer "I wrote a song about dental floss,
Loki Entertainment Software but did anyone’s teeth get cleaner?"
http://lokigames.com/~briareos/ - Frank Zappa, re: the PMRC

That’s cool. I haven’t tried interfacing GLUT and SDL yet. In fact, I
wonder

how cool it would be to rewrite GLUT for SDL… we could call it SLUT.

That’s the coolest thing I have ever heard…

“SLUT”. Awww yeah ;).

I know. SLUT. What a great name for a library. Now you realise that one
needs to be written… any volunteers, or do I have to fulfill this
prophecy?

m.

Nicholas

Nicholas Vining “While you’re out there struggling
vining at pacificcoast.net with your computer, I’m naked,
icq: 20872003 clueless, and feeling good!”
- Ratbert

----- Original Message -----
From: briareos@lokigames.com (Michael Vance)
To: sdl at lokigames.com
Date: Monday, January 31, 2000 3:29 PM
Subject: Re: [SDL] Fullscreen OpenGL with SDL: where is my cursor?
On Sun, Jan 30, 2000 at 11:25:41AM -0800, Nicholas Vining wrote:

Nicholas Vining wrote:

I know. SLUT. What a great name for a library. Now you realise that one
needs to be written… any volunteers, or do I have to fulfill this
prophecy?

What would be the purpose of it? GLUT handles init and input - the same
as SDL does. And if you want to call something like glutSolidSphere or
stuff you can still link against GLUT and simply call it…–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right

But the name! Think man think!

“Why not just use GLUT instead of messing around with SDL?”
“I prefer SLUT('s)”

Sorry for the language:)

Long live the confused,
Akawaka.–
Bother, said Pooh, stuffing Piglet’s lifeless corpse into a dustbin.

On Tue, 1 Feb 2000, Daniel Vogel wrote:

Nicholas Vining wrote:

I know. SLUT. What a great name for a library. Now you realise that one
needs to be written… any volunteers, or do I have to fulfill this
prophecy?

What would be the purpose of it? GLUT handles init and input - the same
as SDL does. And if you want to call something like glutSolidSphere or
stuff you can still link against GLUT and simply call it…


Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right

But the name! Think man think!

“Why not just use GLUT instead of messing around with SDL?”
“I prefer SLUT('s)”

But could we come up with a different name for SLUT, something involving SDL
and GL? How about “SdL Utility Toolkit”? :slight_smile:

Nicholas

Nicholas Vining “While you’re out there struggling
vining at pacificcoast.net with your computer, I’m naked,
icq: 20872003 clueless, and feeling good!”
- Ratbert

----- Original Message -----
From: akawaka@skynet.ie (Martin Donlon)
To: sdl at lokigames.com
Date: Tuesday, February 01, 2000 1:35 PM
Subject: Re: [SDL] Fullscreen OpenGL with SDL: where is my cursor?