Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha blending on Odroid N2+ #389

Open
miwasp opened this issue Oct 25, 2021 · 8 comments
Open

Alpha blending on Odroid N2+ #389

miwasp opened this issue Oct 25, 2021 · 8 comments
Labels

Comments

@miwasp
Copy link

miwasp commented Oct 25, 2021

I compiled bstone for the Odroid N2+. This device has an Amlogic S922x CPU and a Mali G52 GPU.
When starting with renderer "auto-detect" it looks like this:

bstone_n2

Somehow all the walls are transparent. This must be something special with the GPU and how it handles alpha blending.
So i wanted to switch to renderer "software" but this doesn't work either. Error messages is:

[VIDSW] Creating window.
[VIDSW]
[VIDSW] Initializing renderer.
[VIDSW] Available renderer drivers:
[VIDSW] 1. opengles2
[VIDSW] 2. opengles
[VIDSW] 3. software
[VIDSW] Using VSync.
[VIDSW] Creating renderer.
[ERROR] [VID] [SDL] Renderer already associated with window
[CRITICAL] [SDL] Renderer already associated with window

Any advice on how to get bstone running on this device?

@bibendovsky
Copy link
Owner

I don't think it is blending issue. Wall or door does not have transparancy attribute.

Got same picture with regular OpenGL after disabling depth test here (changed true to false).

You can try to comment or remove this line to check if it is a problem with cached value. Otherwise I don't know how to help.

As for software rendrering try to build the latest commit of develop branch. Messages from your log indicates you are probably using master branch or commit before high-level renderers were revised.

@miwasp
Copy link
Author

miwasp commented Oct 25, 2021

Got same picture with regular OpenGL after disabling depth test here (changed true to false).

Looks the same with trueor false on this hardware.

You can try to comment or remove this line to check if it is a problem with cached value. Otherwise I don't know how to help.

Sadly makes no difference, still looks the same.

As for software rendrering try to build the latest commit of develop branch. Messages from your log indicates you are probably using master branch or commit before high-level renderers were revised.

Built the latest commit of branch develop, messages look a little bit different, but result is the same:

[VIDSW] Available renderer drivers:
[VIDSW] 1. opengles2
[VIDSW] 2. opengles
[VIDSW] 3. software
[ERROR] [VID] [SW_VIDEO] SwVideo
[CRITICAL] [VIDEO] VL_Startup
[SW_VIDEO] SwVideo
[SW_VIDEO] initialize_video
[SW_VIDEO] initialize_renderer
[SDL] Renderer already associated with window

@bibendovsky
Copy link
Owner

Built the latest commit of branch develop, messages look a little bit different, but result is the same:

Probably it's because of SDL_GetWindowSurface. There is a note in remarks: "You may not combine this with 3D or the rendering API on this window". Try to remove/comment this line.

@miwasp
Copy link
Author

miwasp commented Oct 25, 2021

Strike. After commenting the line, the software renderer works.
Will this find its way into your repo or is this something special on this hardware?

Thank you very much!

@bibendovsky
Copy link
Owner

Will this find its way into your repo or is this something special on this hardware?

I'll add the fix.

@bibendovsky
Copy link
Owner

SDL error fixed (#390).

@bibendovsky
Copy link
Owner

@miwasp Could you check if the one of the following changes fixes the problem with OpenGL ES renderer?

  • Uncomment this. Make sure you are building the debug build.

  • Replace 0 with 16 here.

@miwasp
Copy link
Author

miwasp commented Oct 31, 2021

Sure.
First tried uncommenting the define and built with CMAKE_BUILD_TYPE "Debug".

Second tried to replace 0 with 16, this time built as "Release".

In both cases the result was the same (transparent walls).

I have not tried both changes at once. If this makes sense, i could do that too.

@bibendovsky bibendovsky removed this from the v1.2.12 milestone Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants