Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
57 user(s) are online (39 user(s) are browsing Forums)

Members: 0
Guests: 57

more...
Support us!
Recent OS4 Files
OS4Depot.net



« 1 ... 42 43 44 (45)


Re: SDL2
Home away from home
Joined:
2006/12/2 3:55
From Italy, Perugia
Posts: 3253
@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 :)

   Report Go to top

Re: SDL2
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 6046
@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!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: SDL2
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 936
@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
   Report Go to top

Re: SDL2
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 6046
@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!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: SDL2
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 936
@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.

   Report Go to top


« 1 ... 42 43 44 (45)



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project