mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Tweaks
This commit is contained in:
parent
0a154b548e
commit
b86a912752
2 changed files with 15 additions and 5 deletions
|
@ -48,7 +48,7 @@ GLSLProgram *glsl_create(const char *vshader, const char *fshader) {
|
|||
program->program_ = 0;
|
||||
program->vsh_ = 0;
|
||||
program->fsh_ = 0;
|
||||
strcpy(program->name, vshader + strlen(vshader) - 16);
|
||||
strcpy(program->name, vshader + strlen(vshader) - 15);
|
||||
strcpy(program->vshader_filename, vshader);
|
||||
strcpy(program->fshader_filename, fshader);
|
||||
if (glsl_recompile(program)) {
|
||||
|
@ -82,10 +82,15 @@ void glsl_refresh() {
|
|||
|
||||
bool glsl_recompile(GLSLProgram *program) {
|
||||
struct stat vs, fs;
|
||||
stat(program->vshader_filename, &vs);
|
||||
stat(program->fshader_filename, &fs);
|
||||
program->vshader_mtime = vs.st_mtime;
|
||||
program->fshader_mtime = fs.st_mtime;
|
||||
if (0 == stat(program->vshader_filename, &vs))
|
||||
program->vshader_mtime = vs.st_mtime;
|
||||
else
|
||||
program->vshader_mtime = 0;
|
||||
|
||||
if (0 == stat(program->fshader_filename, &fs))
|
||||
program->fshader_mtime = fs.st_mtime;
|
||||
else
|
||||
program->fshader_mtime = 0;
|
||||
|
||||
size_t sz;
|
||||
char *vsh_src = (char *)VFSReadFile(program->vshader_filename, &sz);
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
#include "math/lin/vec3.h"
|
||||
#include "math/lin/quat.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef far
|
||||
#undef near
|
||||
#endif
|
||||
|
||||
// See http://code.google.com/p/oolongengine/source/browse/trunk/Oolong+Engine2/Math/neonmath/neon_matrix_impl.cpp?spec=svn143&r=143 when we need speed
|
||||
// no wait. http://code.google.com/p/math-neon/
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue