daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
#ifndef SSG
|
||||
#define SSG
|
||||
#ifndef SSC
|
||||
#define SSC
|
||||
|
||||
|
||||
|
||||
|
||||
#define SSG_Api
|
||||
#define SSC_Api
|
||||
|
||||
#include "ssgc_framework.h"
|
||||
#include "ssgc_internal.h"
|
||||
@@ -13,6 +10,10 @@
|
||||
#include "glfw3.h"
|
||||
#include <immintrin.h>
|
||||
|
||||
#define STBIDEF SSCAPI
|
||||
#include "stb_image.h"
|
||||
|
||||
|
||||
#pragma comment(lib,"glfw3.lib")
|
||||
|
||||
#if __cplusplus
|
||||
@@ -32,21 +33,30 @@ extern "C"
|
||||
extern __m128* defaultVecPtr;
|
||||
#define ALIGN(simdVec) _mm_loadu_ps(&simdVec)
|
||||
|
||||
typedef struct Image {
|
||||
int width;
|
||||
int height;
|
||||
int channel;
|
||||
char* pixelPtr;
|
||||
}Image;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
typedef char* (*imageLoader)(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||
|
||||
SSCAPI char* infolog[512];
|
||||
|
||||
|
||||
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion);
|
||||
SSCAPI int _cdecl initGLAD(void);
|
||||
SSCAPI unsigned int _cdecl loadShaderCode(char* const shaderCode, GLint shadertype);
|
||||
SSCAPI unsigned int _cdecl linkShaderProgram(GLuint shadertype);
|
||||
SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion);
|
||||
SSCAPI unsigned int SSCDECL loadShaderCode(char* const shaderCode, GLint shadertype);
|
||||
SSCAPI unsigned int SSCDECL linkShaderProgram(GLuint shadertype);
|
||||
SSCAPI void SSCDECL loadImageData(char* location, Image* out, imageLoader loader);
|
||||
SSCAPI void _cdecl setCurrentGLContext(GLFWwindow* window, GladGLContext* contextPtr);
|
||||
SSCAPI char* _cdecl readLog(void);
|
||||
|
||||
//linear related function
|
||||
|
||||
SSCAPI __m128* __cdecl set_m128ptr_default();
|
||||
SSCAPI __m128* SSCDECL set_m128ptr_default();
|
||||
|
||||
|
||||
#pragma region mat define
|
||||
|
||||
@@ -75,7 +85,6 @@ extern "C"
|
||||
|
||||
SSCAPI _inline void __cdecl transpose2to3(matrix2map* source, matrix3map* target);
|
||||
SSCAPI _inline void __cdecl transpose2to4(matrix2map* source, matrix4map* target);
|
||||
|
||||
SSCAPI _inline void __cdecl deinit_mat2(matrix2map* mat);
|
||||
|
||||
#pragma endregion
|
||||
@@ -86,7 +95,6 @@ extern "C"
|
||||
SSCAPI __inline void _cdecl transpose3to2(matrix3map* source, matrix2map* target);
|
||||
SSCAPI __inline void _cdecl transpose3to3(matrix3map* source, matrix3map* target);
|
||||
SSCAPI __inline void _cdecl transpose3to4(matrix3map* source, matrix4map* target);
|
||||
|
||||
SSCAPI _inline float _cdecl det_mat3(matrix3map* mat);
|
||||
SSCAPI __inline float det_mat3_internal(__m128 const c1, __m128 const c2, __m128 const c3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user