using SDL_RTF : link error on SDL_RenderGetClipRect() |
jeroen.clarysse
|
basically, the function ecRenderText makes calls to SDL_RenderGetClipRect() and SDL_RenderSetClipRect(), but with an SDL_renderer as first parameter, which doesn't work anymore (since SDL2 ?)
I commented out the lines and everything seems to work, but thought I'd report it modified code below int ecRenderText(RTF_Context *ctx, const SDL_Rect *rect, int yOffset) { // SDL_Renderer *renderer = (SDL_Renderer *)ctx->renderer; RTF_Line *line; // SDL_Rect savedRect; ecReflowText(ctx, rect->w); // SDL_RenderGetClipRect(renderer, &savedRect); // SDL_RenderSetClipRect(renderer, rect); for (line = ctx->start; line && yOffset < rect->h; line = line->next) { if (yOffset + line->lineHeight > 0) RenderLine(ctx, line, rect, yOffset); yOffset += line->lineHeight; } // SDL_RenderSetClipRect(renderer, &savedRect); return ecOK; } _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
using SDL_RTF : link error on SDL_RenderGetClipRect() |
MrOzBarry
|
Are you using the copy from github or from libsdl.org? The github mirror is over two years old, where the libsdl.org mercurial version is the main source and always up to date.
On Tue, Mar 31, 2015 at 4:16 AM, jeroen clarysse wrote:
|
|||||||||||||
|
using SDL_RTF : link error on SDL_RenderGetClipRect() |
jeroen.clarysse
|
the mercurial source :
(do a find on "ecRenderText"and you'll see the cliprect routines ) http://hg.libsdl.org/SDL_rtf/file/c9210d3944ad/SDL_rtfreadr.c
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
using SDL_RTF : link error on SDL_RenderGetClipRect() |
MrOzBarry
|
Well, SDL only implemented renderers since SDL 1.3/2.0, so that's not legacy code. What version of SDL is the compiler linking against?
-Alex On Tue, Mar 31, 2015 at 9:49 AM, jeroen clarysse wrote:
|
|||||||||||||||
|