Author Topic: Frequently Asked Questions  (Read 4988 times)

0 Members and 1 Guest are viewing this topic.

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Frequently Asked Questions
« on: January 05, 2013, 04:48:04 pm »
  • What is nSDL?
    nSDL is a port of the widely used, cross-platform and open source SDL graphics library for the Ndless-fueled TI-Nspire.

  • What is SDL?
    According to Wikipedia, "SDL acts as a thin, cross-platform wrapper, providing support for 2D pixel operations, sound, file access, event handling, timing, threading, and more." It's basically a graphics library with event handling, timing and other nice little things.

  • Where can I download nSDL?
    On the nSDL website.

  • How do I install/use nSDL?
    Copy lib and include folders' content in the nSDL package to the respective folders in your Ndless SDK folder. To build your nSDL programs, use and adapt the Makefile.sample file.

  • Is there some nSDL wiki?
    Yeah.

  • Which version of SDL is nSDL based on?
    1.2.15.

  • Do I need to recompile my code for each machine separately?
    No, compile it once and it'll work on any of the calculators. If however it doesn't, check out some other part of the code isn't causing the trouble.

  • What functionalities of SDL are/aren't supported?
    Supported: video, events, SDL_GetTicks()
    Not supported: audio, threads, timers, mouse

  • Will there ever be mouse support?
    Most probably yes. There was partial mouse support in an earlier nSDL version, but it was removed in a later release because the behavior on CX and non-CX calculators was different, making it desperately frustrating to debug as I only have a Touchpad.

  • Are SDL_image or SDL_gfx supported?
    Yes, both have been ported and can be found here.

  • How do I draw text?
    Using the included nSDL-exclusive functions. First load the font with whatever color you want using nSDL_LoadFont(), then draw your stuff with nSDL_DrawString(), and finally free the font using nSDL_FreeFont(). Simple as that. Here's an example:

    nSDL_Font *font = nSDL_LoadFont(NSDL_FONT_TINYTYPE, 255, 0, 0);
    nSDL_DrawString(screen, font, 10, 10, "I love your string, baby.");
    nSDL_FreeFont(font);


    For more information about the different fonts and available flags, check this page out.

  • What are those nSDL-exclusive functions?
    Here's a list of them.

  • Can I draw text in different sizes?
    No.

  • How do I use cos(), sin() and other mathematical functions?
    Using the ported fdlibm library which can be found here. Just include libfdm.h in your code. It implements all of the functions defined in math.h. Install it the same way as you'd install nSDL. Remember to link fdlibm using the -lfdm switch.

  • Can I draw text in different sizes?
    No.

  • Where do I see which key is mapped to which SDL key value?
    Check out the last part of this file for the latest keymap.

  • Does it run Crysis?
    Yes, the latest tests show that nSDL runs Crysis at about 47 FPS in ultra (note to Fox News: the TI-Nspire doesn't actually run Crysis at 47 FPS). nSDL has been designed with performance in mind.

« Last Edit: January 22, 2013, 08:18:02 am by hoffa »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Frequently Asked Questions
« Reply #1 on: January 06, 2013, 08:12:38 am »
Sorry to bother about it again, but in SDL_image, only 3 formats require an external lib to be read : jpeg, tiff and png. Personally, I'd be happy only with gif images :)

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Frequently Asked Questions
« Reply #2 on: January 06, 2013, 08:38:51 am »
Yeah, but JPEG and PNG are by far the most used formats. Also, just partially porting SDL_image wouldn't make it SDL_image anymore, but some dirty stripped spin-off.

Now that I think of it, a trimmed (and possibly renamed, to not confuse the user) version of SDL_image would probably be possible. I'll look into it.
« Last Edit: January 06, 2013, 08:46:25 am by hoffa »

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55839
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Re: Frequently Asked Questions
« Reply #3 on: January 06, 2013, 12:16:45 pm »
I thought nSDL only supported BMP? ???
I guess it's good that it supports other format since BMP is massive when not in 8 bit or lower format.
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF



Official Website |T-Shirt store | Reverbnation | Facebook | Youtube | Twitter | Spotify

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Frequently Asked Questions
« Reply #4 on: January 06, 2013, 12:40:46 pm »
Well, nSDL does support only BMP :P that's why someone developed SDL_image, an add-on for SDL.

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: Frequently Asked Questions
« Reply #5 on: January 06, 2013, 01:59:32 pm »
I don't think you should be putting false info in a FAQ

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55839
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Frequently Asked Questions
« Reply #6 on: January 06, 2013, 02:04:55 pm »
I don't think you should be putting false info in a FAQ
What false info is there in the FAQ?
« Last Edit: January 06, 2013, 02:11:15 pm by DJ_O »
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF



Official Website |T-Shirt store | Reverbnation | Facebook | Youtube | Twitter | Spotify

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Frequently Asked Questions
« Reply #7 on: January 06, 2013, 04:28:56 pm »
Sorry to bother about it again, but in SDL_image, only 3 formats require an external lib to be read : jpeg, tiff and png. Personally, I'd be happy only with gif images :)
I tried. I can't at this stage. It's like I'm dealing with magic. I don't understand anything anymore. I'm frustrated as fsck. Please read (and watch) this, understand my pain dear brother:
http://ourl.ca/14975/333020

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Frequently Asked Questions
« Reply #8 on: January 06, 2013, 04:45:23 pm »
I didn't think SDL_image was harder to port than the SDL O.O but yeah, it looks like a big work, I think that it takes a bit more than several hours to complete :P

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: Frequently Asked Questions
« Reply #9 on: January 06, 2013, 05:05:39 pm »
I don't think you should be putting false info in a FAQ
What false info is there in the FAQ?

Does it run Crysis?

Yes, the latest tests show that nSDL runs Crysis at about 47 FPS in ultra (note to Fox News: the TI-Nspire doesn't actually run Crysis at 47 FPS). nSDL has been designed with performance in mind.

Ninja edit: Didn't read the brackets. I am a dumbass-_-. Sorry folks.
« Last Edit: January 06, 2013, 05:06:40 pm by Augs »

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55839
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Frequently Asked Questions
« Reply #10 on: January 06, 2013, 11:51:55 pm »
In any case, in any FAQ about an outdated hardware (anything below 512 GB of RAM), an answer saying it can run Crysis is obviously a sarcastic joke. :P
« Last Edit: January 06, 2013, 11:53:13 pm by DJ_O »
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF



Official Website |T-Shirt store | Reverbnation | Facebook | Youtube | Twitter | Spotify