Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Platforms split into separate modules: PLATFORM_WEB, PLATFORM_DESKTOP status #3339

Closed
ghost opened this issue Sep 22, 2023 · 7 comments

Comments

@ghost
Copy link

ghost commented Sep 22, 2023

Issue to more easily track PLATFORM_WEB and PLATFORM_DESKTOP status for:

Modules checked status

module android desktop (linux) web comment
raylib ✔️ ✔️ -
examples/audio ✔️ ✔️ -
examples/core ✔️ ✔️ See note A
examples/models ✔️ ✔️ See note A
examples/others ✔️ ✔️ See note B
examples/shaders ✔️ ✔️ -
examples/shapes ✔️ ✔️ -
examples/text ✔️ ✔️ -
examples/textures ✔️ ✔️ -
  • A. For PLATFORM_WEB the core_custom_frame_control, core_loading_thread, core_window_flags and models_skybox examples compile but don't work. However, they also don't work on current master branch (c8a6093).

  • B. For PLATFORM_WEB the raylib_opengl_interop and rlgl_standalone examples are not compiling, but they are also not compiling on current master branch (c8a6093). rlgl_compute_shader compiles on both, but doesn't work on either.

Functions checked status

function core android desktop web comment
InitGraphicsDevice - ✔️ ✔️ ✔️ -
SetupViewport ✔️ - - - -
SetupFramebuffer ✔️ - - - -
InitTimer ✔️ - - - -
- core android desktop web comment
InitWindow - ✔️ ✔️ ✔️ -
WindowShouldClose - ✔️ ✔️ ✔️ -
CloseWindow - ✔️ ✔️ ✔️ -
IsWindowReady ✔️ - - -
IsWindowFullscreen ✔️ - - - -
IsWindowHidden - ✔️ ✔️ ✔️ -
IsWindowMinimized - ✔️ ✔️ ✔️ -
IsWindowMaximized - ✔️ ✔️ ✔️ -
IsWindowFocused - ✔️ ✔️ ✔️ -
IsWindowResized - ✔️ ✔️ ✔️ -
IsWindowState ✔️ - - - -
ToggleFullscreen - ✔️ ✔️ ✔️ -
MaximizeWindow - ✔️ ✔️ ✔️ -
MinimizeWindow - ✔️ ✔️ ✔️ -
RestoreWindow - ✔️ ✔️ ✔️ -
ToggleBorderlessWindowed - ✔️ ✔️ ✔️ -
SetWindowState - ✔️ ✔️ ✔️ -
ClearWindowState - ✔️ ✔️ ✔️ -
SetWindowIcon - ✔️ ✔️ ✔️ -
SetWindowIcons - ✔️ ✔️ ✔️ -
SetWindowTitle - ✔️ ✔️ ✔️ -
SetWindowPosition - ✔️ ✔️ ✔️ -
SetWindowMonitor - ✔️ ✔️ ✔️ -
SetWindowMinSize - ✔️ ✔️ ✔️ -
SetWindowMaxSize - ✔️ ✔️ ✔️ -
SetWindowSize - ✔️ ✔️ ✔️ -
SetWindowOpacity - ✔️ ✔️ ✔️ -
SetWindowFocused - ✔️ ✔️ ✔️ -
GetWindowHandle - ✔️ ✔️ ✔️ -
GetScreenWidth ✔️ - - - -
GetScreenHeight ✔️ - - - -
GetRenderWidth ✔️ - - - -
GetRenderHeight ✔️ - - - -
GetMonitorCount - ✔️ ✔️ ✔️ -
GetCurrentMonitor - ✔️ ✔️ ✔️ -
GetMonitorPosition - ✔️ ✔️ ✔️ -
GetMonitorWidth - ✔️ ✔️ ✔️ -
GetMonitorHeight - ✔️ ✔️ ✔️ -
GetMonitorPhysicalWidth - ✔️ ✔️ ✔️ -
GetMonitorPhysicalHeight - ✔️ ✔️ ✔️ -
GetMonitorRefreshRate - ✔️ ✔️ ✔️ -
GetWindowPosition - ✔️ ✔️ ✔️ -
GetWindowScaleDPI - ✔️ ✔️ ✔️ -
GetMonitorName - ✔️ ✔️ ✔️ -
SetClipboardText - ✔️ ✔️ ✔️ -
GetClipboardText - ✔️ ✔️ ✔️ -
EnableEventWaiting ✔️ - - - -
DisableEventWaiting ✔️ - - - -
- core android desktop web comment
SwapScreenBuffer - ✔️ ✔️ ✔️ -
PollInputEvents - ✔️ ✔️ ✔️ -
WaitTime ✔️ - - - -
- core android desktop web comment
ShowCursor - ✔️ ✔️ ✔️ -
HideCursor - ✔️ ✔️ ✔️ -
IsCursorHidden ✔️ - - - -
EnableCursor - ✔️ ✔️ ✔️ -
DisableCursor - ✔️ ✔️ ✔️ -
IsCursorOnScreen ✔️ - - - -
- core android desktop web comment
ClearBackground ✔️ - - - -
BeginDrawing ✔️ - - - -
EndDrawing ✔️ - - - -
BeginMode2D ✔️ - - - -
EndMode2D ✔️ - - - -
BeginMode3D ✔️ - - - -
EndMode3D ✔️ - - - -
BeginTextureMode ✔️ - - - -
EndTextureMode ✔️ - - - -
BeginShaderMode ✔️ - - - -
EndShaderMode ✔️ - - - -
BeginBlendMode ✔️ - - - -
EndBlendMode ✔️ - - - -
BeginScissorMode ✔️ - - - -
EndScissorMode ✔️ - - - -
BeginVrStereoMode ✔️ - - - -
EndVrStereoMode ✔️ - - - -
- core android desktop web comment
LoadVrStereoConfig ✔️ - - - -
UnloadVrStereoConfig ✔️ - - - -
- core android desktop web comment
LoadShader ✔️ - - - -
LoadShaderFromMemory ✔️ - - - -
IsShaderReady ✔️ - - - -
UnloadShader ✔️ - - - -
GetShaderLocation ✔️ - - - -
GetShaderLocationAttrib ✔️ - - - -
SetShaderValue ✔️ - - - -
SetShaderValueV ✔️ - - - -
SetShaderValueMatrix ✔️ - - - -
SetShaderValueTexture ✔️ - - - -
- core android desktop web comment
GetMouseRay ✔️ - - - -
GetCameraMatrix ✔️ - - - -
GetCameraMatrix2D ✔️ - - - -
GetWorldToScreen ✔️ - - - -
GetWorldToScreenEx ✔️ - - - -
GetWorldToScreen2D ✔️ - - - -
GetScreenToWorld2D ✔️ - - - -
- core android desktop web comment
SetTargetFPS ✔️ - - - -
GetFPS ✔️ - - - -
GetFrameTime ✔️ - - - -
GetTime - ✔️ ✔️ ✔️ -
- core android desktop web comment
SetConfigFlags ✔️ - - - -
TakeScreenshot - ✔️ ✔️ ✔️ -
GetRandomValue ✔️ - - - -
SetRandomSeed ✔️ - - - -
- core android desktop web comment
OpenURL - ✔️ ✔️ ✔️ -
- core android desktop web comment
FileExists ✔️ - - - -
IsFileExtension ✔️ - - - -
DirectoryExists ✔️ - - - -
GetFileLength ✔️ - - - -
GetFileExtension ✔️ - - - -
GetFileName ✔️ - - - -
GetFileNameWithoutExt ✔️ - - - -
GetDirectoryPath ✔️ - - - -
GetPrevDirectoryPath ✔️ - - - -
GetWorkingDirectory ✔️ - - - -
GetApplicationDirectory ✔️ - - - -
LoadDirectoryFiles ✔️ - - - -
LoadDirectoryFilesEx ✔️ - - - -
UnloadDirectoryFiles ✔️ - - - -
ChangeDirectory ✔️ - - - -
IsPathFile ✔️ - - - -
IsFileDropped ✔️ - - - -
LoadDroppedFiles ✔️ - - - -
UnloadDroppedFiles ✔️ - - - -
GetFileModTime ✔️ - - - -
- core android desktop web comment
ScanDirectoryFiles ✔️ - - - -
ScanDirectoryFilesRecursively ✔️ - - - -
- core android desktop web comment
CompressData ✔️ - - - -
DecompressData ✔️ - - - -
EncodeDataBase64 ✔️ - - - -
DecodeDataBase64 ✔️ - - - -
- core android desktop web comment
IsKeyPressed ✔️ - - - -
IsKeyDown ✔️ - - - -
IsKeyReleased ✔️ - - - -
IsKeyUp ✔️ - - - -
GetKeyPressed ✔️ - - - -
GetCharPressed ✔️ - - - -
SetExitKey - ✔️ ✔️ ✔️ -
- core android desktop web comment
IsGamepadAvailable ✔️ - - - -
GetGamepadName - ✔️ ✔️ ✔️ -
GetGamepadAxisCount - ✔️ ✔️ ✔️ -
GetGamepadAxisMovement ✔️ - - - -
IsGamepadButtonPressed ✔️ - - - -
IsGamepadButtonDown ✔️ - - - -
IsGamepadButtonReleased ✔️ - - - -
IsGamepadButtonUp ✔️ - - - -
GetGamepadButtonPressed ✔️ - - - -
SetGamepadMappings - ✔️ ✔️ ✔️ -
- core android desktop web comment
IsMouseButtonPressed ✔️ - - - -
IsMouseButtonDown ✔️ - - - -
IsMouseButtonReleased ✔️ - - - -
IsMouseButtonUp ✔️ - - - -
GetMouseX - ✔️ ✔️ ✔️ -
GetMouseY - ✔️ ✔️ ✔️ -
GetMousePosition - ✔️ ✔️ ✔️ -
GetMouseDelta ✔️ - - - -
SetMousePosition - ✔️ ✔️ ✔️ -
SetMouseOffset ✔️ - - - -
SetMouseScale ✔️ - - - -
GetMouseWheelMove - ✔️ ✔️ ✔️ -
GetMouseWheelMoveV ✔️ - - - -
SetMouseCursor - ✔️ ✔️ ✔️ -
- core android desktop web comment
GetTouchX - ✔️ ✔️ ✔️ -
GetTouchY - ✔️ ✔️ ✔️ -
GetTouchPosition - ✔️ ✔️ ✔️ -
GetTouchPointId ✔️ - - - -
GetTouchPointCount ✔️ - - - -

Changelog

Environment

  • Compiled PLATFORM_DESKTOP with gcc on Linux (Mint 21.1 64-bit). And tested it on Linux (Mint 21.1 64-bit).
  • Compiled PLATFORM_WEB with emscripten/emsdk on Linux (Mint 21.1 64-bit). And tested it on Firefox (115.1.0esr 64-bit) and Chromium (115.0.5790.170 64-bit) both running on Linux (Mint 21.1 64-bit).

Edits

1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, 15: updated functions checked status.
5, 7: updated changelog.
10: formatting.
16: updated modules status and notes; formatting.
17: updated environemnt.

@ghost
Copy link
Author

ghost commented Sep 22, 2023

@raysan5 When you can, could you please update the Wishlist (#2952) examples section with:

Issues with several examples not working on `PLATFORM_WEB`:

- [ ] **REVIEW: Example: `models_skybox`**. WebGL: INVALID_VALUE: disableVertexAttribArray: index out of range _glDisableVertexAttribArray.
- [ ] **REVIEW: Example: `core_custom_frame_control`**.
- [ ] **REVIEW: Example: `core_loading_thread`**.
- [ ] **REVIEW: Example: `core_window_flags`**.
- [ ] **REVIEW: Example: `raylib_opengl_interop`**.
- [ ] **REVIEW: Example: `rlgl_standalone`**.

These examples are also not working for PLATFORM_WEB on current master branch (557aeff), so their issues are unrelated to the split.

@raysan5
Copy link
Owner

raysan5 commented Sep 22, 2023

@ubkp done!

@raysan5
Copy link
Owner

raysan5 commented Sep 22, 2023

Oh! thanks for the detailed functions status table!

@ghost
Copy link
Author

ghost commented Sep 22, 2023

@raysan5 Thank you very much!

No problem. By the way, since I'm going through all functions, would you like me to also handle rcore_desktop.c? So you can be free to check other issues.

@raysan5
Copy link
Owner

raysan5 commented Sep 22, 2023

@ubkp That would be great, thank you very much, I'm a bit busy this days. In any case, feel free to keep sending PRs for merging so I can pick up after some PR.

@ghost
Copy link
Author

ghost commented Sep 22, 2023

@raysan5 Okay, I'm on it. 👍

@ghost ghost changed the title [split] PLATFORM_WEB status [split] PLATFORM_DESKTOP, PLATFORM_WEB status Sep 24, 2023
@ghost ghost changed the title [split] PLATFORM_DESKTOP, PLATFORM_WEB status [split] PLATFORM_WEB, PLATFORM_DESKTOP status Sep 24, 2023
@raysan5 raysan5 changed the title [split] PLATFORM_WEB, PLATFORM_DESKTOP status [core] Platforms split into separate modules: PLATFORM_WEB, PLATFORM_DESKTOP status Sep 24, 2023
@ghost
Copy link
Author

ghost commented Sep 26, 2023

Following @michaelfiber, I'm also closing this issue. As far as I could test PLATFORM_WEB and PLATFORM_DESKTOP are working correctly. Will reopen if necessary, but I think both are on a pretty good state.

@ghost ghost closed this as completed Sep 26, 2023
This issue was closed.
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

No branches or pull requests

1 participant