SDL_TTF, render simple hello world SDL text, load fonts, in emscripten

15 views
Skip to first unread message

fmuld fhalo

unread,
Aug 16, 2019, 12:59:47 PM8/16/19
to emscripten-discuss
Hi

How to write simple hello world SDL text in emscripten?

I can get text display on desktop but not in emscripten?

Are they any tutorials/examples?

Alon Zakai

unread,
Aug 16, 2019, 5:18:15 PM8/16/19
to emscripte...@googlegroups.com
I believe the test suite has examples of that - doing a search for the SDL command you want under tests/ will find the file, and then you can find how to build and test it by looking for the python test code that refers to it.

- Alon


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/b7fb2997-e869-4ca9-b42b-ab75d0084f4e%40googlegroups.com.

fmuld fhalo

unread,
Aug 17, 2019, 4:46:23 AM8/17/19
to emscripten-discuss
Thanks for that.

Will check the python test code.


On Friday, August 16, 2019 at 10:18:15 PM UTC+1, Alon Zakai wrote:
I believe the test suite has examples of that - doing a search for the SDL command you want under tests/ will find the file, and then you can find how to build and test it by looking for the python test code that refers to it.

- Alon


On Fri, Aug 16, 2019 at 9:59 AM fmuld fhalo <fmu...@gmail.com> wrote:
Hi

How to write simple hello world SDL text in emscripten?

I can get text display on desktop but not in emscripten?

Are they any tutorials/examples?

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

fmuld fhalo

unread,
Aug 17, 2019, 5:17:15 AM8/17/19
to emscripten-discuss
Goo news the test sdl2_ttf works.

But, not my small written program.
Where do I go to find in the python code the emcc common line used?

Alon Zakai

unread,
Aug 17, 2019, 12:27:33 PM8/17/19
to emscripte...@googlegroups.com
Search for the name of the test - it has to be referred to in the test suite for it to run :) It will probably be a test called test_sdl2_ttf() inside tests/test_browser.py (if it's a browser test). And that will likely use utility functions like btest() which are either in that same file, or in tests/runner.py.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/64c203cf-ae23-4cbf-b39a-872699302fcf%40googlegroups.com.

fmuld fhalo

unread,
Aug 17, 2019, 2:10:40 PM8/17/19
to emscripten-discuss

Thank you, Thank you ................................


I've been woking on this all day. I was just about to email the group. Seen your reply.

Now, I can work out the emcs commands used.



Thanks.


Let hope I can now repeat this on my own little test program.


On Friday, August 16, 2019 at 5:59:47 PM UTC+1, fmuld fhalo wrote:
Reply all
Reply to author
Forward
0 new messages