Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

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

Members: 1
Guests: 100

Paul, more...

Headlines

 
  Register To Post  

« 1 ... 30 31 32 (33) 34 35 36 ... 72 »
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
I create all recent issues on bugtracker so it will be not forgotten and there will be no needs to go through forum posts to find then all:

about iconify:
https://github.com/AmigaPorts/SDL/issues/53
https://github.com/AmigaPorts/SDL/issues/54

about ogles2:
https://github.com/AmigaPorts/SDL/issues/55
https://github.com/AmigaPorts/SDL/issues/56

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Quite a regular
Quite a regular


See User information
I tried to compile SDL2 itself, never mind why. I got:

/ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.cIn function 'OS4_FindApplicationName':
/
ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.c:146:21error'MAX_DOS_PATH' undeclared (first use in this function); did you mean 'MAXFLOAT'?
     
char pathBuffer[MAX_DOS_PATH];
                     ^~~~~~~~~~~~
                     
MAXFLOAT
/ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.c:146:21noteeach undeclared identifier is reported only once for each function it appears in
/ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.c:147:21error'MAX_DOS_FILENAME' undeclared (first use in this function); did you mean 'EAD_IS_FILE'?
     
char nameBuffer[MAX_DOS_FILENAME];
                     ^~~~~~~~~~~~~~~~
                     
EAD_IS_FILE
/ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.c:149:15error'struct DOSIFace' has no member named 'GetCliProgramName'did you mean 'GetProgramName'?
     if (
IDOS->GetCliProgramName(pathBufferMAX_DOS_PATH 1)) {
               ^~~~~~~~~~~~~~~~~
               
GetProgramName
/ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.c:147:10warningunused variable 'nameBuffer' [-Wunused-variable]
     
char nameBuffer[MAX_DOS_FILENAME];
          ^~~~~~~~~~
/
ahihi/sdl2-amigaos4-master/src/video/amigaos4/SDL_os4video.c:146:10warningunused variable 'pathBuffer' [-Wunused-variable]
     
char pathBuffer[MAX_DOS_PATH];
          ^~~~~~~~~~
gmake: *** [build/SDL_os4video.loError 1

Go to top
Re: SDL2
Quite a regular
Quite a regular


See User information
Seems like an out of date SDK? You need 53.30.

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


See User information
@Thematic

You should fetch the latest. Issue with MAX_ variables was fixed around 2 months ago.

Go to top
Re: SDL2
Quite a regular
Quite a regular


See User information
So 53.30 is three years old, and while I now think there's a later one, I do not know where to get it from.

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


See User information
SDK 53.30 is the last one

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Thematic
As Capehill say you should fetch latest SDL2 from github, where those issues was fixed few months ago:

https://github.com/AmigaPorts/SDL

It seems you have too old one from elsewhere

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehil
Retested now all your latest commits : yeah, all works fine. Both iconification bugs gone, ogles2 are added as it was (but being reworked for more clean way), so all fine, thanks.

@Bszili
Btw, i see you made a pull request with new makefile, and notice there that you have "CFLAGS = -Wall -fPIC -I./include -maltivec". So question is: is it ok to have -fPIC also for static builds, and, if it ok to have -maltivec for both builds for those platforms which didn't have altivec ? Also config file have "#define SDL_ALTIVEC_BLITTERS 1" too , is it ok to have it enabled for non-altivec cpus ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Quite a regular
Quite a regular


See User information
I already took out the AltiVec, it was an oversight from copying things over from the libtools generated Makefile / config header. PIC is harmless for static libraries, and this way same object files can be linked into a shared object without recompiling the whole thing.

This is just like television, only you can see much further.
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Noticed another issue , this time with SDL_SetWindowFullScreen().

Issue is: we have let's say workbench in 1920x1080. Now we run programm, which runs in fullscreen, in that 1920x1080. Then we press alt+enter to switch to the window mode , which will be those 1920x1080, and it is, but without calculating of window's borders size , and because of that, at the bottom and at the right, we have some mess until we not resize the window to fits into the screen together with borders.

See what i mean on screenshot (check bottom and right parts at the borders place):
http://kas1e.mikendezign.com/aos4/gl4 ... ardplusplus/foo_mess1.jpg


And once i just tick on the place where resize gadget of window should placed, its appear to be visibly, like this (see bottom/right resize gadget):
http://kas1e.mikendezign.com/aos4/gl4 ... ardplusplus/foo_mess2.jpg

But all refreshes fine only when i resize window a bit.

Probabaly solution are to check inside of SDL__SetWindowFullScreen() (or so), if we switch to window mode, and if yes, then check if the window equal or more than current workbench resolution, and if so, then create a window of full-screen size minus size of the bottom and rigth borders of created window (and so actuall app data will blits to normal window which fits into workench size fine).


PS. Seems that bug happens also when just switch between different window modes too. For example when i swtitch between 1280x720 and 1024x768


Edited by kas1e on 2019/2/21 14:56:57
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

Issue with fs/window toggling sounds a little bit strange because window mode uses WA_InnerWidth and WA_InnerHeight so it should match, right? Well, have to investigate some day.

I seem to remember there used to be some issues with window resize where the final window size (on LMB release) wasn't taken into use but I haven't checked this recently. Intuition programming is so fun...ky.

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


See User information
@kas1e

Because WA_AutoAdjust is TRUE by default, window is forced inside the WB boundaries. By adding "WA_AutoAdjust, FALSE" in window creation routine, window can keep its original inner dimensions (but it goes partially outside, of course).

But, using a simple test case I couldn't reproduce window corruption issue. When OpenGL buffer is blitted onto window, window inner dimensions are queried.

Another thing: if you have started the program in fullscreen mode, how come window has the resize gadget on the bottom right corner? How exactly the window was created?

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


See User information
@Capehill
Tested your gles2-window branch, and sadly to say it didn't work. I.e. when i run testcase (testgles2) in window mode (as default) then i can easyly switch via alt+enter many times. But if i just run it as "testgles2 --fullscreen", then it now immediately crashes inside of OS4_GLES_UpdateWindowPointer().

Rechecked few times to be sure

The last thing i see on serial before crash happens are "Updating GLES2 window pointer 0x666132a8"

But as i say when i run it in window mode by default , all works fine, i can do alt+enter for swith to/from window/fullscreen many times, and that "updting gles2 window pointer" works for sure, just when i run it by default in fullscreen mode it crashes.

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

Thanks for testing. So crash happens before anything is even drawn? Could you send a serial log?

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


See User information
@Capehill
Yes, nothing drawns, just switch to fullscreen, and when first frame should be drawn : crash.

There is serial output + crashlog:
http://kas1e.mikendezign.com/aos4/sdl ... 2_window_branch_crash.txt

As i see from crashlog, it crashes on the "lwz r10,276(r3)" , while r3 there 0x00000000.

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

Thanks. Ok, it is probably that there is no yet OGLES2 context (data->glContext).

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


See User information
@Capehill
Strange, as we have in updatewindowpointer() that:

if (IOGLES2) {...}

so it should't be there if no IOGLES2 ?

edit: we probabaly can extend "if (window->flags & SDL_WINDOW_OPENGL)" , to something like "if (IOGLES2 !=NULL & window->flags & SDL_WINDOW_OPENGL)" so aglSetParam will only calls when IOGLES2 is initialized, etc ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Yeah, checked latest commit, all works now, thanks :) At least i tested for about 5 minutes that testgles2 running it in all conditions and switching it like a madman all the time to/from window/fullscreen : all works now.

As for issue of overbound windowses, will check now as well

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

Lib and interface was OK based on the logs but I missed the context pointer check. SDL_GL_CreateContext requires a window parameter: window must be created first, then context.

Now our code tried to do modify non-existing context with SetParam.

I don't know whether there should be a sanity check inside OGLES2 but this was "an invalid user" type error more likely.

PS. good to hear it works!

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


See User information
@Capehill
Quote:

Another thing: if you have started the program in fullscreen mode, how come window has the resize gadget on the bottom right corner? How exactly the window was created?


You mean that middle gadget ? Dunno why it there. It just when i run in fullscreen and alt+enter, its already here. Or , if i run in window mode it also already there. And yeah, resizing of window, and then pressing on that gadget also produce overflow of borders.

The code for window create are:

if( SDL_InitSDL_INIT_VIDEO SDL_INIT_TIMER SDL_INIT_AUDIO) < ) {
    
fprintfstderr"Video or Audio initialization failed: %s\n",

    
SDL_GetError( ) );
    
sys_exit(1);
  }

  
sdl_on 

  
SDL_GL_SetAttributeSDL_GL_RED_SIZE);
  
SDL_GL_SetAttributeSDL_GL_GREEN_SIZE);
  
SDL_GL_SetAttributeSDL_GL_BLUE_SIZE);
  
SDL_GL_SetAttributeSDL_GL_DEPTH_SIZE16 );
  
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER1);

  if(
fullscreen == 1) { 
        
glWindow SDL_CreateWindow("Foobillard++"SDL_WINDOWPOS_UNDEFINEDSDL_WINDOWPOS_UNDEFINEDwidthheightSDL_WINDOW_OPENGL SDL_WINDOW_FULLSCREEN);
        
SDL_SetWindowSize(glWindowwidthheight); 
        
SDL_SetWindowFullscreen(glWindowSDL_WINDOW_FULLSCREEN); 

  } else if (
fullscreen == 0) { 
        
glWindow SDL_CreateWindow("Foobillard++"SDL_WINDOWPOS_CENTEREDSDL_WINDOWPOS_CENTEREDwidthheightSDL_WINDOW_OPENGL SDL_WINDOW_RESIZABLE);
  };
  
  
glContext SDL_GL_CreateContext(glWindow);
  
SDL_GL_MakeCurrent(glWindowglContext); 
  
  
SDL_SetWindowTitle(glWindow"Foobillard++");

  
glPolygonMode(GL_FRONT,GL_FILL);  // fill the front of the polygons
  
glPolygonMode(GL_BACK,GL_LINE);   // only lines for back (better seeing on zooming)
  
glCullFace(GL_BACK);              // Standards for rendering only front of textures
  
glEnable(GL_CULL_FACE);





Or you mean that resize gadget at bottom ? That it just not fullscreen, its i switch to window (which is size of my workbnehc screen), and then just tick via mouse on the place where resize gadget should be, and it just draws once i tick it.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
« 1 ... 30 31 32 (33) 34 35 36 ... 72 »

 




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




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project