Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
93 user(s) are online (86 user(s) are browsing Forums)

Members: 0
Guests: 93

more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 32 33 34 (35) 36 37 38 ... 74 »
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Raziel

Quote:
residualvm does


Yes, it seems. But ScummVM should be easy to get running with shaders, well the loader at least. I don't have games installed at the moment, really.

Quote:


Because with "compositing" renderer in place fps in some games (where fps display is supported) went up by 0.5-1 fps, which is not worth it.
That may be because those engines/scummvm dosn't make use of certain drawing routines (and as thus nothing is optimized) or the fact that composite is not as fast in comparision as i thought it might be.



Hmm, ScummVM doesn't have a generic FPS display does it? I think you should be able to see the difference if you allow ScummVM to scale the display up. Scaling effect is virtually "free" with compositing when compared to pure SW rendering.


@Daytona675x

Quote:

texture2D is deprecated since GLSL 1.30 and its replacement is the overloaded GLSL function texture()


Thanks for the info, I have been reading an older OpenGL ES 2.0 book and didn't know that.

@Raziel

Try the first line: https://github.com/scummvm/scummvm/blo ... ics/opengl/shader.cpp#L57

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


See User information
@Capehill

Quote:

But ScummVM should be easy to get running with shaders, well the loader at least. I don't have games installed at the moment, really.

If you ever have some spare time and are willing to do some tests, build ScummVM with the wintermute engine.
Get the freely available game Bickadoodle and set the fps counter to true (all of the wintermute games feature an fps display)

This game will not only showcase the extreme slowdowns in some scenes (due to missing dirty rect and thus updating the whole screen all the time) and the fact that the drawing speed is pretty much the same in OpenGL, ogles2 and composite, but also a rather enerving issue with fullscreen display, as it seems that ScummVM scales to a non-complete resolution to what it gets from the game (say, the gamedisplay, especially the fonts/texts and the fps counter are readable in fullscreen, window has the perfect resolution, though, all is crisp).

We might be able to tackle two things at once?
Or at least i could create a new SDL bug item

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


See User information
@Capehill

I don't understand that whole #version tag thing.
Shaders are not .c, .cpp if i'm not mistaken?

Could i probably add an ifdef __amigaos4__ to add that tag (to not interfere with other plattforms)?
As i said, i don't like local workarounds, i'd rather have them in the original code, so that they don't bite me later on.

What does that tag do?
Tell the program to compile the shader with a version below 1.30 (i.e.) on runtime?
And if so, what would happen if there are functions inside the shader that are 1.31 and above? Would it still work or refuse to or even crash or send all the butterflies to jupiter?

Sorry, but i'm a noob when it comes to coding but with shaders i know exactly as much as i know about brain surgery...

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


See User information
@Raziel

This seems to work:

Quote:

diff --git a/backends/graphics/opengl/shader.cpp b/backends/graphics/opengl/shader.cpp
index 0b4c677..7e19fc8 100644
--- a/backends/graphics/opengl/shader.cpp
+++ b/backends/graphics/opengl/shader.cpp
@@ -80,6 +80,7 @@ const char *const g_lookUpFragmentShader =

// Taken from: https://en.wikibooks.org/wiki/OpenGL_P ... 3#OpenGL_ES_2_portability
const char *const g_precisionDefines =
+ "#version 110\n"
"#ifdef GL_ES\n"
"\t#if defined(GL_FRAGMENT_PRECISION_HIGH) && GL_FRAGMENT_PRECISION_HIGH == 1\n"
"\t\tprecision highp float;\n"


#version directive sets the shader version. My OpenGL ES 2.0 programmin guide tells to use "100" (1.00). 110 seems to work. Daniel suggested to use value < 130.

If there are some newer stuff in shader code, then you should get a compilation error.

You can use #ifdef __amigaos4__ to wrap the string if you want.

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


See User information
@Capehill

Awesome, thanks

Go to top
Re: SDL2
Not too shy to talk
Not too shy to talk


See User information
@Raziel
Quote:
I don't understand that whole #version tag thing.
Shaders are not .c, .cpp if i'm not mistaken?

No, although GLSL is very C like. But it has certain C-preprocessor styled directives like #version.

@Capehill
Great!

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


See User information
@Daytona675x

There is so much to learn... :-/

I'm just glad i have a nice community to ask

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


See User information
@Capehill
About resizing issue, did "quad_mystery.lha" on Daniel's ftp are yours ? I just can reproduce that overflow of window borders just with that example, which seems do not use anything else but only ogles2 , so it can be very well bug in the os. See what i mean:

https://youtu.be/_XGoUpFVi54

Its can be very well different issue, but at least something of the same sort

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

Regarding the image/png error when building scummvm/residualvm with SDL1/2.

Answer from one of the maintainers:
Quote:

Whoever is in charge of this part of the AmigaOS SDK needs to be notified it's not a good idea to name their things Image and such as it's bound to conflict with application code...


And bug thread here

Just for your information, since this is a SDK issue i'll open an issue report there too.

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


See User information
@Raziel

There's no point in opening a bug report for the SDK. That struct Image predates SDL by many years, and there's plenty of code that would break if it were changed.

IIRC, for C++ there is an option to enclose system headers in a C++ namespace. Can't remember how, though, so hopefully someone else can help out.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: SDL2
Not too shy to talk
Not too shy to talk


See User information
@Raziel
@Hans
Quote:
for C++ there is an option to enclose system headers in a C++ namespace

For C++: If you define __USE_AMIGAOS_NAMESPACE__ then everything Amiga-SDK-related will be put into the AmigaOS namespace, so e.g. Image becomes AmigaOS::Image.
Note however that the SDK's idltool had a bug until end of 2016 which caused it to create slightly wrong header-files which didn't fully respect this define. One ogles2.lib header suffered from this too, it had been noticed and fixed just recently in v2.1.
Some other lib's headers may of course still suffer from this issue and you'll probably have to manually correct them.

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


See User information
@kas1e

Yes, I sent quad_mystery.lha to Daniel. Did you do any modification for the source? I can't reproduce the border overdraw issue.

Ps. did you try particles.lha?

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


See User information
@Capehill
Quote:

Yes, I sent quad_mystery.lha to Daniel. Did you do any modification for the source? I can't reproduce the border overdraw issue.


No, i just use binaries coming in archive. But i not on default amigaos4 theme, but on one which come with aos4 : silvergreen. Maybe that can have some impact on..

Quote:

Ps. did you try particles.lha?


Seems working , through slow when resize window to big :) But with that one i can't reproduce overflow of borders

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 can reproduce the window border overdraw issue now, if I just click the minimize gadget. I think it's caused because window box can change before intuition event is handled, something like this:

1) minimize window
2) blit (oops)
3) handle IDCMP_NEWSIZE, read w & h

It's possible to workaround this in test app by refreshing the w & h values before blitting.

It seems to also happen when OGLES2 is let to manage bitmap so maybe it should be checked whether OGLES2 can blit the backbuffer to window with older w & h values?

Ok so this is again a wrong thread, but Daniel, do you copy? -)

Go to top
Re: SDL2
Not too shy to talk
Not too shy to talk


See User information
@Capehill
Quote:
Ok so this is again a wrong thread, but Daniel, do you copy?

Yes... I will look into it!

But yeah, this (off)thread-mess is pretty annoying. The MiniGL-thread already turned into a ResidualVM-bug-thread, the others are a wild mix too.
Sure, the stuff sometimes overlaps but to be honest, looking at e.g. the sheer amount of mixed stuff in e.g. the GL4ES thread I certainly overread a huge amount of maybe interesting info.

Maybe we need a "mixed 3d issues" thread where people who are unsure where it belongs can put there stuff first, dunno.

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


See User information
In my experience once an off topic discussion starts, it's impossible to stop it unless a mod splits the thread :D

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
@Daytona675x

Quote:

The MiniGL-thread already turned into a ResidualVM-bug-thread

Sorry

Go to top
Re: SDL2
Not too shy to talk
Not too shy to talk


See User information
@Raziel
Not your fault, you/we didn't know that before

@BSzili
Yes

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


See User information
@Capehill
Is there anything worth of looking in SDL2, which can cause that to fail:

int dblbuf 0;
    if ((
SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &dblbuf) == -1) || (!dblbuf)) {
        
fprintf(stderr"Failed to get a double-buffered context.\n");
        
SDL_Quit();
        return 
false;
    }


? I just have for SDL2/minigl build of Lugaru game "failed to get a double-buffered context".

I just checking the old Lugaru sources from os4depot (minigl build), and MickJt there also commenting out this part to make it works.

At time when he port it it was SDL1, but now i build SDL2 version, and it have the same issue with SDL2 too (or with minigl, dunno).

gl4es build works with the same code fine, through, so it maybe minigl and not sdls..


Edited by kas1e on 2019/3/30 13:19:50
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

1) Does Lugaru call SDL_GL_SetAttribute?
2) what is the error, SDL_GL_GetAttribute returning negative or dblfbuf being zero?

It seems to me that double buffer value is set to 1 during initialization.

Go to top

  Register To Post
« 1 ... 32 33 34 (35) 36 37 38 ... 74 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project