Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

SF2DLIB 3DS: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = SF2DLIB
|title=SF2DLIB
| image = https://dlhb.gamebrew.org/3dshomebrew/SF2DLIB.jpeg|250px
|image=3dspc.png
| type = PC Utilities
|description=Simple and Fast 2D library for the Nintendo 3DS (using ctrulib and citro3d).
| version=2017
|author=TricksterGuy
| lastupdated = 2017/08/20
|lastupdated=2017/08/20
| licence = Mixed
|type=Developments
| author = TricksterGuy
|version=2017
| website = https://github.com/TricksterGuy/sf2dlib
|license=MIT
| download = https://dlhb.gamebrew.org/3dshomebrew/sf2dlib-master.zip
|download=https://dlhb.gamebrew.org/3dshomebrews/sf2dlib_tricksterguy.zip
| source =  
|website=https://github.com/TricksterGuy/sf2dlib
}}
}}
<youtube>1ta5aPkcmTE</youtube>
{{Obsolete}}
 
sf2dlib is a simple abstraction layer over [https://github.com/devkitPro/citro3d citro3d] with extra functions over citro3d to make displaying simple shapes and 2d sprites easy. As long as you are not drawing millions of shapes/sprites, this library should be able to fit your use case. If you are seeking to squeeze all of the power out of your 3ds and have full control over the GPU then sf2dlib will probably not fit your use case and you should use citro3d instead. Note that there is a small overhead in using sf2dlib over citro3d, but it is negligible as long as you aren't rendering too much in a single frame.
 
This is based on [https://github.com/xerpi/sf2dlib xerpi's sf2dlib], making it more consistent with citro3d while also adding new functions and improvements. See the [https://github.com/TricksterGuy/sf2dlib/blob/master/sample/source/main.c sample] to see the new code flow.
 
'''Note:''' This library is deprecated. Please consider using [https://github.com/fincs/citro3d citro3d] directly instead.
 
==Installation==
Download the library or git clone it from GitHub.
 
Open a command prompt/terminal and cd to the libsf2d folder.
 
Run the commands <code>make</code> and <code>make install</code>.
 
==User guide==
Please refer to the [http://xerpi.github.io/sf2dlib/html/sf2d_8h.html original documentation].


== SF2DLIB ==
===API Changes===
Simple and Fast 2D library for the Nintendo 3DS (using [citro3d] and [ctrulib])
{| class="wikitable" style="width: 700px;"
=== Overview ===
! style="width: 40%;"| Function
sf2dlib is now a simple abstraction layer over [citro3d] with extra functions over citro3d to make displaying simple shapes and 2d sprites easy. As long as you are not drawing millions of shapes/sprites, this library should be able to fit your use case. If you are seeking to squeeze all of the power out of your 3ds and have full control over the GPU then sf2dlib will probably not fit your use case and you should use [citro3d] instead. Note that there is a small overhead in using sf2dlib over citro3d, but it is negligible as long as you aren't rendering too much in a single frame.
=== Special Note for new users. ===
If you are a new user to 3ds homebrew or starting new code, you would be much better served trying out [https://github.com/nop90/SDL-3DS nop90's SDL port]. There are a lot of reasons to use SDL over this library, SDL has [tutorials], there are a ton of [examples], and you get the ability to take your work off the 3ds or test it off the 3ds.
=== Changes ===
These changes in this fork are to make the code more consistent with [citro3d] while also adding new functions and improvements. See the [sample] to see the new code flow. To enumerate the list of changes in this [sf2dlib] fork:
=== API Changes ===
{|
! Function
! Change
! Change
|-
|-
Line 47: Line 55:
| Removed, use Batch functions isntead.
| Removed, use Batch functions isntead.
|}
|}
=== New Features ===
 
* Support for Sprite Batching to improve efficiency of drawing many sprites using the same texture see [Batching Sample].
===Added Features===
* Support for Sprite Batching to improve efficiency of drawing many sprites using the same texture see [https://github.com/TricksterGuy/sf2dlib/tree/master/samples/batching Batching Sample].
* Ability to set framerate limit via <code>sf2d_set_fps(float fps)</code>
* Ability to set framerate limit via <code>sf2d_set_fps(float fps)</code>


===Documentation (original)===
==Media==
http://xerpi.github.io/sf2dlib/html/sf2d_8h.html
'''How to set up your computer for developing 3DS Homebrew (Linux)''' ([https://www.youtube.com/watch?v=1ta5aPkcmTE BtheDestroyer]) <br>
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen.
<youtube>1ta5aPkcmTE</youtube>
Thanks SOhttp://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
 
* [citro3d]: <https://github.com/fincs/citro3d>
==External links==
* [ctrulib]: <https://github.com/smealum/ctrulib>
* GitHub - https://github.com/TricksterGuy/sf2dlib
* [sample]: <https://github.com/TricksterGuy/sf2dlib/blob/master/sample/source/main.c>
* [Batching Sample]: <https://github.com/TricksterGuy/sf2dlib/tree/master/samples/batching>
* [sf2dlib]: <https://github.com/xerpi/sf2dlib>
* [tutorials]: <https://www.google.com/search?q=SDL+tutorials&oq=SDL+tutorials&aqs=chrome..69i57j0l5.8503j0j7&sourceid=chrome&ie=UTF-8>
* [examples]: <https://libregamewiki.org/SDL_games>

Latest revision as of 11:45, 22 Haziran 2024

SF2DLIB
3dspc.png
General
AuthorTricksterGuy
TypeDevelopments
Version2017
LicenseMIT License
Last Updated2017/08/20
Links
Download
Website

sf2dlib is a simple abstraction layer over citro3d with extra functions over citro3d to make displaying simple shapes and 2d sprites easy. As long as you are not drawing millions of shapes/sprites, this library should be able to fit your use case. If you are seeking to squeeze all of the power out of your 3ds and have full control over the GPU then sf2dlib will probably not fit your use case and you should use citro3d instead. Note that there is a small overhead in using sf2dlib over citro3d, but it is negligible as long as you aren't rendering too much in a single frame.

This is based on xerpi's sf2dlib, making it more consistent with citro3d while also adding new functions and improvements. See the sample to see the new code flow.

Note: This library is deprecated. Please consider using citro3d directly instead.

Installation

Download the library or git clone it from GitHub.

Open a command prompt/terminal and cd to the libsf2d folder.

Run the commands make and make install.

User guide

Please refer to the original documentation.

API Changes

Function Change
sf2d_start_render() Newly added, use instead of sf2d_start_frame.
sf2d_start_frame(screen, side) Removed, sf2d_set_render_screen(screen, side) replaces it.
sf2d_end_frame() Removed, sf2d_end_render() replaces it.
sf2d_swapbuffers() Removed, sf2d_end_render() replaces it.
sf2d_draw_quad_uv_current(...) Removed, use Batch functions instead.
sf2d_draw_quad_uv(...) Removed, use Batch functions isntead.
sf2d_draw_quad_uv_blend(...) Removed, use Batch functions isntead.

Added Features

  • Support for Sprite Batching to improve efficiency of drawing many sprites using the same texture see Batching Sample.
  • Ability to set framerate limit via sf2d_set_fps(float fps)

Media

How to set up your computer for developing 3DS Homebrew (Linux) (BtheDestroyer)

External links

Advertising: