-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[examples] Review some examples not working properly on several platforms #3487
Comments
@ubkp @michaelfiber Just opened this issue for further discussion on the examples not working properly that you reported. Actually some of them are not intended to work on the target platform while others have specific concerns. @Bigfoot71 not sure if you tested all the examples on |
Notes
Edits1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. updates. |
No, from memory, the few issues I had noticed last time have been fixed, and even I will try all of them tomorrow and provide a brief report. Normally, except for some shader examples, I believe they should all be able to run without any problems. Edit: I had already mentioned it, but unfortunately, I won't be able to try the example for the gamepad. |
@Bigfoot71 Maybe #3371 could help? At that time I went through all examples. The ones with a comment |
@ubkp But how do you plan to make |
@Bigfoot71 I just meant as a reference. Those were just the ones I couldn't get to work completely here. I think most of those marked with |
@raysan5 Updated status table at #3487 (comment). |
maybe |
@ubkp Thank you very much for the detailed table and reviews! Here my comments about some of the examples:
Other possible issues:
There are probably other example issues but I think most of them work as expected, I plan to do a full examples-test-pass for Windows and Web in the following days, if anything significant popups I will update this issue. |
Android TestsI have tried almost all the examples in core, shape, textures, text, and models, as well as the 6 audio examples and some of the shader examples that seemed most relevant on Android (with df0f7ba). Most of the untested examples are those directly related to the keyboard, physical mouse, or gamepad. All the tested examples were able to compile and run without any issues (except one, see below), including those using Issues
Issues in videoZ-Fighting.mp4FinallyEverything, whether it's image generation/manipulation, shape rendering (2D/3D), model animation, gestures, fonts, sound, shaders, etc... Everything seems to work apart from the Z-fighting problem that I noticed for 3D. Edit: Honestly, this Android test is quite successful, and the third issue doesn't even belong here, but well, we need to fill the report, lol. |
@raysan5 Updated the status table (#3487 (comment)) with the comments on the other |
@raysan5 I found how to resolve the Z-Fighting issue I mentioned earlier. (on Android) You need to modify the floating-point precision of the default shader as follows: #if defined(GRAPHICS_API_OPENGL_ES2)
"#version 100 \n"
- "precision mediump float; \n" // Precision required for OpenGL ES2 (WebGL) (on some browsers)
+ "precision highp float; \n" // Precision required for OpenGL ES2 (WebGL) (on some browsers)
"attribute vec3 vertexPosition; \n"
"attribute vec2 vertexTexCoord; \n"
"attribute vec4 vertexColor; \n"
"varying vec2 fragTexCoord; \n"
"varying vec4 fragColor; \n"
#endif However, after some research, it seems that this Z-Fighting issue, which can be resolved by modifying the floating-point precision in the shader, only occurs on certain devices (not high-end or older ones). |
@Bigfoot71 Related: #3260, #3261. |
So in short, |
@Bigfoot71 Perhaps an
|
@ubkp I thought about it, but it's not very clean, is it? Though it would certainly reconcile both issues. |
I think this is not the best approach, many Android devices do not support EDIT: Also note, in raylib I always priorize supporting old and low-end devices. |
@raysan5 I think we should be able to do something like this to check if the device is capable of supporting #if defined(GL_FRAGMENT_PRECISION_HIGH)
precision highp float;
#else
precision mediump float;
#endif But it's not any cleaner, anyway. So we leave it as is I guess. This issue with |
@Bigfoot71 I really think it's platform/drivers-dependant and there is not a good solution to cover most use case. Better leave it as it is. In any case, advance users can change it for their needs depending on their target audience and development process. |
@ubkp @Bigfoot71 I reviewed Actually, all examples in I think we can continue with the As a side note, today I implemented a tool to update examples open-graph metada, so examples can be shared on multiple social networks (X, Mastodon, LinkedIn, Discord...) with a fancy visual card showing each example details. I will provide more info asap. |
Example is intended for `PLATFORM_DESKTOP` only and OpenGL 3.3 Core profile.
Agreed. I think the major problems were solved or documented. The examples issues left don't appear to be super critical.
That's awesome! 👍 |
Not sure if it's related, but on |
@erikyuzwa Compiled Could you post the log so we can see if there's some error there? |
totally believe you @ubkp - I'm using the gamejam template on VS2022. Other examples have worked ok as-is up until now. I don't see a log, but I've confirmed I'm building in debug mode. i've even removed the |
@erikyuzwa All the examples should output a standard log by default on the terminal/console. Something like this:
Since you're on Windows, please check if your compiler is using the Edits: 1. editing; 2. correction. |
thanks for your patience. Yes, of course it's there in that console window - my bad. (I'm used to web servers all day and scouring through and tailing log files). If you'd prefer me moving this to a new issue I'm fine with that too Here's what I'm seeing:
|
@erikyuzwa Yeah, probably a better idea to open a new issue regarding this one.
Not sure why it's doing this:
Are you using the stock Edit: typo, editing. |
@erikyuzwa You mentioned you're using the gamejam template, right? |
@ubkp - that worked! Thanks so much. Not sure why the same code dropped into the rendering in the game template didn't but I'll leave that until I work more with textures - thank you SO much and apologies for polluting the OG issue with this. Here's the log just in case it helps. I will also go through the source to see if I can pipe the log to a file (for eventual testers).
|
@erikyuzwa No problem, glad it worked. :) I think the problem was that the gamejam template basic structure, for some reason, opts to render to a texture (L79-L82, L124-L130) and them render that texture to screen (L133-L141). Most of the examples use a far simpler method of just rendering things directly to screen (e.g.: L144-L196), which is probably what I would recommend using while you're getting used to Regarding the log, on Edit: typo. |
@ubkp @erikyuzwa the About the log output to file, afair, in Windows CMD, |
appreciate the followup and insight there @raysan5 🙇 |
I found a bug, where |
The compute shader example doesn't seem to do anything now . I tried both an Odin port and building the VS2022 example. Black screen with GUI but nothing else |
@crystalthoughts Note that compute shader example requires recompiling raylib for OpenGL 4.3. |
Thanks Ray I'll give it a go (soonish) and report back if there's still an issue |
On RPI 2B
|
@colesnicov this is a special example to illustrate raylib interoperatibility with OpenGL, it requires including OpenGL libraries. |
I want to try to run the rest of the examples. Here I tried to fix https://github.com/raysan5/raylib/blob/master/examples/others/raylib_opengl_interop.c I changed the code on the line
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_DESKTOP_SDL) || defined(PLATFORM_DRM)
Heres the log:
you have |
I found this https://gen.glad.sh/, and I'm a deer for it :D . |
@colesnicov Just note that I'm planning to remove |
Most of the example after adjusting the size, I made it global:
and
from folder This applies to RayGUI as well. |
I'm closing this issue, examples issues would be opened per individual examples when required. |
Issues on multiple platforms
core_3d_camera_free
. Displayed controls do not match and camera behaves strangely.Issues on
PLATFORM_DESKTOP
, macOS (and maybe other platforms/OSs)custom_frame_control
--> Requires raylib built withSUPPORT_CUSTOM_FRAME_CONTROL
.models_loading
. It seems to be buggy at selecting the model, needs some reviewskybox_loading
. Doesn't fill the entire window, only the bottom-left quadrant --> Probably related to HighDPI.shader_hot_reloading
,shader_spotlight
. Scaling issue between the mouse and circle positions --> Probably related to HighDPI.top_down_lights
. Fully illuminated (no shadows are drawn) until light is movedIssues on
PLATFORM_WEB
models_skybox
. WebGL: INVALID_VALUE: disableVertexAttribArray: index out of range _glDisableVertexAttribArray.core_custom_frame_control
--> Requires raylib built withSUPPORT_CUSTOM_FRAME_CONTROL
.core_loading_thread
--> Threading support depends on the browser and security reasons.core_window_flags
--> Most window flags are intended for a window, not a canvas.raylib_opengl_interop
--> Example intended for OpenGL desktop, not OpenGL ES.rlgl_standalone
-->PLATFORM_DESKTOP
exclusivelymodels_mesh_instancing
. Not working properly on web, issues with the shader but ONLY when uploade to GitHub, it works as expected locally.Issues on
PLATFORM_DRM
models_first_person_maze
,core_3d_camera_free
). Camera moving uncontrollably.shapes_draw_circle_sector
,shapes_draw_ring
). Cursor not showing.text_draw_3d
,text_input_box
). Can't type.audio_module_playing
. Crashing the Raspberry Pi after a few seconds.core_custom_frame_control
. Flickering and not working. --> Requires raylib built withSUPPORT_CUSTOM_FRAME_CONTROL
.core_vr_simulator
. Not rendering.models_skybox
. Not rendering. --> Requires enabling HDR loading but maybe not supported by OpenGL ES.shaders_raymarching
. Not rendering. --> Shader not adapted for GLSL100.shaders_mesh_instancing
. Segmentation fault. --> Not supported by OpenGL ES.rlgl_compute_shader
. Not working. --> Not supported by OpenGL ES.raylib_opengl_interop
. Not compiling. --> Example intended for OpenGL desktop, not OpenGL ES.rlgl_standalone
. Not compiling. -->PLATFORM_DESKTOP
exclusivelyNote that some of the issues seem related to platform/OpenGL limitations.
In any case, any help with those examples is really welcome.
The text was updated successfully, but these errors were encountered: