Using SDL_FillRect under SDL 1.3

I am trying to fill a rectangle on the screen using SDL_ RenderFillRect ()
under SDL 1.3. I used the testdraw2.c as a sample. Unlike filling a rect
in a SDL_TextureID, doing it to the screen does not appear to require a
SDL_RenderCopy() call; at least not in the testdraw2.c sample.

Even though each of the SDL functions returns 0 (meaning they are not
returning an error) I never see the filled rect on the screen.

This function is called, then later in the code I call SDL_RenderPresent().
I see everything else I am drawing to the screen except the colored
rectangle.

This is what I am calling:

void MyFillRect( SDL_WindowID nWindowID, SDL_Rect *pRect, Uint8 r, Uint8 g,
Uint8 b )

{

SDL_SelectRenderer( nWindowID );

 SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE );

 SDL_SetRenderDrawColor( r, g, b, 0xFF );

 SDL_RenderFillRect( pRect );

}

Does anyone have any idea what I am doing wrong?

Thanks,

Ken Rogoway

The subject should have been: Using SDL_RenderFillRect() under SDL 1.3From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Ken Rogoway
Sent: Sunday, June 27, 2010 11:53 PM
To: sdl at lists.libsdl.org
Subject: [SDL] Using SDL_FillRect under SDL 1.3

I am trying to fill a rectangle on the screen using SDL_ RenderFillRect ()
under SDL 1.3. I used the testdraw2.c as a sample. Unlike filling a rect
in a SDL_TextureID, doing it to the screen does not appear to require a
SDL_RenderCopy() call; at least not in the testdraw2.c sample.

Even though each of the SDL functions returns 0 (meaning they are not
returning an error) I never see the filled rect on the screen.

This function is called, then later in the code I call SDL_RenderPresent().
I see everything else I am drawing to the screen except the colored
rectangle.

This is what I am calling:

void MyFillRect( SDL_WindowID nWindowID, SDL_Rect *pRect, Uint8 r, Uint8 g,
Uint8 b )

{

SDL_SelectRenderer( nWindowID );

 SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE );

 SDL_SetRenderDrawColor( r, g, b, 0xFF );

 SDL_RenderFillRect( pRect );

}

Does anyone have any idea what I am doing wrong?

Thanks,

Ken Rogoway

It turns out that SDL_FillRects wasn’t definted for D3D in the last SVN
version of SDL 1.3. After I updated to the lastest version in Mecurial the
Fill Rect works as expected.

This begs the question (for Sam): “What is the SDL 1.3 Roadmap?”

KenFrom: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Ken Rogoway
Sent: Sunday, June 27, 2010 11:55 PM
To: 'SDL Development List’
Subject: Re: [SDL] Using SDL_FillRect under SDL 1.3

The subject should have been: Using SDL_RenderFillRect() under SDL 1.3

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Ken Rogoway
Sent: Sunday, June 27, 2010 11:53 PM
To: sdl at lists.libsdl.org
Subject: [SDL] Using SDL_FillRect under SDL 1.3

I am trying to fill a rectangle on the screen using SDL_ RenderFillRect ()
under SDL 1.3. I used the testdraw2.c as a sample. Unlike filling a rect
in a SDL_TextureID, doing it to the screen does not appear to require a
SDL_RenderCopy() call; at least not in the testdraw2.c sample.

Even though each of the SDL functions returns 0 (meaning they are not
returning an error) I never see the filled rect on the screen.

This function is called, then later in the code I call SDL_RenderPresent().
I see everything else I am drawing to the screen except the colored
rectangle.

This is what I am calling:

void MyFillRect( SDL_WindowID nWindowID, SDL_Rect *pRect, Uint8 r, Uint8 g,
Uint8 b )

{

SDL_SelectRenderer( nWindowID );

 SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE );

 SDL_SetRenderDrawColor( r, g, b, 0xFF );

 SDL_RenderFillRect( pRect );

}

Does anyone have any idea what I am doing wrong?

Thanks,

Ken Rogoway