Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
138 user(s) are online (120 user(s) are browsing Forums)

Members: 1
Guests: 137

devils_advisor, more...

Support us!

Recent OS4 Files
OS4Depot.net

Report message:*
 

Re: SDL2

Subject: Re: SDL2
by kas1e on 2019/2/7 19:07:08

@Capehill
Quote:

We could start there.


I just add to the OS4_GLES_SwapWindow(), after "if (videodata->vsyncEnabled) {" , and before aglSwapBuffers(), that:

if (videodata->vsyncEnabled) {
                
IGraphics->WaitTOF();
            }

            
struct TagItem setparams[] =
            {
                {
OGLES2_CCT_WINDOW, (ULONG)data->syswin},
                {
TAG_DONE0}
            };

            
aglSetParams2(setparams);

            
aglSwapBuffers();



I.e. just call of aglSetParams2 with data->syswin, and it seems did the trick.

At least, with the game i test it fix issue with switching, as well as fix the issue with switching in testgles2.c example too.

Not sure through if it right place to call it there, or if it should be called always like this (maybe some "if non-valid window-check" is need it for or something), but seems it fix issue anyway.

Btw, also found that test/testgles2.c , should be changed for amigaos4 : at the begining to have HAVE_OPENGLES2 define work, need to add || defined(__amigaos4__) to that big line of defines at top.

Should i create ticket for those issues (or one for both) ?

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project