Skip to content

Commit

Permalink
Merge pull request #2 from proskd/fixopengl
Browse files Browse the repository at this point in the history
Fix 4DO rendering when using OpenGL
  • Loading branch information
JoeMatt authored Oct 11, 2024
2 parents 413d29c + da70988 commit 6fca260
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions FreeDOGameCore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ - (CGSize)bufferSize {
}

- (GLenum)pixelFormat {
return GL_BGRA;
return GL_RGBA;
}

- (GLenum)internalPixelFormat {
return GL_BGRA;
return GL_RGBA;
}

- (GLenum)pixelType {
Expand Down
5 changes: 3 additions & 2 deletions libfreedo/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ void Get_Frame_Bitmap(
gPart = linePtr->xCLUTG[((*srcPtr) >> 5) & 0x1F];
rPart = linePtr->xCLUTR[(*srcPtr) >> 10 & 0x1F];
}
*destPtr++ = bPart;

*destPtr++ = rPart;
*destPtr++ = gPart;
*destPtr++ = rPart;
*destPtr++ = bPart;

destPtr += pointlessAlphaByte;
srcPtr++;
Expand Down

0 comments on commit 6fca260

Please sign in to comment.