Who's Online
102 user(s) are online (
93 user(s) are browsing
Forums )
Members: 2
Guests: 100
smarkusg ,
Chris ,
more...
Topic options
View mode
Newest First
Re: SDL2
Posted on:
2020/2/18 20:23
#881
Home away from home
Joined: 2006/12/2 3:55Last Login
: Today 23:11
From Italy, Perugia
Group:
Registered Users
@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 :)
Re: SDL2
Posted on:
2020/2/18 21:11
#882
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@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 1Seems 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 ?
Re: SDL2
Posted on:
2020/2/20 17:45
#883
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@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
Re: SDL2
Posted on:
2020/2/20 19:36
#884
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@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.
Re: SDL2
Posted on:
2020/2/21 8:23
#885
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@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.
Re: SDL2
Posted on:
2020/4/10 16:04
#886
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@kas1e Ryan has fixed the earlier OpenGL texture issue so with the latest code you should be able to get rid of that workaround.
Re: SDL2
Posted on:
2020/5/29 20:18
#888
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@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.
Re: SDL2
Posted on:
2020/5/30 17:44
#889
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@kas1e SDL2 has 4 rendering paths, so need more information regarding this. 1) software 2) compositing 3) MiniGL 4) OGLES2
Re: SDL2
Posted on:
2020/5/31 11:05
#890
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@Capehill
The game had this piece of init code:
window_ = SDL_CreateWindow ( WINDOW_TITLE ,
SDL_WINDOWPOS_UNDEFINED , SDL_WINDOWPOS_UNDEFINED ,
pop_window_width , pop_window_height , flags );
// Make absolutely sure that VSync will be off, to prevent timer issues.
SDL_SetHint ( SDL_HINT_RENDER_VSYNC , "0" );
renderer_ = SDL_CreateRenderer ( window_ , - 1 , 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 ?
Re: SDL2
Posted on:
2020/5/31 14:03
#891
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@kas1e Reproducible with some examples: testoverlay2, teststreaming. Not producible with: testdrawchessboard. Can you create a ticket?
Re: SDL2
Posted on:
2020/6/1 20:30
#892
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
Re: SDL2
Posted on:
2020/6/15 18:39
#893
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
Re: SDL2
Posted on:
2020/6/15 21:35
#894
Just can't stay away
Joined: 2007/2/6 13:57Last Login
: 11/16 10:39
From Donostia (SPAIN)
Group:
Registered Users
@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
Re: SDL2
Posted on:
2020/6/16 7:05
#895
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@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
Re: SDL2
Posted on:
2020/6/16 20:22
#896
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 21:45
From a dying planet
Group:
Registered Users
@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.
Re: SDL2
Posted on:
2020/6/17 7:15
#897
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
Re: SDL2
Posted on:
2020/6/17 12:43
#898
Just can't stay away
Joined: 2007/2/6 13:57Last Login
: 11/16 10:39
From Donostia (SPAIN)
Group:
Registered Users
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 #
Re: SDL2
Posted on:
2020/6/17 13:05
#899
Just can't stay away
Joined: 2007/2/6 13:57Last Login
: 11/16 10:39
From Donostia (SPAIN)
Group:
Registered Users
@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?
Re: SDL2
Posted on:
2020/6/17 15:10
#900
Just can't stay away
Joined: 2007/7/14 21:30Last Login
: 11/3 18:55
From Lothric
Group:
Registered Users
@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.
Currently Active Users Viewing This Thread:
10
(
0 members
and 10 Anonymous Users
)