Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
54 user(s) are online (42 user(s) are browsing Forums)

Members: 0
Guests: 54

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



« 1 ... 34 35 36 (37) 38 39 »


Re: SDL2
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5386
@Capehill
About iconification snapshooting issue, i just change OS4_GetDiskObject() in the SDL_os4window.c as Trixie suggest and it works indeed. Just in case i set it to fallback one as well (to avoid problems when default on snapshoted somehow different too). There is:

static struct DiskObject*
OS4_GetDiskObject(_THIS)
{
    
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    
struct DiskObject *diskObject NULL;

    if (
videodata->appName) {
        
BPTR oldDir IDOS->SetCurrentDir(IDOS->GetProgramDir());
        
diskObject IIcon->GetDiskObject(videodata->appName);
        
diskObject->do_CurrentX NO_ICON_POSITION;
        
diskObject->do_CurrentY NO_ICON_POSITION;
        
IDOS->SetCurrentDir(oldDir);
    }

    if (!
diskObject) {
        
CONST_STRPTR fallbackIconName "ENVARC:Sys/def_window";
        
dprintf("Falling back to '%s'n"fallbackIconName);
        
diskObject IIcon->GetDiskObjectNew(fallbackIconName);
        
diskObject->do_CurrentX NO_ICON_POSITION;
        
diskObject->do_CurrentY NO_ICON_POSITION;

    }

    return 
diskObject;
}


I added that info to the ticket as well

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: SDL2
Just can't stay away
Joined:
2009/5/1 17:57
From Czech Republic
Posts: 1049
@kas1e

Yes but this piece of code doesn't look very safe:

diskObject IIcon->GetDiskObject(videodata->appName);
diskObject->do_CurrentX NO_ICON_POSITION;
diskObject->do_CurrentY NO_ICON_POSITION;

GetDiskObject() can easily fail with a NULL return value, so the two assignments will poke into invalid memory! You should change it to

diskObject IIcon->GetDiskObject(videodata->appName);         
if (
diskObject)
 {
  
diskObject->do_CurrentX NO_ICON_POSITION;         
  
diskObject->do_CurrentY NO_ICON_POSITION;
 }





_________________
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
   Report Go to top

Re: SDL2
Not too shy to talk
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 411
@kas1e

Maybe you can try 'GetIconTags()' as it loads a default icon if none found.
...
//diskObject = IIcon->GetDiskObject(videodata->appName);
diskObject = IIcon->GetIconTags(videodata->appName, ICONGETA_FailIfUnavailable,FALSE, TAG_END);
...

   Report Go to top

Re: SDL2
Just can't stay away
Joined:
2009/5/1 17:57
From Czech Republic
Posts: 1049
@jabirulo

Quote:
Maybe you can try 'GetIconTags()' as it loads a default icon if none found.

So does GetDiskObjectNew(), by the way. The code kas1e has posted can surely be rewritten/improved in several ways, but I think the simplest edit is the safety check I've suggested above.


Edited by trixie on 2019/7/17 15:01:33
_________________
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
   Report Go to top

Re: SDL2
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 749
@trixie

Yeah, NULL checks are required. I would propose to patch it here (only one branch):

https://github.com/AmigaPorts/SDL/blob ... os4/SDL_os4window.c#L1042

   Report Go to top

Re: SDL2
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 749
@kas1e

About testdraw2, two things that might simplify the test case:

1) Reduce number of objects

https://github.com/AmigaPorts/SDL/blob/master/test/testdraw2.c#L25

2) Remove some primitive forms (try only lines, points or rectangles, for example)

https://github.com/AmigaPorts/SDL/blob/master/test/testdraw2.c#L195

   Report Go to top

Re: SDL2
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5386
@Capehill
Quote:

Reduce number of objects


Tried with 20 instead of 100 : same crash.

Quote:

Remove some primitive forms (try only lines, points or rectangles, for example)


Only points: crash
Only lines: crash
Only rects: crash

Its like just whole "batching" thing broken for ogles2.

Btw, what i also notice, is that when it only rects, then graphics library give 4330 fps, opengl one 1910fps, and ogles2 2100fps. So in case with just rects, ogles2 version is faster a little. But when it come to lines and dots, it slower a lot.

_________________
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: 749
@kas1e

testdraw2 still works for me, using ogles2.library 2.6. What is the md5sum of your ogles2.library?

   Report Go to top

Re: SDL2
Not too shy to talk
Joined:
2015/6/11 8:51
From Cologne
Posts: 265
@Capehill
There was another bug in ogles2 which indeed caused testdraw2 with env-var SDL_RENDER_BATCHING 1 to produce undefined behaviour. On my FTP there's a wip-version of ogles2 2.7 which among many other stuff also contains a fix for that one.

_________________
[Facebook] [YouTube Channel]
   Report Go to top

Re: SDL2
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5386
@Daniel
Yeah, can confirm that 2.7 fix the SDL_RENDER_BATCHING thing.

@Capehill
Now when SDL_RENDER_BATCHING enabled, we have 207fps for ogles2 rendering, which indeed about 7 times faster than without, but render via pure opengl (minigl) give us 411fps.

So with batching it much better indeed, but still slower than opengl one.

I also notice, that in "fix-opengles2-renderer" branch, you rewrite a bit fragment shader (to map ARGB colors), but should't we just report issue to Hans, so he will made it works the same as on all other platforms ?

_________________
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: 749
@kas1e

I removed angle/center stuff from the vertex shader (which are not used for point/line/rects) and also the glPointSize, and ran testdraw2 few times: for me, OGLES2 is faster that MiniGL in rects and lines. MiniGL is 2x faster in points.

Regarding fragment shader: SDL2 tells OpenGL all textures are internally GL_RGBA. Now, we have ARGB texture in memory and so I believe we need to reorder the color channels so that OpenGL gets what it was promised. This actually works (try testscale, for example). However target textures are partially broken: the smiley face (testrendercopyex) clearly suffers from wrong color channels. However, the background doesn't, so it seems strange to me. Their texture format is identical.

   Report Go to top

Re: SDL2
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5386
@Capehill
Tested your way of fixing NO_ICON_POSITION stuff, and yes, all fine as well, closed the ticket.

_________________
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: 749

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3454
@Capehill

Thank you for the release.

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3454
@Capehill

I don't know if the following issue is SDL2 or OGLES2, since it only appears when starting residualvm built with ogles2 (sdl1 and sdl2 are fine), but it has an SDL2 error message, so i guess it might be a cobination of both?

Quote:

WARNING: Unsupported bpp value: 24!
WARNING: SDL_SetVideoMode failed: Invalid texture!


On start i get this, after it tried to open a screen (monitor goes black and returns to WB...)

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: SDL2
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 749
@Raziel

I tried to build the latest ResidualVM but when starting I run into some error with boolean uniforms. How do you configure and build it?

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3454
@Capehill

I thought as much...please discard my inquiry.
Seems I have a mixed build with opengl which not really uses ogles2.

Must have broken my branch with one if the last merges.

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3454
@capehill

Sorry if this is the wrong thread, but i need to first find out who is acting wrong.

It could be SDL2 or OGLES2.

ScummVM built with OGLES2 and SDL2 running.

If i choose to play any game that is not yet fully supported, a black screen will come up with a window saying just that and the possibility to start or cancel.

The screen is, as i said, black or erased when using SDL1, SDL2 and MiniGL.
But it's not once OGLES2 is used.

Instead a malformed part of the earlier launcher screen is displayed.
Resized ImageResized Image
The right one is the correct one (SDL2 and OpenGL)

If you could just point me to the correct thread and i'll be gone

Thank you

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: SDL2
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 749
@Raziel

I think it's not SDL2. SDL2 doesn't draw anything when OGLES2 context is used (OGLES2 is given the window pointer). Which W3DNova driver version you are using?

It seems that you have reported this kind of texture/framebuffer (?) issue earlier here http://www.amigans.net/modules/xforum ... id=113834#forumpost113834 and then Kas1e responded that he may have the same issue with Letterfall game, and that is possibly fixed in Nova driver 1.60 or something, I didn't read the whole thread til the end.

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3454
@Capehill

Warp3DNova.library 1.65 (31.03.2019)
W3DN_SI.library 1.65 (31.03.2019)

Yes, i know about that other thread.
I dropped it because iogles2 wasn't as evolved as it is now and i thought that it might be because of something else interfering.

Need to resurrect my post thread there then.

Thanks a lot

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top


« 1 ... 34 35 36 (37) 38 39 »



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project