Skip to content

Commit e87d237

Browse files
committed
Add a note that the example is written in old style
1 parent 6349232 commit e87d237

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ A small example executable is included with the library. It loads a given font
2727
and uses it to display text in various ways. You can find it in the `example`
2828
directory.
2929

30+
Note: this example works, but is written in sdl1-style, so instead
31+
you should change surfaces to textures and follow the usual sdl2 API.
32+
3033
```bash
3134
cd sdl2-ttf
3235
cabal configure -fexample

example/Example.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
-- Note: this code uses the old, inherited from sdl1, surface-based
2+
-- API for displaying on screen. It can't be used together with the new
3+
-- renderer API. You should instead copy the surface to a texture ASAP
4+
-- and then display the texture using the renderer in the usual
5+
-- sdl2 way.
16
{-# LANGUAGE LambdaCase #-}
27
{-# LANGUAGE OverloadedStrings #-}
38

0 commit comments

Comments
 (0)