Remove trailing spaces
This commit is contained in:
parent
63432724c7
commit
581bd0eb02
5 changed files with 54 additions and 54 deletions
36
src/core.c
36
src/core.c
|
@ -1040,7 +1040,7 @@ void ToggleFullscreen(void)
|
|||
GLFWmonitor** monitors = glfwGetMonitors(&monitorCount);
|
||||
|
||||
int monitorIndex = GetCurrentMonitor();
|
||||
|
||||
|
||||
// Use current monitor, so we correctly get the display the window is on
|
||||
GLFWmonitor* monitor = monitorIndex < monitorCount ? monitors[monitorIndex] : NULL;
|
||||
|
||||
|
@ -1089,7 +1089,7 @@ void ToggleFullscreen(void)
|
|||
// Option 1: Request fullscreen for the canvas element
|
||||
// This option does not seem to work at all
|
||||
//emscripten_request_fullscreen("#canvas", false);
|
||||
|
||||
|
||||
// Option 2: Request fullscreen for the canvas element with strategy
|
||||
// This option does not seem to work at all
|
||||
// Ref: https://github.com/emscripten-core/emscripten/issues/5124
|
||||
|
@ -1101,8 +1101,8 @@ void ToggleFullscreen(void)
|
|||
// .canvasResizedCallbackUserData = NULL
|
||||
// };
|
||||
//emscripten_request_fullscreen_strategy("#canvas", EM_FALSE, &strategy);
|
||||
|
||||
// Option 3: Request fullscreen for the canvas element with strategy
|
||||
|
||||
// Option 3: Request fullscreen for the canvas element with strategy
|
||||
// It works as expected but only inside the browser (client area)
|
||||
EmscriptenFullscreenStrategy strategy = {
|
||||
.scaleMode = EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT,
|
||||
|
@ -1121,10 +1121,10 @@ void ToggleFullscreen(void)
|
|||
{
|
||||
//emscripten_exit_fullscreen();
|
||||
emscripten_exit_soft_fullscreen();
|
||||
|
||||
|
||||
int width, height;
|
||||
emscripten_get_canvas_element_size("#canvas", &width, &height);
|
||||
TRACELOG(LOG_WARNING, "Emscripten: Exit fullscreen: Canvas size: %i x %i", width, height);
|
||||
TRACELOG(LOG_WARNING, "Emscripten: Exit fullscreen: Canvas size: %i x %i", width, height);
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -2070,7 +2070,7 @@ void EndScissorMode(void)
|
|||
void BeginVrStereoMode(VrStereoConfig config)
|
||||
{
|
||||
rlEnableStereoRender();
|
||||
|
||||
|
||||
// Set stereo render matrices
|
||||
rlSetMatrixProjectionStereo(config.projection[0], config.projection[1]);
|
||||
rlSetMatrixViewOffsetStereo(config.viewOffset[0], config.viewOffset[1]);
|
||||
|
@ -2086,7 +2086,7 @@ void EndVrStereoMode(void)
|
|||
VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
|
||||
{
|
||||
VrStereoConfig config = { 0 };
|
||||
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||
// Compute aspect ratio
|
||||
float aspect = ((float)device.hResolution*0.5f)/(float)device.vResolution;
|
||||
|
@ -2126,7 +2126,7 @@ VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
|
|||
// Compute camera projection matrices
|
||||
float projOffset = 4.0f*lensShift; // Scaled to projection space coordinates [-1..1]
|
||||
Matrix proj = MatrixPerspective(fovy, aspect, RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
|
||||
|
||||
|
||||
config.projection[0] = MatrixMultiply(proj, MatrixTranslate(projOffset, 0.0f, 0.0f));
|
||||
config.projection[1] = MatrixMultiply(proj, MatrixTranslate(-projOffset, 0.0f, 0.0f));
|
||||
|
||||
|
@ -2156,7 +2156,7 @@ VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
|
|||
return config;
|
||||
}
|
||||
|
||||
// Unload VR stereo config properties
|
||||
// Unload VR stereo config properties
|
||||
void UnloadVrStereoConfig(VrStereoConfig config)
|
||||
{
|
||||
//...
|
||||
|
@ -3778,7 +3778,7 @@ static bool InitGraphicsDevice(int width, int height)
|
|||
glfwSwapInterval(1);
|
||||
TRACELOG(LOG_INFO, "DISPLAY: Trying to enable VSYNC");
|
||||
}
|
||||
#endif // PLATFORM_DESKTOP || PLATFORM_WEB
|
||||
#endif // PLATFORM_DESKTOP || PLATFORM_WEB
|
||||
|
||||
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(PLATFORM_DRM) || defined(PLATFORM_UWP)
|
||||
CORE.Window.fullscreen = true;
|
||||
|
@ -4349,7 +4349,7 @@ static bool InitGraphicsDevice(int width, int height)
|
|||
TRACELOG(LOG_INFO, " > Screen size: %i x %i", CORE.Window.screen.width, CORE.Window.screen.height);
|
||||
TRACELOG(LOG_INFO, " > Viewport offsets: %i, %i", CORE.Window.renderOffset.x, CORE.Window.renderOffset.y);
|
||||
}
|
||||
#endif // PLATFORM_ANDROID || PLATFORM_RPI || PLATFORM_DRM || PLATFORM_UWP
|
||||
#endif // PLATFORM_ANDROID || PLATFORM_RPI || PLATFORM_DRM || PLATFORM_UWP
|
||||
|
||||
// Load OpenGL extensions
|
||||
// NOTE: GLFW loader function is required by GLAD but only used for OpenGL 2.1 and 3.3,
|
||||
|
@ -4745,7 +4745,7 @@ static void PollInputEvents(void)
|
|||
#else
|
||||
glfwPollEvents(); // Register keyboard/mouse events (callbacks)... and window events!
|
||||
#endif
|
||||
#endif //defined(PLATFORM_DESKTOP)
|
||||
#endif // PLATFORM_DESKTOP
|
||||
|
||||
// Gamepad support using emscripten API
|
||||
// NOTE: GLFW3 joystick functionality not available in web
|
||||
|
@ -4908,8 +4908,8 @@ static void SwapBuffers(void)
|
|||
gbm_surface_release_buffer(CORE.Window.gbmSurface, CORE.Window.prevBO);
|
||||
}
|
||||
CORE.Window.prevBO = bo;
|
||||
#endif // defined(PLATFORM_DRM)
|
||||
#endif // defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(PLATFORM_DRM) || defined(PLATFORM_UWP)
|
||||
#endif // PLATFORM_DRM
|
||||
#endif // PLATFORM_ANDROID || PLATFORM_RPI || PLATFORM_DRM || PLATFORM_UWP
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||
|
@ -5653,7 +5653,7 @@ static void RestoreKeyboard(void)
|
|||
// Reconfigure keyboard to default mode
|
||||
ioctl(STDIN_FILENO, KDSKBMODE, CORE.Input.Keyboard.defaultMode);
|
||||
}
|
||||
#endif //SUPPORT_SSH_KEYBOARD_RPI
|
||||
#endif // SUPPORT_SSH_KEYBOARD_RPI
|
||||
|
||||
// Initialise user input from evdev(/dev/input/event<N>) this means mouse, keyboard or gamepad devices
|
||||
static void InitEvdevInput(void)
|
||||
|
@ -6237,7 +6237,7 @@ static void *GamepadThread(void *arg)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
#endif // PLATFORM_RPI || PLATFORM_DRM
|
||||
#endif // PLATFORM_RPI || PLATFORM_DRM
|
||||
|
||||
#if defined(PLATFORM_UWP)
|
||||
// UWP function pointers
|
||||
|
@ -6509,7 +6509,7 @@ void UWPGestureTouch(int pointer, float x, float y, bool touch)
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // PLATFORM_UWP
|
||||
#endif // PLATFORM_UWP
|
||||
|
||||
#if defined(PLATFORM_DRM)
|
||||
// Search matching DRM mode in connector's mode list
|
||||
|
|
|
@ -1519,7 +1519,7 @@ Mesh GenMeshDefault(int vertexCount)
|
|||
// Upload vertex data to GPU (static mesh)
|
||||
// NOTE: mesh.vboId array is allocated inside UploadMesh()
|
||||
UploadMesh(&mesh, false);
|
||||
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
|
|
|
@ -1235,7 +1235,7 @@ Music LoadMusicStream(const char *fileName)
|
|||
bits = 16;
|
||||
else if (AUDIO_DEVICE_FORMAT == ma_format_u8)
|
||||
bits = 8;
|
||||
|
||||
|
||||
// NOTE: Only stereo is supported for XM
|
||||
music.stream = InitAudioStream(AUDIO.System.device.sampleRate, bits, AUDIO_DEVICE_CHANNELS);
|
||||
music.sampleCount = (unsigned int)jar_xm_get_remaining_samples(ctxXm)*2; // 2 channels
|
||||
|
|
66
src/rlgl.h
66
src/rlgl.h
|
@ -1606,7 +1606,7 @@ void rlglInit(int width, int height)
|
|||
RLGL.State.projection = MatrixIdentity();
|
||||
RLGL.State.modelview = MatrixIdentity();
|
||||
RLGL.State.currentMatrix = &RLGL.State.modelview;
|
||||
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
|
||||
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
|
||||
|
||||
// Initialize OpenGL default states
|
||||
//----------------------------------------------------------
|
||||
|
@ -1684,7 +1684,7 @@ void rlLoadExtensions(void *loader)
|
|||
// WARNING: glGetStringi() not available on OpenGL 2.1
|
||||
char **extList = RL_MALLOC(sizeof(char *)*numExt);
|
||||
TRACELOG(LOG_INFO, "GL: OpenGL extensions:");
|
||||
for (int i = 0; i < numExt; i++)
|
||||
for (int i = 0; i < numExt; i++)
|
||||
{
|
||||
extList[i] = (char *)glGetStringi(GL_EXTENSIONS, i);
|
||||
TRACELOG(LOG_INFO, " %s", extList[i]);
|
||||
|
@ -1730,7 +1730,7 @@ void rlLoadExtensions(void *loader)
|
|||
extList[numExt] = &extensionsDup[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TRACELOG(LOG_INFO, "GL: Supported extensions count: %i", numExt);
|
||||
|
||||
#if defined(SUPPORT_GL_DETAILS_INFO)
|
||||
|
@ -1829,7 +1829,7 @@ void rlLoadExtensions(void *loader)
|
|||
TRACELOG(LOG_INFO, " > Renderer: %s", glGetString(GL_RENDERER));
|
||||
TRACELOG(LOG_INFO, " > Version: %s", glGetString(GL_VERSION));
|
||||
TRACELOG(LOG_INFO, " > GLSL: %s", glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
|
||||
|
||||
// NOTE: Anisotropy levels capability is an extension
|
||||
#ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
|
@ -2393,7 +2393,7 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi
|
|||
return id;
|
||||
}
|
||||
#endif
|
||||
#endif // GRAPHICS_API_OPENGL_11
|
||||
#endif // GRAPHICS_API_OPENGL_11
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
|
@ -3738,7 +3738,7 @@ static void rlLoadShaderDefault(void)
|
|||
"{ \n"
|
||||
" vec4 texelColor = texture2D(texture0, fragTexCoord); \n"
|
||||
" gl_FragColor = texelColor*colDiffuse*fragColor; \n"
|
||||
"} \n";
|
||||
"} \n";
|
||||
#elif defined(GRAPHICS_API_OPENGL_33)
|
||||
"#version 330 \n"
|
||||
"in vec2 fragTexCoord; \n"
|
||||
|
@ -3803,7 +3803,7 @@ static void rlUnloadShaderDefault(void)
|
|||
glDeleteProgram(RLGL.State.defaultShader.id);
|
||||
|
||||
RL_FREE(RLGL.State.defaultShader.locs);
|
||||
|
||||
|
||||
TRACELOG(LOG_INFO, "SHADER: [ID %i] Default shader unloaded successfully", RLGL.State.defaultShader.id);
|
||||
}
|
||||
|
||||
|
@ -3813,7 +3813,7 @@ static char *rlGetCompressedFormatName(int format)
|
|||
{
|
||||
static char compName[64] = { 0 };
|
||||
memset(compName, 0, 64);
|
||||
|
||||
|
||||
switch (format)
|
||||
{
|
||||
// GL_EXT_texture_compression_s3tc
|
||||
|
@ -3853,37 +3853,37 @@ static char *rlGetCompressedFormatName(int format)
|
|||
case 0x9272: strcpy(compName, "GL_COMPRESSED_RG11_EAC"); break;
|
||||
case 0x9273: strcpy(compName, "GL_COMPRESSED_SIGNED_RG11_EAC"); break;
|
||||
// GL_KHR_texture_compression_astc_hdr
|
||||
case 0x93B0: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_4x4_KHR"); break;
|
||||
case 0x93B1: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_5x4_KHR"); break;
|
||||
case 0x93B2: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_5x5_KHR"); break;
|
||||
case 0x93B3: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_6x5_KHR"); break;
|
||||
case 0x93B4: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_6x6_KHR"); break;
|
||||
case 0x93B5: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_8x5_KHR"); break;
|
||||
case 0x93B6: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_8x6_KHR"); break;
|
||||
case 0x93B7: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_8x8_KHR"); break;
|
||||
case 0x93B0: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_4x4_KHR"); break;
|
||||
case 0x93B1: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_5x4_KHR"); break;
|
||||
case 0x93B2: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_5x5_KHR"); break;
|
||||
case 0x93B3: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_6x5_KHR"); break;
|
||||
case 0x93B4: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_6x6_KHR"); break;
|
||||
case 0x93B5: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_8x5_KHR"); break;
|
||||
case 0x93B6: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_8x6_KHR"); break;
|
||||
case 0x93B7: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_8x8_KHR"); break;
|
||||
case 0x93B8: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_10x5_KHR"); break;
|
||||
case 0x93B9: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_10x6_KHR"); break;
|
||||
case 0x93BA: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_10x8_KHR"); break;
|
||||
case 0x93BB: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_10x10_KHR"); break;
|
||||
case 0x93BC: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_12x10_KHR"); break;
|
||||
case 0x93BD: strcpy(compName, "GL_COMPRESSED_RGBA_ASTC_12x12_KHR"); break;
|
||||
case 0x93D0: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"); break;
|
||||
case 0x93D1: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"); break;
|
||||
case 0x93D2: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"); break;
|
||||
case 0x93D3: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"); break;
|
||||
case 0x93D4: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"); break;
|
||||
case 0x93D5: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"); break;
|
||||
case 0x93D6: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"); break;
|
||||
case 0x93D7: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"); break;
|
||||
case 0x93D8: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"); break;
|
||||
case 0x93D9: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"); break;
|
||||
case 0x93DA: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"); break;
|
||||
case 0x93DB: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"); break;
|
||||
case 0x93DC: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"); break;
|
||||
case 0x93DD: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"); break;
|
||||
default: strcpy(compName, "GL_COMPRESSED_UNKNOWN"); break;
|
||||
case 0x93D0: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"); break;
|
||||
case 0x93D1: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"); break;
|
||||
case 0x93D2: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"); break;
|
||||
case 0x93D3: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"); break;
|
||||
case 0x93D4: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"); break;
|
||||
case 0x93D5: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"); break;
|
||||
case 0x93D6: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"); break;
|
||||
case 0x93D7: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"); break;
|
||||
case 0x93D8: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"); break;
|
||||
case 0x93D9: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"); break;
|
||||
case 0x93DA: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"); break;
|
||||
case 0x93DB: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"); break;
|
||||
case 0x93DC: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"); break;
|
||||
case 0x93DD: strcpy(compName, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"); break;
|
||||
default: strcpy(compName, "GL_COMPRESSED_UNKNOWN"); break;
|
||||
}
|
||||
|
||||
|
||||
return compName;
|
||||
}
|
||||
#endif // SUPPORT_GL_DETAILS_INFO
|
||||
|
@ -4016,7 +4016,7 @@ static Color *rlGenNextMipmapData(Color *srcData, int srcWidth, int srcHeight)
|
|||
|
||||
return mipmap;
|
||||
}
|
||||
#endif // GRAPHICS_API_OPENGL_11
|
||||
#endif // GRAPHICS_API_OPENGL_11
|
||||
|
||||
// Get pixel data size in bytes (image or texture)
|
||||
// NOTE: Size depends on pixel format
|
||||
|
|
|
@ -3236,7 +3236,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
|
|||
bottomRight.x = x + (dx + dest.width)*cosRotation - (dy + dest.height)*sinRotation;
|
||||
bottomRight.y = y + (dx + dest.width)*sinRotation + (dy + dest.height)*cosRotation;
|
||||
}
|
||||
|
||||
|
||||
rlCheckRenderBatchLimit(4); // Make sure there is enough free space on the batch buffer
|
||||
|
||||
rlSetTexture(texture.id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue