Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (20 user(s) are browsing Forums)

Members: 2
Guests: 42

LiveForIt, devils_advisor, more...

Support us!

Recent OS4 Files
OS4Depot.net

Report message:*
 

Re: SDL1 open issues

Subject: Re: SDL1 open issues
by Capehill on 2019/8/25 10:28:22

@kas1e

Quote:


In that CIrrDeviceSDL::present , that at begining they do that:



I don't understand why, because if I'm reading the correct code, Irrlicht SW renderer is hard-coded to 16-bit: https://github.com/okuoku/irrlicht-gen ... t/CSoftwareDriver.cpp#L33

It would be interesting to know would Irrlicht work nicely if this hard-coded format was changed to 32-bit. Maybe it's slower to render 32-bit but it should look nicer too.

Second option is to modify texture format to 16-bit (same as Irrlicht's). But not even SDL software renderer support this exact format with 1-bit alpha so it means (as far as I know) that SDL will do colour conversion step during texture update.

Third option is to manually convert colour format but I don't like this one.

Quote:

Need somehow to tell to SDL_UpdateTexture()+SDL_RenderCopy() what format we use.


No. We have already told SDL which colour format we want to use when we created the texture. It is application's responsibility to provide valid data.

https://wiki.libsdl.org/SDL_UpdateTexture "pixels - the raw pixel data in the format of the texture"

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project