SDL_ttf prob

hi,

I’m working on a small game, and am having a small problem with SDL_ttf. I
am using v2.0.4. When the code to render text executes, the program
terminates. For example, my game runs at 640x480. It will switch to that
resolution, then back to the resolution that I was using before I executed
the game. If I use a Release build oof the lib, I get the Windows XP dialog
saying “Send info to Microsoft, blah blah blah.” The Debug build the game
just stops as if I exited.

The code I am using is just about identical to that in the “showfonts” demo,
except i changed main to a function that I can call with my text and where
i want it. No changes were made to the SDL_ttf calls.

Unfortunately the debugger isn’t helping narrow the problem as the the game
just locks up completely when I use it.

I am using Windows XP, Visual C 6, and the game uses OpenGL for 3D graphics.

Has anyone else had this problem, and any possible remedies?

TIA,
Anthony

I’m working on a small game, and am having a small problem with SDL_ttf. I
am using v2.0.4. When the code to render text executes, the program
terminates.
[…]
The Debug build the game just stops as if I exited.
[…]
The code I am using is just about identical to that in the “showfonts” demo,
except i changed main to a function that I can call with my text and where
i want it. No changes were made to the SDL_ttf calls.

Could it be that there was an “exit (int);” at the end of the main
fonction and that it’s still there now that you have renamed it and call
it like any other function? :slight_smile:

Alex.–
http://www.gnurou.org

For once, it isn’t the obvious :slight_smile:

I did say I used a modified main to suit my purposes (and that included
more than just renaming it) and I did delete any exits.
I finally had enough time to go through and comment every line of code
(since VC6’s debugger kept crashing itself), and uncomment one by one. I
have narrowed it down to the line:

SDL_UpdateRect(screen, 0, 0, 0, 0);

When this line was uncommented, the program would just die. Now the major
difference I see between my app and the demo with SDL_ttf is that I use
OpenGL. Is there any issue with OpenGL and SDL_UpdateRect?> ----- Original Message -----

From: alexandrecourbot@linuxgames.com (Alexandre Courbot)
To:
Sent: Wednesday, February 06, 2002 5:05 AM
Subject: Re: [SDL] SDL_ttf prob

Could it be that there was an “exit (int);” at the end of the main
fonction and that it’s still there now that you have renamed it and call
it like any other function? :slight_smile:

Hi

I think it would be best if you submitted your code for us to look at.

One thing that confuses me is that you say you are using OpenGL. That being
the case, why are you calling SDL_UpdateRect? You should be calling
SDL_GL_SwapBuffers.

Regards,

Steve> ----- Original Message -----

From: Anthony T. [mailto:goumba_tony@yahoo.com]
Sent: 07 February 2002 03:28
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_ttf prob

For once, it isn’t the obvious :slight_smile:

I did say I used a modified main to suit my purposes (and that included
more than just renaming it) and I did delete any exits.
I finally had enough time to go through and comment every line of code
(since VC6’s debugger kept crashing itself), and uncomment one by one. I
have narrowed it down to the line:

SDL_UpdateRect(screen, 0, 0, 0, 0);

When this line was uncommented, the program would just die. Now the major
difference I see between my app and the demo with SDL_ttf is that I use
OpenGL. Is there any issue with OpenGL and SDL_UpdateRect?

----- Original Message -----
From: alexandrecourbot@linuxgames.com (Alexandre Courbot)
To:
Sent: Wednesday, February 06, 2002 5:05 AM
Subject: Re: [SDL] SDL_ttf prob

Could it be that there was an “exit (int);” at the end of the main
fonction and that it’s still there now that you have renamed it and call
it like any other function? :slight_smile:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com