Skip to content

Commit

Permalink
Remove SDL2 code.
Browse files Browse the repository at this point in the history
  • Loading branch information
lipk committed Jul 3, 2014
1 parent dde5c00 commit b16ded3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions src/text.cpp
Expand Up @@ -162,21 +162,13 @@ surface ttext::render() const
return surface_;
}

#if SDL_VERSION_ATLEAST(2,0,0)
sdl::ttexture ttext::render_as_texture() const
{
rerender();
return texture_;
}
#else
#ifdef SDL_GPU
sdl::ttexture ttext::render_as_texture() const
{
rerender();
return texture_;
}
#endif
#endif

int ttext::get_width() const
{
Expand Down Expand Up @@ -707,13 +699,8 @@ void ttext::rerender(const bool force) const
surface_.assign(SDL_CreateRGBSurfaceFrom(
surface_buffer_, width, height, 32, stride,
0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000));
#if SDL_VERSION_ATLEAST(2,0,0)
texture_ = CVideo::get_window()->create_texture
(SDL_TEXTUREACCESS_STATIC, surface_);
#else
#ifdef SDL_GPU
texture_ = sdl::ttexture(surface_);
#endif
#endif
cairo_destroy(cr);
cairo_surface_destroy(cairo_surface);
Expand Down
10 changes: 0 additions & 10 deletions src/text.hpp
Expand Up @@ -81,15 +81,6 @@ class ttext
*/
surface render() const;

#if SDL_VERSION_ATLEAST(2,0,0)
/**
* Returns the rendered text as a texture.
*
* Before rendering it tests whether a redraw is needed and if so it first
* redraws the texture before returning it.
*/
sdl::ttexture render_as_texture() const;
#else
#ifdef SDL_GPU
/**
* Returns the rendered text as a texture.
Expand All @@ -98,7 +89,6 @@ class ttext
* redraws the texture before returning it.
*/
sdl::ttexture render_as_texture() const;
#endif
#endif

/** Returns the width needed for the text. */
Expand Down

0 comments on commit b16ded3

Please sign in to comment.