mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-05 08:42:47 +00:00
fix(4JLibs): Fix 4J renderer to use normal OpenGL and not some hacky D3D11 shit
This commit is contained in:
parent
ed614e0fa0
commit
6dc2e3bd71
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
class ImageFileBuffer
|
class ImageFileBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -246,6 +248,7 @@ const int CLEAR_COLOUR_FLAG = 2;
|
||||||
const int GL_DEPTH_BUFFER_BIT = CLEAR_DEPTH_FLAG;
|
const int GL_DEPTH_BUFFER_BIT = CLEAR_DEPTH_FLAG;
|
||||||
const int GL_COLOR_BUFFER_BIT = CLEAR_COLOUR_FLAG;
|
const int GL_COLOR_BUFFER_BIT = CLEAR_COLOUR_FLAG;
|
||||||
|
|
||||||
|
#ifndef __linux__
|
||||||
const int GL_SRC_ALPHA = D3D11_BLEND_SRC_ALPHA;
|
const int GL_SRC_ALPHA = D3D11_BLEND_SRC_ALPHA;
|
||||||
const int GL_ONE_MINUS_SRC_ALPHA = D3D11_BLEND_INV_SRC_ALPHA;
|
const int GL_ONE_MINUS_SRC_ALPHA = D3D11_BLEND_INV_SRC_ALPHA;
|
||||||
const int GL_ONE = D3D11_BLEND_ONE;
|
const int GL_ONE = D3D11_BLEND_ONE;
|
||||||
|
|
@ -263,6 +266,7 @@ const int GL_EQUAL = D3D11_COMPARISON_EQUAL;
|
||||||
const int GL_LEQUAL = D3D11_COMPARISON_LESS_EQUAL;
|
const int GL_LEQUAL = D3D11_COMPARISON_LESS_EQUAL;
|
||||||
const int GL_GEQUAL = D3D11_COMPARISON_GREATER_EQUAL;
|
const int GL_GEQUAL = D3D11_COMPARISON_GREATER_EQUAL;
|
||||||
const int GL_ALWAYS = D3D11_COMPARISON_ALWAYS;
|
const int GL_ALWAYS = D3D11_COMPARISON_ALWAYS;
|
||||||
|
#endif // __linux__
|
||||||
|
|
||||||
const int GL_TEXTURE_MIN_FILTER = 1;
|
const int GL_TEXTURE_MIN_FILTER = 1;
|
||||||
const int GL_TEXTURE_MAG_FILTER = 2;
|
const int GL_TEXTURE_MAG_FILTER = 2;
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,37 @@ typedef unsigned int UINT;
|
||||||
#define WINAPI
|
#define WINAPI
|
||||||
typedef void* HANDLE;
|
typedef void* HANDLE;
|
||||||
typedef int INT;
|
typedef int INT;
|
||||||
|
typedef char CHAR;
|
||||||
|
typedef void* PVOID;
|
||||||
// From PSXSense
|
// From PSXSense
|
||||||
#define XUSER_MAX_COUNT 4
|
#define XUSER_MAX_COUNT 4
|
||||||
#define XUSER_INDEX_ANY 0x000000FF
|
#define XUSER_INDEX_ANY 0x000000FF
|
||||||
|
typedef unsigned long* ULONG_PTR;
|
||||||
|
typedef long LONG;
|
||||||
|
typedef void VOID;
|
||||||
|
|
||||||
#define CRITICAL_SECTION
|
|
||||||
|
typedef struct _RTL_CRITICAL_SECTION {
|
||||||
|
// //
|
||||||
|
// // The following field is used for blocking when there is contention for
|
||||||
|
// // the resource
|
||||||
|
// //
|
||||||
|
//
|
||||||
|
union {
|
||||||
|
ULONG_PTR RawEvent[4];
|
||||||
|
} Synchronization;
|
||||||
|
//
|
||||||
|
// //
|
||||||
|
// // The following three fields control entering and exiting the critical
|
||||||
|
// // section for the resource
|
||||||
|
// //
|
||||||
|
//
|
||||||
|
LONG LockCount;
|
||||||
|
LONG RecursionCount;
|
||||||
|
HANDLE OwningThread;
|
||||||
|
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
|
||||||
|
|
||||||
|
typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue