daily update on 20230911 by nitload youmu, uncertain bug of gl api loading

This commit is contained in:
Nitload
2023-09-11 23:34:34 +08:00
parent c6f4b3dd53
commit 5d701bce0c
172 changed files with 15161 additions and 9614 deletions
+16 -45
View File
@@ -9,48 +9,29 @@
#define SSGC_API __declspec(dllimport)
#endif
#include "framework.h"
#include "GLenv/include/glad/glad.h"
#include "GLenv/include/GLFW/glfw3.h"
#include <immintrin.h>
#pragma region debug
SSGC_API void getApiReporter(uint64_t reporterAddress);
#pragma endregion
#pragma region Internal
extern __m128* defaultVecPtr;
#define ALIGN(simdVec) _mm_loadu_ps((float*)&simdVec)
typedef struct glIOPack
{
//these are gl functions used to create a new window
GLFWwindow* (*createWindow)(
int width,
int height,
const char* title,
GLFWmonitor* monitor,
GLFWwindow* share);
void(*makeContextCurrent)(GLFWwindow* window);
void(*swapInterval)(int interval);
void(*clearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
int(*windowShouldClose)(GLFWwindow* window);
void(*swapBuffer)(GLFWwindow* window);
//these are gl functions used to set a callback
GLFWframebuffersizefun(*SetFramebufferSizeCallback)
(GLFWwindow* window, GLFWframebuffersizefun callback);
}glIOpackage;
typedef struct sse_matmap
{
__m128* c0ptr;
__m128* c1ptr;
__m128* c2ptr;
__m128* c3ptr;
}sse_matmap;
glIOpackage pack;
SSGC_API _inline float __cdecl mulps_sum_internal(__m128 left, __m128 right);
SSGC_API _inline float __cdecl mulps_total_internal(__m128 vec);
@@ -61,22 +42,14 @@ SSGC_API _inline float __cdecl mulps_total_internal(__m128 vec);
SSGC_API glIOpackage loadGLApi(void);
SSGC_API void initGL(void);
SSGC_API int initGLAD(void);
SSGC_API void _cdecl initGL(int majorVersion, int minorVersion);
SSGC_API int _cdecl initGLAD(void);
//linear related function
SSGC_API __m128* __cdecl load(float x, float y, float z, float w);
SSGC_API __m128* __cdecl load_cpy(__m128* ptr);
SSGC_API __m128* __cdecl addps(__m128* ptr1, __m128* ptr2);
SSGC_API __m128* __cdecl subps(__m128* ptr1, __m128* ptr2);
SSGC_API __m128* __cdecl mulps_const(__m128* ptr, float value);
SSGC_API __m128* __cdecl mulps(__m128* ptr1, __m128* ptr2);
SSGC_API _inline float __cdecl mulps_sum(__m128* ptr1, __m128* ptr2);
SSGC_API __m128* __cdecl divps_const(__m128* ptr, float value);
SSGC_API __m128* __cdecl divps(__m128* ptr1, __m128* ptr2);
SSGC_API float __cdecl sqrtss_const(float a);
SSGC_API __m128* __cdecl set_m128ptr_default();
@@ -84,8 +57,6 @@ SSGC_API __m128* __cdecl set_m128ptr_default();
SSGC_API void __cdecl deinitM128(__m128* ptr);
#pragma region mat define