update things
This commit is contained in:
parent
8ea9cdf08c
commit
b60e3a0ef6
3 changed files with 22 additions and 6 deletions
2
LICENSE
2
LICENSE
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2025, Fishsoup
|
Copyright (c) 2025-2026, Pyrite development team
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,21 @@
|
||||||
#include <af_common.h>
|
#include <af_common.h>
|
||||||
|
|
||||||
|
static void err(const char* path, GLuint shader) {
|
||||||
|
GLint len, ret;
|
||||||
|
char* e;
|
||||||
|
|
||||||
|
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len);
|
||||||
|
|
||||||
|
e = malloc(len);
|
||||||
|
e[len] = 0;
|
||||||
|
|
||||||
|
glGetShaderInfoLog(shader, len, &ret, e);
|
||||||
|
|
||||||
|
fprintf(stderr, "%s: %s\n", path, e);
|
||||||
|
|
||||||
|
free(e);
|
||||||
|
}
|
||||||
|
|
||||||
int gl_shader(GLuint* r, const char* vs, const char* fs) {
|
int gl_shader(GLuint* r, const char* vs, const char* fs) {
|
||||||
GLuint vsi;
|
GLuint vsi;
|
||||||
GLuint fsi;
|
GLuint fsi;
|
||||||
|
|
@ -49,24 +65,24 @@ int gl_shader(GLuint* r, const char* vs, const char* fs) {
|
||||||
glCompileShader(vsi);
|
glCompileShader(vsi);
|
||||||
glGetShaderiv(vsi, GL_COMPILE_STATUS, &st);
|
glGetShaderiv(vsi, GL_COMPILE_STATUS, &st);
|
||||||
if(!st) {
|
if(!st) {
|
||||||
|
err(vs, vsi);
|
||||||
|
|
||||||
glDeleteShader(vsi);
|
glDeleteShader(vsi);
|
||||||
glDeleteShader(fsi);
|
glDeleteShader(fsi);
|
||||||
free(vss);
|
free(vss);
|
||||||
free(fss);
|
free(fss);
|
||||||
|
|
||||||
printf("%s: compilation failure\n", vs);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
glCompileShader(fsi);
|
glCompileShader(fsi);
|
||||||
glGetShaderiv(fsi, GL_COMPILE_STATUS, &st);
|
glGetShaderiv(fsi, GL_COMPILE_STATUS, &st);
|
||||||
if(!st) {
|
if(!st) {
|
||||||
|
err(fs, fsi);
|
||||||
|
|
||||||
glDeleteShader(vsi);
|
glDeleteShader(vsi);
|
||||||
glDeleteShader(fsi);
|
glDeleteShader(fsi);
|
||||||
free(vss);
|
free(vss);
|
||||||
free(fss);
|
free(fss);
|
||||||
|
|
||||||
printf("%s: compilation failure\n", fs);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#define AF_DEFAULT_PORT 5312
|
#define AF_DEFAULT_PORT 5312
|
||||||
#define AF_VERSION "0.0.0"
|
#define AF_VERSION "0.0.0"
|
||||||
#define AF_COPYRIGHT "Copyright (C) 2025 Fishsoup"
|
#define AF_COPYRIGHT "Copyright (C) 2025-2026 Pyrite development team"
|
||||||
|
|
||||||
enum AF_USER_PACKETS {
|
enum AF_USER_PACKETS {
|
||||||
AF_PACKET_HELLO = FISHSOUP_PACKET_USER,
|
AF_PACKET_HELLO = FISHSOUP_PACKET_USER,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue