The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Help with SDL2_gfx on OS X
Alice Probst
Guest

Hello,

Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet.

If someone can help, I’ll be forever grateful.

http://stackoverflow.com/questions/39817226/sdl2-gfx-install-and-use-mac-os-x
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Help with SDL2_gfx on OS X
jeroen.clarysse


Joined: 22 Feb 2010
Posts: 69
what exactly is the problem ?

i have it running, but I added a whole bunch of extra routines so sending over my version wouldn’t help much.




Quote:
On 02 Oct 2016, at 19:34, Alice Probst wrote:

Hello,

Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet.

If someone can help, I’ll be forever grateful.

http://stackoverflow.com/questions/39817226/sdl2-gfx-install-and-use-mac-os-x
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Help with SDL2_gfx on OS X
jeroen.clarysse


Joined: 22 Feb 2010
Posts: 69
i just realized your stackoverflow line was a link to the issue, not some sort of signature in your mail :-)

I never use the dylib target, only the framework. Is there a reason you don’t use the framework ?

also : are you sure that you’re using the correct dylib ? In your mail project, right-click the included dylib and choose ‘show in finder’. Is this the version you compiled ?





Quote:
On 02 Oct 2016, at 19:34, Alice Probst wrote:

Hello,

Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet.

If someone can help, I’ll be forever grateful.

http://stackoverflow.com/questions/39817226/sdl2-gfx-install-and-use-mac-os-x
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Help with SDL2_gfx on OS X
Alice Probst
Guest

Well I’d love to use the framework, but there is none :/

I got the library here http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/

Is there a simple mean to generate a .framework with this ? Or is this one part of the complicated cases ^^’ ?


And yes I’m using the correct lib, if what you mean is that I may have had wrong copies here and there. I juste have one version, in one place.


Thanks a lot for helping.
I guess I’ll try to generate a framework with what I have...


Quote:
Le 2 oct. 2016 à 21:20, jeroen clarysse a écrit :
i just realized your stackoverflow line was a link to the issue, not some sort of signature in your mail :-) I never use the dylib target, only the framework. Is there a reason you don’t use the framework ? also : are you sure that you’re using the correct dylib ? In your mail project, right-click the included dylib and choose ‘show in finder’. Is this the version you compiled ?
Quote:
On 02 Oct 2016, at 19:34, Alice Probst wrote: Hello, Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet. If someone can help, I’ll be forever grateful. http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Help with SDL2_gfx on OS X
jeroen.clarysse


Joined: 22 Feb 2010
Posts: 69
I relied to your stackoverflow post, but I think the solution is simple :


you are calling with as 1st parameter a RENDERER. The function header expects a SURFACE :

http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8h.html#a4f7b717b958ef39bfc8c958476dd0de1

clearly defines the function as :

SDL_GFXPRIMITIVES_SCOPE int filledCircleColor ( SDL_Surface * dst,
Sint16 x,
Sint16 y,
Sint16 rad,
Uint32
color

)



Quote:
On 02 Oct 2016, at 22:28, Alice Probst wrote:


Well I’d love to use the framework, but there is none :/

I got the library here http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/

Is there a simple mean to generate a .framework with this ? Or is this one part of the complicated cases ^^’ ?


And yes I’m using the correct lib, if what you mean is that I may have had wrong copies here and there. I juste have one version, in one place.


Thanks a lot for helping.
I guess I’ll try to generate a framework with what I have...



Quote:
Le 2 oct. 2016 à 21:20, jeroen clarysse a écrit :

i just realized your stackoverflow line was a link to the issue, not some sort of signature in your mail :-)

I never use the dylib target, only the framework. Is there a reason you don’t use the framework ?

also : are you sure that you’re using the correct dylib ? In your mail project, right-click the included dylib and choose ‘show in finder’. Is this the version you compiled ?





Quote:
On 02 Oct 2016, at 19:34, Alice Probst wrote:

Hello,

Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet.

If someone can help, I’ll be forever grateful.

http://stackoverflow.com/questions/39817226/sdl2-gfx-install-and-use-mac-os-x
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Help with SDL2_gfx on OS X
Alice Probst
Guest

Yes, sorry, but I tried both :/
With a surface it says « no matching function call », it doesn’t exist.

And the primitives header file for SDL2_gfx shows this :

SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);

SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);




Apparently it used to ask for a surface in SDL, but it changed to a renderer with SDL2.
Quote:
Le 2 oct. 2016 à 22:53, jeroen clarysse a écrit :
I relied to your stackoverflow post, but I think the solution is simple : you are calling with as 1st parameter a RENDERER. The function header expects a SURFACE : http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8h.html#a4f7b717b958ef39bfc8c958476dd0de1 clearly defines the function as : SDL_GFXPRIMITIVES_SCOPE int filledCircleColor ( SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color )
Quote:
On 02 Oct 2016, at 22:28, Alice Probst wrote: Well I’d love to use the framework, but there is none :/ I got the library here http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/ Is there a simple mean to generate a .framework with this ? Or is this one part of the complicated cases ^^’ ? And yes I’m using the correct lib, if what you mean is that I may have had wrong copies here and there. I juste have one version, in one place. Thanks a lot for helping. I guess I’ll try to generate a framework with what I have...
Quote:
Le 2 oct. 2016 à 21:20, jeroen clarysse a écrit : i just realized your stackoverflow line was a link to the issue, not some sort of signature in your mail :-) I never use the dylib target, only the framework. Is there a reason you don’t use the framework ? also : are you sure that you’re using the correct dylib ? In your mail project, right-click the included dylib and choose ‘show in finder’. Is this the version you compiled ?
Quote:
On 02 Oct 2016, at 19:34, Alice Probst wrote: Hello, Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet. If someone can help, I’ll be forever grateful. http://stackoverflow.com/questions/39817226/sdl2-gfx-install-and-use-mac-os-x _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Help with SDL2_gfx on OS X
jeroen.clarysse


Joined: 22 Feb 2010
Posts: 69
hm, weird… how did you manage to get your code compiled/linked when passing a surface as first parameter ?

my guess is that you have two versions of SDL_gfx and the headers/libs don’t match ?


Quote:
Yes, sorry, but I tried both :/
With a surface it says « no matching function call », it doesn’t exist.

And the primitives header file for SDL2_gfx shows this :

SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);

SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);



Apparently it used to ask for a surface in SDL, but it changed to a renderer with SDL2.

Quote:
Le 2 oct. 2016 à 22:53, jeroen clarysse a écrit :

I relied to your stackoverflow post, but I think the solution is simple :


you are calling with as 1st parameter a RENDERER. The function header expects a SURFACE :

http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8h.html#a4f7b717b958ef39bfc8c958476dd0de1

clearly defines the function as :

SDL_GFXPRIMITIVES_SCOPE int filledCircleColor ( SDL_Surface * dst,
Sint16 x,
Sint16 y,
Sint16 rad,
Uint32
color

)



Quote:
On 02 Oct 2016, at 22:28, Alice Probst wrote:


Well I’d love to use the framework, but there is none :/

I got the library here http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/

Is there a simple mean to generate a .framework with this ? Or is this one part of the complicated cases ^^’ ?


And yes I’m using the correct lib, if what you mean is that I may have had wrong copies here and there. I juste have one version, in one place.


Thanks a lot for helping.
I guess I’ll try to generate a framework with what I have...



Quote:
Le 2 oct. 2016 à 21:20, jeroen clarysse a écrit :

i just realized your stackoverflow line was a link to the issue, not some sort of signature in your mail :-)

I never use the dylib target, only the framework. Is there a reason you don’t use the framework ?

also : are you sure that you’re using the correct dylib ? In your mail project, right-click the included dylib and choose ‘show in finder’. Is this the version you compiled ?





Quote:
On 02 Oct 2016, at 19:34, Alice Probst wrote:

Hello,

Not sure if this is the right place to ask this, but I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out, and... well, the documentation or help in general for os x users is…. pretty discreet.

If someone can help, I’ll be forever grateful.

http://stackoverflow.com/questions/39817226/sdl2-gfx-install-and-use-mac-os-x
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Help with SDL2_gfx on OS X
rtrussell


Joined: 10 Feb 2016
Posts: 88
Alice Probst wrote:
I’m having much trouble trying to use sdl2_gfx on Xcode 8, I really can’t figure it out

I simply ignored the precompiled library and instead included the SDL2_gfx files in my source tree:

SDL2_gfxPrimitives.h
SDL2_gfxPrimitives_font.h
SDL2_rotozoom.h
SDL2_gfxPrimitives.c
SDL2_rotozoom.c

Richard.