Android: Some tweaking of video plugin

This commit is contained in:
zilmar 2022-07-25 17:52:14 +09:30
parent 6634d4252e
commit 06b303afa0
3 changed files with 26 additions and 26 deletions

View File

@ -293,7 +293,7 @@ void init_combiner()
// Creating a fake texture // Creating a fake texture
glBindTexture(GL_TEXTURE_2D, default_texture); glBindTexture(GL_TEXTURE_2D, default_texture);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture); //glTexImage2D(GL_TEXTURE_2D, 0, 3, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

View File

@ -139,9 +139,9 @@ int buffer_cleared;
// Comment by Ziggy // Comment by Ziggy
// To allocate a new static texture name, take the value (free_texture++) // To allocate a new static texture name, take the value (free_texture++)
int free_texture; int free_texture;
int default_texture; // The infamous "32*1024*1024" is now configurable GLuint default_texture; // The infamous "32*1024*1024" is now configurable
int current_texture; int current_texture;
int depth_texture, color_texture; GLuint depth_texture, color_texture;
int glsl_support = 1; int glsl_support = 1;
int viewport_width, viewport_height, g_viewport_offset = 0, nvidia_viewport_hack = 0; int viewport_width, viewport_height, g_viewport_offset = 0, nvidia_viewport_hack = 0;
int save_w, save_h; int save_w, save_h;
@ -319,9 +319,9 @@ bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_loc
// Allocate static texture names // Allocate static texture names
// The initial value should be big enough to support the maximal resolution // The initial value should be big enough to support the maximal resolution
free_texture = 32 * 2048 * 2048; free_texture = 32 * 2048 * 2048;
default_texture = free_texture++; glGenTextures(1, &default_texture);
color_texture = free_texture++; glGenTextures(1, &color_texture);
depth_texture = free_texture++; glGenTextures(1, &depth_texture);
WriteTrace(TraceGlitch, TraceDebug, "color_format: %d, origin_location: %d, nColBuffers: %d, nAuxBuffers: %d", color_format, origin_location, nColBuffers, nAuxBuffers); WriteTrace(TraceGlitch, TraceDebug, "color_format: %d, origin_location: %d, nColBuffers: %d, nAuxBuffers: %d", color_format, origin_location, nColBuffers, nAuxBuffers);
WriteTrace(TraceGlitch, TraceDebug, "g_width: %d, g_height: %d fullscreen: %d", g_width, g_height, fullscreen); WriteTrace(TraceGlitch, TraceDebug, "g_width: %d, g_height: %d fullscreen: %d", g_width, g_height, fullscreen);

View File

@ -20,26 +20,6 @@ extern int dumping;
#include <Project64-video/trace.h> #include <Project64-video/trace.h>
#include "types.h" #include "types.h"
#define zscale 1.0f
// VP added this utility function
// Returns the bytes per pixel of a given GR texture format
int grTexFormatSize(int fmt);
// 03/07/2015 Comment by cxd4 -- regulated GL state machine debugging using glGetError
extern int grDisplayGLError(const char* message);
extern int packed_pixels_support;
extern int ati_sucks;
extern float largest_supported_anisotropy;
extern int default_texture; // The infamous "32*1024*1024" is now configurable
extern int depth_texture;
void set_depth_shader();
void set_bw_shader();
extern float invtex[2];
extern int buffer_cleared; // Mark that the buffer has been cleared, used to check if we need to reload the texture buffer content
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
@ -87,6 +67,26 @@ extern "C" {
} }
#endif #endif
#define zscale 1.0f
// VP added this utility function
// Returns the bytes per pixel of a given GR texture format
int grTexFormatSize(int fmt);
// 03/07/2015 Comment by cxd4 -- regulated GL state machine debugging using glGetError
extern int grDisplayGLError(const char* message);
extern int packed_pixels_support;
extern int ati_sucks;
extern float largest_supported_anisotropy;
extern GLuint default_texture; // The infamous "32*1024*1024" is now configurable
extern GLuint depth_texture;
void set_depth_shader();
void set_bw_shader();
extern float invtex[2];
extern int buffer_cleared; // Mark that the buffer has been cleared, used to check if we need to reload the texture buffer content
void init_geometry(); void init_geometry();
void init_textures(); void init_textures();
void init_combiner(); void init_combiner();