Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
107 user(s) are online (50 user(s) are browsing Forums)

Members: 1
Guests: 106

beworld, more...

Headlines

 
  Register To Post  

« 1 ... 15 16 17 (18) 19 20 21 ... 72 »
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Probably you right,i should check it myself too, but should it crash if i still don't ?

As for point 2, i am using os4depot version of SDL, will try now r213.

EDIT: sdl2 at moment should be configured/make only, no makefile.amigaos4 ? (at least can't find at moment). I start to rebuild it with configure;make, but as i have not very recent SDK, i ends up with some undefs in graphics.library includes, so updated to the latest one and was able to build it , time to test


Edited by kas1e on 2018/1/23 19:25:23
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 receive a NULL pointer and keep messing with it, things might not work nicely. Anyway, I'm interested to see the results with error checking.

There is no native makefile yet. Configure + make works more or less. There is also a semi-working Cmake but it's not finished (works for me you know).

You can get r213 here http://capehill.kapsi.fi/sdl2/

New public release got delayed due to ScummVM related issues.

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


See User information
@Capehill
I tried to build one myself now, it builds , but crashes exactly the same :(

Then i tried your version , build with it, crashes the same..

Wtf.. I.e. you compile test/helloworld.c, and your main at end looks like this:

int main(void)
{
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) == 0) {

testOpenGLES2();

SDL_Quit();
}

return 0;
}

And it works ?

For me crashes with os4depot version of sdl2, with my build of r213, and with your build which you upload..

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
Are you sure you delete all other tests from main, and test exactly testOpenGLES2(); ? For me it all the time crashes in the glMatrixMode(), and , that functinon in the minigl includes..

But, when i test pure testOpenGL(); it works, but testOpenGLES2(); 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

You are correct, it's my bug. There is no glMatrixMode in OGLES2 of course! For me it fails differently (context creation fails) because I cannot run OGLES2 on my machine.

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


See User information
@Capehill
Yeah, it open your library, but as it didn't works on your HW it quit early. But if it will works, once it done init stuff in , etc, it will crashes for you same as for me..

I found the cullpit, well, sort of. Check the helloworld testOpenGL() and testOpenGLES2() fucntions, they both open the same window, and then call openGL(w); , which do opengl based stuff.

Differences is that in testOpenGLES2(), we firstly do:

Quote:

SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);


Well, fun part now starts: If i comment out first line: it works. If i comment only second line , it works too ! If i comment second, and third line, but keep first one, it works too !

I.e. not exactly call which crashes, but probably many of them in a row, dunno ..

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
I feel it is somehow related to the SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); line, as if i repeat that one many times i can reproduce crash. Maybe 0 taken as some null pointer or whatever somewhere where should't ?

Strange of course that stack-trace point on glMatrixMode(), but it is first function in the routine opengl() function, so it will crashes there on any other ones, just before something trashed somewhere.

And crash btw 80000003 one, and r0 and r6 registrs are 00000000, and crashed instruction are "lwz r0,276(r9)".


Edited by kas1e on 2018/1/23 20:35:46
Edited by kas1e on 2018/1/23 20:37:36
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

Test code should be now fixed in r214. Of course I'm not able to test it 100%.

Go to top
Re: SDL2
Just popping in
Just popping in


See User information
Why not make a .library like they did on Morphos. I guess that the Morphos version could be used as the basis?

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


See User information
@capehill
Thanks, but you just rewrite test code , not SDL2 code :) Idea is to port sdl2 stuff, but if we cant pass simple test case, how we can port later something without massive rewrite like full blow engines and games :)?

Almost all gles2 stuff around will use gl functions, even primitive ones. Are you sure its not just nullpointer problem in gles2 sdl2 wrapper not related to context creating ?

But, i anyway tested rewroten testcase, and it just exit after window created with words "ogles2 context createt", without drawing anything (because no GL functions called anymore from it). But of course we can create ogles2 context, that no the point for us .. idea is to have original helloworld.c working , where we can use ogl, ogles2, swith between them, etc.

And even if i just trying to use testOpenGL(); it also says "ogles2 context created" and exit.

Imho, we need back original helloworld.c , and fix it all in SDL. I mean we open minigl.library from opengl, we open ogles2.library from ogles2. And we should be able to call eath others, mix them, swith between them, that the point of that test case :)



Edited by kas1e on 2018/1/24 7:15:16
Edited by kas1e on 2018/1/24 7:18:49
Edited by kas1e on 2018/1/24 7:21:14
Edited by kas1e on 2018/1/24 11:56:03
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

I fixed a buggy test case. "helloworld" is not "official" SDL2 testware, it was written by me.

If you want to see OGLES2 in action, try testgles2 rather. To draw things in OGLES2 you have to create shaders.

EDIT: extending my response.

1) Keep eye on the serial log. It will show useful stuff regarding OpenGL context opening and other things.

2) The proper way of using OpenGL is to load each function. Then it's possible to know does the particular glFunction() actually exist. I made lazy code that just assumed things like glMatrixMode exist. It does, for MiniGL. It does not, for OpenGL ES 2. Take a look at any proper project like ScummVM or ioquake3. Yes they do load and check their GL functions before using them.


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


See User information
@Capehill
Quote:

I fixed a buggy test case. "helloworld" is not "official" SDL2 testware, it was written by me.

Ah, i was fear its official one :) But in r214 it didn't works anyway, it just open ogles2 context and exit, even if we call testOpenGL() fucntion.

Quote:

If you want to see OGLES2 in action, try testgles2 rather. To draw things in OGLES2 you have to create shaders.


That one works ! Through needs little changes (added || defined(__amigaos4__), so to have #define HAVE_OPENGLES2 working, and then, it), but it works :)

Quote:

Take a look at any proper project like ScummVM or ioquake3. Yes they do load and check their GL functions before using them.


In other words in all normal projects all will works as should, good !

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
Found another error, calling just : SDL_Init(SDL_INIT_EVERYTHING) caused:
"sdl not built with haptic (force feedback) support"

But probably we don't need that HAPTIC stuff ?


Edited by kas1e on 2018/1/24 14:36:31
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

As SDL2 is documented to initialize haptic subsystem when SDL_INIT_EVERYTHING is passed, behaviour is probably correct. If someday there is force feedback support in AmigaOS, it can succeed. We could #ifdef HAPTIC out but it would be another hack. Maybe it should be rather documented that SDL_INIT_EVERYTHING fails due to this.

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


See User information
@kas1e

"But in r214 it didn't works anyway, it just open ogles2 context and exit, even if we call testOpenGL() fucntion."

Yeah, it was written to do that: open the library and create context.

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


See User information
@Capehill
But it do so also for calling testopenGL(), while shouldnt ? I mean if i call testopenGLES() and if i call testopenGL() its the same create gles context.

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

Can you show some console + serial log or your test diff because I'm not completely sure what is happening there? Probably just a test code issue but anyway..

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


See User information
@Capehill
I just downloaded your today's fixed helloworld example (r215), and it works better now, through, crashes if i call 3 fucntions like this:

main()
{
bblablablba

testOpenGL();
testOpenGLES2();
testOpenGLSwitching();
}

First one ok, i press "q", then second one ok, "gles2 context created and exit", and then create empty window, and all hangs, greamreaper not appears, but crash visibly on serial log, there is: helloworld_crash.txt

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, now it's clear. The OGLES2 version flags stay and affect the following test. Should be easy to fix.

Go to top
Re: SDL2
Just popping in
Just popping in


See User information
@thread
Thanks for pushing in improving SDL2!

By chance, has anyone tried porting the SDL2 based game called "Pingus"? It is a Lemmings clone that seems quite nice.

Please, have a look at
https://github.com/Pingus/pingus

Go to top

  Register To Post
« 1 ... 15 16 17 (18) 19 20 21 ... 72 »

 




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




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project