mirror of
https://github.com/raysan5/raylib.git
synced 2026-05-25 14:10:27 -04:00
Compare commits
4 Commits
7207c03c72
...
aceb8ce3a8
| Author | SHA1 | Date | |
|---|---|---|---|
| aceb8ce3a8 | |||
| 33e889907e | |||
| 61537200c0 | |||
| 080f5c94bd |
@ -119,7 +119,7 @@ USE_EXTERNAL_GLFW ?= FALSE
|
||||
|
||||
# Enable support for X11 by default on Linux when using GLFW
|
||||
# NOTE: Wayland is disabled by default, only enable if you are sure
|
||||
GLFW_LINUX_ENABLE_WAYLAND ?= FALSE
|
||||
GLFW_LINUX_ENABLE_WAYLAND ?= TRUE
|
||||
GLFW_LINUX_ENABLE_X11 ?= TRUE
|
||||
|
||||
# Enable support for X11 by default on Linux when using RGFW
|
||||
|
||||
16
src/external/rlsw.h
vendored
16
src/external/rlsw.h
vendored
@ -213,6 +213,7 @@ typedef double GLclampd;
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
//#define GL_ATTRIB_STACK_DEPTH 0x0BB0
|
||||
//#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
|
||||
@ -520,6 +521,7 @@ typedef enum {
|
||||
SW_RENDERER = GL_RENDERER,
|
||||
SW_VERSION = GL_VERSION,
|
||||
SW_EXTENSIONS = GL_EXTENSIONS,
|
||||
SW_SHADING_LANGUAGE_VERSION = GL_SHADING_LANGUAGE_VERSION,
|
||||
SW_COLOR_CLEAR_VALUE = GL_COLOR_CLEAR_VALUE,
|
||||
SW_DEPTH_CLEAR_VALUE = GL_DEPTH_CLEAR_VALUE,
|
||||
SW_CURRENT_COLOR = GL_CURRENT_COLOR,
|
||||
@ -4279,6 +4281,7 @@ const char *swGetString(SWget name)
|
||||
case SW_RENDERER: result = "RLSW OpenGL Software Renderer"; break;
|
||||
case SW_VERSION: result = RLSW_VERSION; break;
|
||||
case SW_EXTENSIONS: result = "None"; break;
|
||||
case SW_SHADING_LANGUAGE_VERSION: result = "Not supported"; break;
|
||||
default: RLSW.errCode = SW_INVALID_ENUM; break;
|
||||
}
|
||||
|
||||
@ -5517,7 +5520,9 @@ static void SW_RASTER_TRIANGLE_SPAN(const sw_vertex_t *start, const sw_vertex_t
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SW_ENABLE_DEPTH_TEST
|
||||
discard:
|
||||
#endif
|
||||
srcColor[0] += dSrcColordx[0];
|
||||
srcColor[1] += dSrcColordx[1];
|
||||
srcColor[2] += dSrcColordx[2];
|
||||
@ -5562,9 +5567,10 @@ static void SW_RASTER_TRIANGLE(const sw_vertex_t *v0, const sw_vertex_t *v1, con
|
||||
if (v0->position[1] > v1->position[1]) { const sw_vertex_t *tmp = v0; v0 = v1; v1 = tmp; }
|
||||
|
||||
// Extracting coordinates from the sorted vertices
|
||||
float x0 = v0->position[0], y0 = v0->position[1];
|
||||
float x1 = v1->position[0], y1 = v1->position[1];
|
||||
float x2 = v2->position[0], y2 = v2->position[1];
|
||||
// Put x away for safe keeping. Only y is used right now. Silences warnings.
|
||||
float y0 = v0->position[1];
|
||||
float y1 = v1->position[1];
|
||||
float y2 = v2->position[1];
|
||||
|
||||
// Compute height differences
|
||||
float h02 = y2 - y0;
|
||||
@ -5774,7 +5780,9 @@ static void SW_RASTER_QUAD(const sw_vertex_t *a, const sw_vertex_t *b,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SW_ENABLE_DEPTH_TEST
|
||||
discard:
|
||||
#endif
|
||||
color[0] += dCdx[0];
|
||||
color[1] += dCdx[1];
|
||||
color[2] += dCdx[2];
|
||||
@ -5927,7 +5935,9 @@ static void SW_RASTER_LINE(const sw_vertex_t *v0, const sw_vertex_t *v1)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SW_ENABLE_DEPTH_TEST
|
||||
discard:
|
||||
#endif
|
||||
x += xInc;
|
||||
y += yInc;
|
||||
#ifdef SW_ENABLE_DEPTH_TEST
|
||||
|
||||
@ -178,12 +178,12 @@ typedef struct {
|
||||
RGFW_monitor *monitor;
|
||||
mg_gamepads minigamepad;
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
RGFW_surface *surface;
|
||||
u8 *surfacePixels;
|
||||
i32 surfaceWidth;
|
||||
i32 surfaceHeight;
|
||||
#endif
|
||||
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
RGFW_surface *surface;
|
||||
u8 *surfacePixels;
|
||||
i32 surfaceWidth;
|
||||
i32 surfaceHeight;
|
||||
#endif
|
||||
} PlatformData;
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
@ -1526,7 +1526,6 @@ int InitPlatform(void)
|
||||
if (hr < 0) TRACELOG(LOG_ERROR, "%s failed, hresult=0x%lx", "SetProcessDpiAwareness", (DWORD)hr);
|
||||
}
|
||||
*/
|
||||
|
||||
HINSTANCE hInstance = GetModuleHandleW(0);
|
||||
|
||||
// Define window class
|
||||
|
||||
@ -266,9 +266,12 @@ static void PollKeyboardEvents(void); // Process evdev keyboard events
|
||||
static void PollGamepadEvents(void); // Process evdev gamepad events
|
||||
static void PollMouseEvents(void); // Process evdev mouse events
|
||||
|
||||
// Not used by software rendering.
|
||||
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode); // Search matching DRM mode in connector's mode list
|
||||
static int FindExactConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search exactly matching DRM connector mode in connector's list
|
||||
static int FindNearestConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search the nearest matching DRM connector mode in connector's list
|
||||
#endif
|
||||
|
||||
static void SetupFramebuffer(int width, int height); // Setup main framebuffer (required by InitPlatform())
|
||||
|
||||
@ -2560,6 +2563,7 @@ static void PollMouseEvents(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
// Search matching DRM mode in connector's mode list
|
||||
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode)
|
||||
{
|
||||
@ -2648,6 +2652,7 @@ static int FindNearestConnectorMode(const drmModeConnector *connector, uint widt
|
||||
|
||||
return nearestIndex;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Compute framebuffer size relative to screen size and display size
|
||||
// NOTE: Global variables CORE.Window.render.width/CORE.Window.render.height and CORE.Window.renderOffset.x/CORE.Window.renderOffset.y can be modified
|
||||
|
||||
22
src/rcore.c
22
src/rcore.c
@ -442,18 +442,6 @@ typedef enum AutomationEventType {
|
||||
ACTION_SETTARGETFPS // param[0]: fps
|
||||
} AutomationEventType;
|
||||
|
||||
// Event type to config events flags
|
||||
// WARNING: Not used at the moment
|
||||
typedef enum {
|
||||
EVENT_INPUT_KEYBOARD = 0,
|
||||
EVENT_INPUT_MOUSE = 1,
|
||||
EVENT_INPUT_GAMEPAD = 2,
|
||||
EVENT_INPUT_TOUCH = 4,
|
||||
EVENT_INPUT_GESTURE = 8,
|
||||
EVENT_WINDOW = 16,
|
||||
EVENT_CUSTOM = 32
|
||||
} EventType;
|
||||
|
||||
// Event type name strings, required for export
|
||||
static const char *autoEventTypeName[] = {
|
||||
"EVENT_NONE",
|
||||
@ -482,16 +470,6 @@ static const char *autoEventTypeName[] = {
|
||||
"ACTION_SETTARGETFPS"
|
||||
};
|
||||
|
||||
/*
|
||||
// Automation event (24 bytes)
|
||||
// NOTE: Opaque struct, internal to raylib
|
||||
struct AutomationEvent {
|
||||
unsigned int frame; // Event frame
|
||||
unsigned int type; // Event type (AutomationEventType)
|
||||
int params[4]; // Event parameters (if required)
|
||||
};
|
||||
*/
|
||||
|
||||
static AutomationEventList *currentEventList = NULL; // Current automation events list, set by user, keep internal pointer
|
||||
static bool automationEventRecording = false; // Recording automation events flag
|
||||
//static short automationEventEnabled = 0b0000001111111111; // TODO: Automation events enabled for recording/playing
|
||||
|
||||
Reference in New Issue
Block a user