Code: Select all
CONST AS INTEGER OGL_MANUAL_SYNC = 1, _
OGL_AUTO_SYNC = 2
Code: Select all
CONST AS INTEGER OGL_MANUAL_SYNC = 1, _
OGL_AUTO_SYNC = 2
Independent from mode (BPP 8,15,16,24,32) fbgfx every scanline used 16 byte alignment not 4 byte.angros47 wrote:...if a line contains a number of bytes that is not a multiple of 4, the remainder will shift the next line...
...In 32 bit mode each pixel uses 4 bytes: so, it does not matter how many pixels are in a line, the number of bytes will always be a multiple of 4...
How do I find those comments? I am still kinda new to github and had no luck googling it.dkl wrote:I've written some review comments on the Github pull request for this, but they're only about some minor formatting issues and such that would be nice to have fixed before merging.
Committed your changes.angros47 wrote:While I was applying the suggested changes, I fixed the bug that occurs when the width is not a multiple of 4; looks like the screen buffer has no alignment, and OpenGL expected a multiple of 4. It can be fixed with glPixelStorei(GL_UNPACK_ALIGNMENT, 1), and I added it (I had to add it to the declarations as well)
Hi angros47,angros47 wrote:While I was applying the suggested changes, I fixed the bug that occurs when the width is not a multiple of 4; looks like the screen buffer has no alignment, and OpenGL expected a multiple of 4. It can be fixed with glPixelStorei(GL_UNPACK_ALIGNMENT, 1), and I added it (I had to add it to the declarations as well)