Skip to content

Implement some additional (still very WIP) OpenGL 1.1 rendering#232

Merged
JaceCear merged 22 commits intomainfrom
gl_tests
Feb 17, 2026
Merged

Implement some additional (still very WIP) OpenGL 1.1 rendering#232
JaceCear merged 22 commits intomainfrom
gl_tests

Conversation

@JaceCear
Copy link
Collaborator

Notes:

  • basic background rendering, with priority in mind
  • sprites with uneven offsets are not placed at their correct positions, leading to collision errors
  • sprite layer is currently rendered ontop all background layers
  • sprites are not getting rotated or scaled

#define HEAP_END ewram_end
#endif

/* --- HOW THIS WORKS ---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

@JaceCear JaceCear requested a review from freshollie February 16, 2026 12:00

#if !PLATFORM_GBA && !PLATFORM_SDL
extern void Platform_DisplaySprite(Sprite *sprite, u8 oamPaletteNum);
extern void Platform_TransformSprite(Sprite *sprite, SpriteTransform *transform);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we wanna move these to platform.h or something?

src/core.c Outdated
u8 gBgSprites_Unknown1[] = {};
OamData gOamBuffer[] ALIGNED(16) = {};
u16 gVramHeapState[] = {};
u16 gVramHeapState[OBJ_VRAM_TOTAL_SIZE / VRAM_HEAP_SEGMENT_SIZE] = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be sized here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be, but doesn't hurt, either. :D
Though hmm... with it defined in headers, having size auto-allocated might actually be better...

b = ((gUnknown_080D6FF5[gSelectedCharacter][i][2] * frameCounter) / 16u);

gObjPalette[i] = RGB16_REV(r, g, b);
gObjPalette[0 * 16 + i] = RGB16_REV(r, g, b);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we wanna make 16 a const?

Copy link
Collaborator

@freshollie freshollie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor points

@JaceCear JaceCear merged commit 2d42c0e into main Feb 17, 2026
20 checks passed
@JaceCear JaceCear deleted the gl_tests branch February 18, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments