fix(vertexattrib): add glVertexAttribI*ui, fixing physics mod

This commit is contained in:
Swung0x48 2025-02-19 11:48:15 +08:00
parent 71e3fedb64
commit 89a717f2eb
4 changed files with 56 additions and 3 deletions

View File

@ -39,6 +39,7 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
gl/glsl/glsl_for_es.cpp
gl/glsl/cache.cpp
gl/glsl/preConvertedGlsl.cpp
gl/vertexattrib.c
glx/lookup.c
egl/egl.c
egl/loader.c

View File

@ -355,9 +355,9 @@ STUB_FUNCTION_HEAD(void, glEndConditionalRender,void ) STUB_FUNCTION_END_NO_RETU
STUB_FUNCTION_HEAD(void, glVertexAttribI1i, GLuint index, GLint x) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI1i,index,x)
STUB_FUNCTION_HEAD(void, glVertexAttribI2i, GLuint index, GLint x, GLint y) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI2i,index,x,y)
STUB_FUNCTION_HEAD(void, glVertexAttribI3i, GLuint index, GLint x, GLint y, GLint z) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI3i,index,x,y,z)
STUB_FUNCTION_HEAD(void, glVertexAttribI1ui, GLuint index, GLuint x) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI1ui,index,x)
STUB_FUNCTION_HEAD(void, glVertexAttribI2ui, GLuint index, GLuint x, GLuint y) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI2ui,index,x,y)
STUB_FUNCTION_HEAD(void, glVertexAttribI3ui, GLuint index, GLuint x, GLuint y, GLuint z) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI3ui,index,x,y,z)
//STUB_FUNCTION_HEAD(void, glVertexAttribI1ui, GLuint index, GLuint x) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI1ui,index,x)
//STUB_FUNCTION_HEAD(void, glVertexAttribI2ui, GLuint index, GLuint x, GLuint y) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI2ui,index,x,y)
//STUB_FUNCTION_HEAD(void, glVertexAttribI3ui, GLuint index, GLuint x, GLuint y, GLuint z) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI3ui,index,x,y,z)
STUB_FUNCTION_HEAD(void, glVertexAttribI1iv, GLuint index, const GLint *v) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI1iv,index,v)
STUB_FUNCTION_HEAD(void, glVertexAttribI2iv, GLuint index, const GLint *v) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI2iv,index,v)
STUB_FUNCTION_HEAD(void, glVertexAttribI3iv, GLuint index, const GLint *v) STUB_FUNCTION_END_NO_RETURN(void, glVertexAttribI3iv,index,v)

View File

@ -0,0 +1,25 @@
//
// Created by Swung 0x48 on 2025/2/19.
//
#include "vertexattrib.h"
#define DEBUG 0
void glVertexAttribI1ui(GLuint index, GLuint x) {
LOG()
LOAD_GLES_FUNC(glVertexAttribI4ui)
gles_glVertexAttribI4ui(index, x, 0, 0, 0);
}
void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y) {
LOG()
LOAD_GLES_FUNC(glVertexAttribI4ui)
gles_glVertexAttribI4ui(index, x, y, 0, 0);
}
void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z) {
LOG()
LOAD_GLES_FUNC(glVertexAttribI4ui)
gles_glVertexAttribI4ui(index, x, y, z, 0);
}

View File

@ -0,0 +1,27 @@
//
// Created by Swung 0x48 on 2025/2/19.
//
#ifndef MOBILEGLUES_VERTEXATTRIB_H
#define MOBILEGLUES_VERTEXATTRIB_H
#include "../includes.h"
#include "gl.h"
#include "glcorearb.h"
#include "log.h"
#include "../gles/loader.h"
#include "mg.h"
#ifdef __cplusplus
extern "C" {
#endif
GLAPI GLAPIENTRY void glVertexAttribI1ui(GLuint index, GLuint x);
GLAPI GLAPIENTRY void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y);
GLAPI GLAPIENTRY void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z);
#ifdef __cplusplus
}
#endif
#endif //MOBILEGLUES_VERTEXATTRIB_H