#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
void (*_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices);
GLint (*_glGetUniformLocation)(GLuint program,const GLchar *name);
GLint $glGetUniformLocation(GLuint program,const GLchar *name)
{
NSLog(@"%s",name);
return _glGetUniformLocation(program,name);
}
//disable metal framework for unity
%hook NSBundle
+ (id)bundleWithPath:(NSString *)fullPath
{
if ([fullPath isEqual:@"/System/Library/Frameworks/Metal.framework"])
{
NSLog(@"distable metal framework");
return NULL;
}
return %orig(fullPath);
}
%end
#define _DRAW_RGB_ 29,0,28
void $glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) {
_glDrawElements(mode, count, type, indices);
if (mode != GL_TRIANGLES || count < 1000) return;{
GLint currProgram;
glGetIntegerv(GL_CURRENT_PROGRAM, &currProgram);
GLint id = _glGetUniformLocation(currProgram, "_Color4"); // _Color4 is shader name
if (id == -1) return;
// draw elements on 2d screen coordinates level
glDepthRangef(1, 0.5);
// enable and write rgb into frame buffer
glColorMask(_DRAW_RGB_, 0);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
// draw chams on elements
_glDrawElements(mode, count, type, indices);
// now cleaning up
glDepthRangef(0.5, 1);
glColorMask(1, 1, 1, 1);
glDisable(GL_BLEND);
}
}
%ctor {
// Wallhack
MSHookFunction((void*)MSFindSymbol(0, "_glDrawElements"), (void *)$glDrawElements, (void **)&_glDrawElements);
MSHookFunction((void*)MSFindSymbol(0, "_glGetUniformLocation"), (void *)$glGetUniformLocation, (void **)&_glGetUniformLocation);
}
Why did you put the post's code in a response?#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
void (*_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices);
GLint (*_glGetUniformLocation)(GLuint program,const GLchar *name);
GLint $glGetUniformLocation(GLuint program,const GLchar *name)
{
NSLog(@"%s",name);
return _glGetUniformLocation(program,name);
}
//disable metal framework for unity
%hook NSBundle
+ (id)bundleWithPath:(NSString *)fullPath
{
if ([fullPath isEqual:@"/System/Library/Frameworks/Metal.framework"])
{
NSLog(@"distable metal framework");
return NULL;
}
return %orig(fullPath);
}
%end
#define _DRAW_RGB_ 29,0,28
void $glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) {
_glDrawElements(mode, count, type, indices);
if (mode != GL_TRIANGLES || count < 1000) return;{
GLint currProgram;
glGetIntegerv(GL_CURRENT_PROGRAM, &currProgram);
GLint id = _glGetUniformLocation(currProgram, "_Color4"); // _Color4 is shader name
if (id == -1) return;
// draw elements on 2d screen coordinates level
glDepthRangef(1, 0.5);
// enable and write rgb into frame buffer
glColorMask(_DRAW_RGB_, 0);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
// draw chams on elements
_glDrawElements(mode, count, type, indices);
// now cleaning up
glDepthRangef(0.5, 1);
glColorMask(1, 1, 1, 1);
glDisable(GL_BLEND);
}
}
%ctor {
// Wallhack
MSHookFunction((void*)MSFindSymbol(0, "_glDrawElements"), (void *)$glDrawElements, (void **)&_glDrawElements);
MSHookFunction((void*)MSFindSymbol(0, "_glGetUniformLocation"), (void *)$glGetUniformLocation, (void **)&_glGetUniformLocation);
}
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
void (*_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices);
GLint (*_glGetUniformLocation)(GLuint program,const GLchar *name);
GLint $glGetUniformLocation(GLuint program,const GLchar *name)
{
NSLog(@"%s",name);
return _glGetUniformLocation(program,name);
}
//disable metal framework for unity
%hook NSBundle
+ (id)bundleWithPath:(NSString *)fullPath
{
if ([fullPath isEqual:@"/System/Library/Frameworks/Metal.framework"])
{
NSLog(@"distable metal framework");
return NULL;
}
return %orig(fullPath);
}
%end
#define _DRAW_RGB_ 29,0,28
void $glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) {
_glDrawElements(mode, count, type, indices);
if (mode != GL_TRIANGLES || count < 1000) return;{
GLint currProgram;
glGetIntegerv(GL_CURRENT_PROGRAM, &currProgram);
GLint id = _glGetUniformLocation(currProgram, "_Color4"); // _Color4 is shader name
if (id == -1) return;
// draw elements on 2d screen coordinates level
glDepthRangef(1, 0.5);
// enable and write rgb into frame buffer
glColorMask(_DRAW_RGB_, 0);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
// draw chams on elements
_glDrawElements(mode, count, type, indices);
// now cleaning up
glDepthRangef(0.5, 1);
glColorMask(1, 1, 1, 1);
glDisable(GL_BLEND);
}
}
%ctor {
// Wallhack
MSHookFunction((void*)MSFindSymbol(0, "_glDrawElements"), (void *)$glDrawElements, (void **)&_glDrawElements);
MSHookFunction((void*)MSFindSymbol(0, "_glGetUniformLocation"), (void *)$glGetUniformLocation, (void **)&_glGetUniformLocation);
}
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
void (*_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void *indices);
GLint (*_glGetUniformLocation)(GLuint program,const GLchar *name);
GLint $glGetUniformLocation(GLuint program,const GLchar *name)
{
NSLog(@"%s",name);
return _glGetUniformLocation(program,name);
}
//disable metal framework for unity
%hook NSBundle
+ (id)bundleWithPath:(NSString *)fullPath
{
if ([fullPath isEqual:@"/System/Library/Frameworks/Metal.framework"])
{
NSLog(@"distable metal framework");
return NULL;
}
return %orig(fullPath);
}
%end
#define _DRAW_RGB_ 29,0,28
void $glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) {
_glDrawElements(mode, count, type, indices);
if (mode != GL_TRIANGLES || count < 1000) return;{
GLint currProgram;
glGetIntegerv(GL_CURRENT_PROGRAM, &currProgram);
GLint id = _glGetUniformLocation(currProgram, "_Color4"); // _Color4 is shader name
if (id == -1) return;
// draw elements on 2d screen coordinates level
glDepthRangef(1, 0.5);
// enable and write rgb into frame buffer
glColorMask(_DRAW_RGB_, 0);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
// draw chams on elements
_glDrawElements(mode, count, type, indices);
// now cleaning up
glDepthRangef(0.5, 1);
glColorMask(1, 1, 1, 1);
glDisable(GL_BLEND);
}
}
%ctor {
// Wallhack
MSHookFunction((void*)MSFindSymbol(0, "_glDrawElements"), (void *)$glDrawElements, (void **)&_glDrawElements);
MSHookFunction((void*)MSFindSymbol(0, "_glGetUniformLocation"), (void *)$glGetUniformLocation, (void **)&_glGetUniformLocation);
}
You don’t need any files just put the import lines in your tweak code lmfao. Including this shit is like including sum like <vector> or <string>Need the header files for to work lol
bro i wrote that shit in 2022 lol i think I know that way by now esp and Chams is ez lol we all gotta learn somewhere XDYou don’t need any files just put the import lines in your tweak code lmfao. Including this shit is like including sum like <vector> or <string>
bro i wrote that shit in 2022 lol i think I know that way by now esp and Chams is ez lol XD
Ion really care I said that shit so you don’t be confusing someone else “xd”bro i wrote that shit in 2022 lol i think I know that way by now esp and Chams is ez lol we all gotta learn somewhere XD
Oh fair enough XDIon really care I said that shit so you don’t be confusing someone else “xd”
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies