Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
109 user(s) are online (101 user(s) are browsing Forums)

Members: 2
Guests: 107

samo79, Paul, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 42 43 44 (45) 46 47 48 ... 74 »
Re: SDL2
Home away from home
Home away from home


See User information
@kas1e

Quote:
No, will not. OS4 libraries code are very different to os3/morphos one.


I know, what i'm only trying to say was about the eventual breaking API, sdl exists in form of "standard" Amiga library on os3 and morphos and porting that as a standard shared library did not breaked anything ... i only meant that

But sure as capehill said it's not an high priority for now, not for him and probably not for us, just it will be nice someday :)

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Added to that file: https://www.hyperion-entertainment.com ... /updates-kc/src/texture.c

To cgl_GLBindTexture(), right after DL_CHECK(BindTexture(Self, target, texture)) call, add that:

printf("target %d, texture %d\n", target, texture);

Run dosbox with opengl render, and have that in output:

Quote:

target 3553, texture 1
Using driver "opengl" for texture renderer
target 3553, texture 1
target 3553, texture 1
target 3553, texture 1
target 3553, texture 1
target 3553, texture 1
target 3553, texture 1
target 3553, texture 1
target 3553, texture 1


Seems nothing new there, but at least no "texture 0" as from gl4es.


Added IDOS->Delay(400); after that prinf in minigl, and that what i found:

first 3 binds are black window:

target 3553, texture 1
Using driver "opengl" for texture renderer
target 3553, texture 1
target 3553, texture 1

Then, next 2 are good visibly data as expected.

target 3553, texture 1
target 3553, texture 1

And then after that all coming repeats of "target 3553, texture 1" are white.

So it like something lost ? or cleared wrong ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Ok, thanks for checking that. Yesterday I tested Super Methane Bros and it has a similar problem so it really seems like an SDL2 issue. I went back some releases and apparently it was working before the batch renderer, at 2.0.8. Basically after that the renderers were re-written.

Tried also MiniGL 2.21, no change.

By the way, when you checked the Windows versions, are you sure that the shaders were disabled? https://github.com/AmigaPorts/SDL/blob ... ngl/SDL_render_gl.c#L1760

I guess it's something like setenv SDL_RENDER_OPENGL_SHADERS 0?

EDIT: found it finally. It seems that GL_TEXTURE_2D is disabled. Probably a bug in upstream. As a workaround, add


data->glEnable(GL_TEXTURE_2D);

here: https://github.com/AmigaPorts/SDL/blob ... ngl/SDL_render_gl.c#L1170


Edited by Capehill on 2020/2/20 18:50:37
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Yahoo! It works :) Thanks a bunch!

Have another theoretical question : what the low-level differences between using of opengl as renderer, and when use opengl as opengl.

I mean, in case with dosbox, pure output via opengl are slow like hell on 50-70% and cpu loading are 100%, which point that it tries to load textures for each frames, and without dma (seems so) hit the bounds.

But then, with output=texture, and be it "opengl" renderer or "opengles2" it's more or less fast the same as when compositing renderer. Well, compositing a little bit faster, but still opengl and opengles2 renderers also on the same level. But when it come to opengl output, then massive speed drop.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

If you want to find out the slowness in DosBox OpenGL drawing you have to measure how much time operations take.

For example DosBox seems to update texture in multiple parts where as SDL call glTexSubImage only once. DosBox draws the display using just 1 large triangle if I remember correctly. SDL uses 2 triangles that cover the display.

There are more differences, DB uses display lists, SDL doesn't. Also some OpenGL states might be different. But I bet it's either the texture update or drawing method that causes the penalty.

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Ryan has fixed the earlier OpenGL texture issue so with the latest code you should be able to get rid of that workaround.

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
2.0.12 RC 1 is available: https://github.com/AmigaPorts/SDL/releases/tag/v2.0.12-rc1-amigaos4

Please give it some testing. After fixing possible problems, it will be uploaded to OS4Depot, as usual.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
It seems that issue we discuss in shaderjoy thread about content being overwrite window borders also present in SDL2 apps. At least, i got now some beta port of some game and it definately have the same issue.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

SDL2 has 4 rendering paths, so need more information regarding this.

1) software
2) compositing
3) MiniGL
4) OGLES2

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

The game had this piece of init code:

window_ SDL_CreateWindow(WINDOW_TITLE,
                           
SDL_WINDOWPOS_UNDEFINEDSDL_WINDOWPOS_UNDEFINED,
                           
pop_window_widthpop_window_heightflags);
// Make absolutely sure that VSync will be off, to prevent timer issues.
SDL_SetHint(SDL_HINT_RENDER_VSYNC"0");
renderer_ SDL_CreateRenderer(window_, -SDL_RENDERER_ACCELERATED SDL_RENDERER_TARGETTEXTURE);
SDL_RendererInfo renderer_info;
if (
SDL_GetRendererInfo(renderer_, &renderer_info) == 0) {
    if (
renderer_info.flags SDL_RENDERER_TARGETTEXTURE) {
        
is_renderer_targettexture_supported true;
    }
}


So it probably compositing and not just software ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Reproducible with some examples: testoverlay2, teststreaming.

Not producible with: testdrawchessboard.

Can you create a ticket?


Go to top
Re: SDL2
Home away from home
Home away from home


See User information

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
2.0.12 RC2 is available:

https://github.com/AmigaPorts/SDL/releases/tag/v2.0.12-rc2-amigaos4

Please give it some testing.

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Capehill

tryeing to compile testgamecontroller.c:
ppc-amigaos-gcc -o testgamecontroller testgamecontroller.o -use-dynld -lSDL2 -athread=native -lpthread
testgamecontroller.o: In function `loop':
testgamecontroller.c:157: undefined reference to `SDL_GameControllerRumble'
testgamecontroller.o: In function `WatchGameController':
testgamecontroller.c:232: undefined reference to `SDL_GameControllerTypeForIndex'
testgamecontroller.c:232: undefined reference to `SDL_JoystickGetDevicePlayerIndex'
make: *** [testgamecontroller] Error 1
#

removing "-use-dynld" option, compiles correctly:
ppc-amigaos-gcc -gstabs -O2 -Wall -ISDK:Local/newlib/include/SDL2 -DHAVE_OPENGL -c -o testgamecontroller.o testgamecontroller.c
testgamecontroller.c: In function 'loop':
testgamecontroller.c:156:16: warning: unused variable 'high_frequency_rumble' [-Wunused-variable]
Uint16 high_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERRIGHT) * 2;
^~~~~~~~~~~~~~~~~~~~~
testgamecontroller.c:155:16: warning: unused variable 'low_frequency_rumble' [-Wunused-variable]
Uint16 low_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERLEFT) * 2;
^~~~~~~~~~~~~~~~~~~~
ppc-amigaos-gcc -o testgamecontroller testgamecontroller.o -lSDL2 -athread=native -lpthread

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@jabirulo

Quote:

ppc-amigaos-gcc -o testgamecontroller testgamecontroller.o -use-dynld -lSDL2 -athread=native -lpthread
testgamecontroller.o: In function `loop':
testgamecontroller.c:157: undefined reference to `SDL_GameControllerRumble'


Can you verify the linked .so file? Those functions were added in 2.0.9 version.

-lpthread is not required. EDIT: since 2.0.11 RC1!


Edited by Capehill on 2020/6/17 7:53:45
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

I don't know if this is an issue recently introduced, but since a few months I have problems compiling any of my projects with SDL2.0.9 WITHOUT -lpthread.

It worked for a long time with scummvm because some other dependency brought -lpthread with it, but after dropping that dependency I get configure errors and SDL2 is not usable anymore, unless I add -lpthread to my LDFLAGS envvar.

Doesn't matter if static or shared.
And -athread=native is already used.

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Raziel

2.0.9 uses pthreads. That changed in 2.0.11 RC1:

https://github.com/AmigaPorts/SDL/releases/tag/v2.0.11-rc1-amigaos4

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
Using latest SDL2 from github (2.0.12 release candidate 2) I get:
#make -f Makefile.amigaos4
ppc-amigaos-gcc -gstabs -O2 -Wall -ISDK:Local/newlib/include/SDL2 -DHAVE_OPENGL -c -o testgamecontroller.o testgamecontroller.c
testgamecontroller.c: In function 'loop':
testgamecontroller.c:156:16: warning: unused variable 'high_frequency_rumble' [-Wunused-variable]
Uint16 high_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERRIGHT) * 2;
^~~~~~~~~~~~~~~~~~~~~
testgamecontroller.c:155:16: warning: unused variable 'low_frequency_rumble' [-Wunused-variable]
Uint16 low_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERLEFT) * 2;
^~~~~~~~~~~~~~~~~~~~
ppc-amigaos-gcc -use-dynld -lSDL2 -athread=native -o testgamecontroller testgamecontroller.o
testgamecontroller.o: In function `loop':
testgamecontroller.c:99: undefined reference to `SDL_GameControllerTypeForIndex'
testgamecontroller.o: In function `WatchGameController':
testgamecontroller.c:234: undefined reference to `SDL_JoystickGetDevicePlayerIndex'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_cond_signal'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_create'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_getspecific'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_attr_init'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_detach'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_cond_broadcast'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_key_create'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_attr_setstacksize'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_cond_init'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutexattr_settype'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutex_unlock'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_self'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutexattr_init'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutex_destroy'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutex_lock'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_cond_wait'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutex_trylock'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_cond_destroy'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_mutex_init'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_attr_setdetachstate'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_join'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_cond_timedwait'
/SDK/local/newlib/lib/libSDL2.so: undefined reference to `pthread_setspecific'
make: *** [testgamecontroller] Error 1
#

adding -lpthread:
#make -f Makefile.amigaos4
ppc-amigaos-gcc -gstabs -O2 -Wall -ISDK:Local/newlib/include/SDL2 -DHAVE_OPENGL -c -o testgamecontroller.o testgamecontroller.c
testgamecontroller.c: In function 'loop':
testgamecontroller.c:156:16: warning: unused variable 'high_frequency_rumble' [-Wunused-variable]
Uint16 high_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERRIGHT) * 2;
^~~~~~~~~~~~~~~~~~~~~
testgamecontroller.c:155:16: warning: unused variable 'low_frequency_rumble' [-Wunused-variable]
Uint16 low_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERLEFT) * 2;
^~~~~~~~~~~~~~~~~~~~
ppc-amigaos-gcc -use-dynld -lSDL2 -athread=native -lpthread -o testgamecontroller testgamecontroller.o
testgamecontroller.o: In function `loop':
testgamecontroller.c:99: undefined reference to `SDL_GameControllerTypeForIndex'
testgamecontroller.o: In function `WatchGameController':
testgamecontroller.c:234: undefined reference to `SDL_JoystickGetDevicePlayerIndex'
make: *** [testgamecontroller] Error 1
#


without -use-dynld:
#make -f Makefile.amigaos4
ppc-amigaos-gcc -gstabs -O2 -Wall -ISDK:Local/newlib/include/SDL2 -DHAVE_OPENGL -c -o testgamecontroller.o testgamecontroller.c
testgamecontroller.c: In function 'loop':
testgamecontroller.c:156:16: warning: unused variable 'high_frequency_rumble' [-Wunused-variable]
Uint16 high_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERRIGHT) * 2;
^~~~~~~~~~~~~~~~~~~~~
testgamecontroller.c:155:16: warning: unused variable 'low_frequency_rumble' [-Wunused-variable]
Uint16 low_frequency_rumble = SDL_GameControllerGetAxis(gamecontroller, SDL_CONTROLLER_AXIS_TRIGGERLEFT) * 2;
^~~~~~~~~~~~~~~~~~~~
ppc-amigaos-gcc -o testgamecontroller testgamecontroller.o -lSDL2 -athread=native -lpthread
#


Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Capehill

How do I "Can you verify the linked .so file?" tried readelf, objdump, but dunnot what args/switches do I need.
And what file the .o or the executable?

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@jabirulo

Please try version command, because there should be version tag in the .so.

You could also check where the link in SDK:local/newlib/lib/libSDL2.so is pointing to.

Additionally you can try something like "nm libSDL2.so | grep function_name" to see the symbols.

Go to top

  Register To Post
« 1 ... 42 43 44 (45) 46 47 48 ... 74 »

 




Currently Active Users Viewing This Thread: 4 ( 0 members and 4 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project