mirror of https://github.com/snes9xgit/snes9x.git
Various fixes.
This commit is contained in:
parent
cc8fd9c231
commit
09ea2d0e67
|
@ -237,14 +237,6 @@ static void ReduceToPath(char* filename)
|
|||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
static float npot(float desired)
|
||||
{
|
||||
float out = 256.0;
|
||||
while (out < desired)
|
||||
out *= 2;
|
||||
return out;
|
||||
}
|
||||
|
||||
const GLfloat CGLCG::lut_coords[8] = { 0, 0, 1, 0, 1, 1, 0, 1 };
|
||||
|
||||
CGLCG::CGLCG(CGcontext cgContext)
|
||||
|
@ -640,10 +632,8 @@ void CGLCG::Render(GLuint& origTex,
|
|||
shaderPasses[i].outputSize.y = viewportSize.y;
|
||||
}
|
||||
|
||||
/* use next power of two in both directions
|
||||
*/
|
||||
float texSize = npot(max(shaderPasses[i].outputSize.x, shaderPasses[i].outputSize.y));
|
||||
shaderPasses[i].textureSize.x = shaderPasses[i].textureSize.y = texSize;
|
||||
shaderPasses[i].textureSize.x = shaderPasses[i].outputSize.x;
|
||||
shaderPasses[i].textureSize.y = shaderPasses[i].outputSize.y;
|
||||
|
||||
/* set size of output texture
|
||||
*/
|
||||
|
|
|
@ -391,7 +391,7 @@ bool GLSLShader::load_shader (char *filename)
|
|||
GL_VERTEX_SHADER,
|
||||
&vertex_shader) || !vertex_shader)
|
||||
{
|
||||
printf("Couldn't compile vertex shader.\n");
|
||||
printf("Couldn't compile vertex shader in %s.\n", p->filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ bool GLSLShader::load_shader (char *filename)
|
|||
GL_FRAGMENT_SHADER,
|
||||
&fragment_shader) || !fragment_shader)
|
||||
{
|
||||
printf("Couldn't compile fragment shader\n");
|
||||
printf("Couldn't compile fragment shader in %s.\n", p->filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -976,8 +976,8 @@ void GLSLShader::save (const char *filename)
|
|||
{
|
||||
outs("filter_linear", p->filter == GL_LINEAR ? "true" : "false");
|
||||
}
|
||||
//outs ("wrap_mode", wrap_mode_enum_to_string(p->wrap_mode));
|
||||
//outs ("alias", p->alias);
|
||||
outs ("wrap_mode", wrap_mode_enum_to_string(p->wrap_mode));
|
||||
outs ("alias", p->alias);
|
||||
outs ("float_framebuffer", p->fp ? "true" : "false");
|
||||
outs ("srgb_framebuffer", p->srgb ? "true" : "false");
|
||||
outs ("scale_type_x", scale_enum_to_string(p->scale_type_x));
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
#ifndef __SHADER_PLATFORM_H
|
||||
#define __SHADER_PLATFORM_H
|
||||
|
||||
#include "port.h"
|
||||
|
||||
#ifdef SNES9X_GTK
|
||||
#include <epoxy/gl.h>
|
||||
#include <epoxy/glx.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define chdir(dir) _chdir(dir)
|
||||
#define realpath(src, resolved) _fullpath(resolved, src, PATH_MAX)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SHADER_PLATFORM_H */
|
||||
|
|
Loading…
Reference in New Issue