Camera
This commit is contained in:
@@ -103,10 +103,7 @@ int32_t frameBufferGetHeight(const framebuffer_t *framebuffer) {
|
||||
|
||||
void frameBufferBind(const framebuffer_t *framebuffer) {
|
||||
if(framebuffer == NULL) {
|
||||
#if DISPLAY_SDL2
|
||||
frameBufferBind(&FRAMEBUFFER_BACKBUFFER);
|
||||
#endif
|
||||
|
||||
frameBufferBind(&FRAMEBUFFER_BACKBUFFER);
|
||||
FRAMEBUFFER_BOUND = &FRAMEBUFFER_BACKBUFFER;
|
||||
return;
|
||||
}
|
||||
@@ -131,6 +128,15 @@ void frameBufferBind(const framebuffer_t *framebuffer) {
|
||||
0, 0,
|
||||
frameBufferGetWidth(framebuffer), frameBufferGetHeight(framebuffer)
|
||||
);
|
||||
|
||||
#elif DOLPHIN
|
||||
GX_SetViewport(
|
||||
0, 0,
|
||||
frameBufferGetWidth(framebuffer),
|
||||
frameBufferGetHeight(framebuffer),
|
||||
0, 1
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
FRAMEBUFFER_BOUND = framebuffer;
|
||||
@@ -155,6 +161,12 @@ void frameBufferClear(uint8_t flags, color_t color) {
|
||||
}
|
||||
|
||||
glClear(glFlags);
|
||||
#elif DOLPHIN
|
||||
GX_SetCopyClear(
|
||||
(GXColor){ color.r, color.g, color.b, color.a },
|
||||
GX_MAX_Z24
|
||||
);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user