mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
Arkadi's mach64 patch
This commit is contained in:
parent
c46b58f4b5
commit
3ab4eb6545
4 changed files with 17 additions and 5 deletions
|
@ -43,6 +43,8 @@ extern GLenum gl_mtex_enum;
|
||||||
extern float gldepthmin, gldepthmax;
|
extern float gldepthmin, gldepthmax;
|
||||||
extern int texture_extension_number;
|
extern int texture_extension_number;
|
||||||
|
|
||||||
|
extern qboolean gl_feature_mach64;
|
||||||
|
|
||||||
void GL_EndRendering (void);
|
void GL_EndRendering (void);
|
||||||
void GL_BeginRendering (int *x, int *y, int *width, int *height);
|
void GL_BeginRendering (int *x, int *y, int *width, int *height);
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include "QF/GL/funcs.h"
|
#include "QF/GL/funcs.h"
|
||||||
#include "QF/GL/qf_explosions.h"
|
#include "QF/GL/qf_explosions.h"
|
||||||
#include "QF/GL/qf_textures.h"
|
#include "QF/GL/qf_textures.h"
|
||||||
|
#include "QF/GL/qf_vid.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "r_cvar.h"
|
#include "r_cvar.h"
|
||||||
|
@ -85,6 +86,8 @@ particle_new (ptype_t type, int texnum, const vec3_t org, float scale,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
if(gl_feature_mach64 && type == pt_smokecloud && texnum == part_tex_smoke )
|
||||||
|
return;
|
||||||
|
|
||||||
part = &particles[numparticles++];
|
part = &particles[numparticles++];
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ int part_tex_spark;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int part_tex;
|
int part_tex;
|
||||||
|
GLint part_tex_internal_format = 2;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -67,7 +68,7 @@ GDT_InitParticleTexture (void)
|
||||||
qfglBindTexture (GL_TEXTURE_2D, part_tex);
|
qfglBindTexture (GL_TEXTURE_2D, part_tex);
|
||||||
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
qfglTexImage2D (GL_TEXTURE_2D, 0, 2, 64, 64, 0, GL_LUMINANCE_ALPHA,
|
qfglTexImage2D (GL_TEXTURE_2D, 0, part_tex_internal_format, 64, 64, 0, GL_LUMINANCE_ALPHA,
|
||||||
GL_UNSIGNED_BYTE, data);
|
GL_UNSIGNED_BYTE, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,8 +134,7 @@ GDT_InitSmokeParticleTexture (void)
|
||||||
|
|
||||||
noise_plasma (&noise1[0][0], 32);
|
noise_plasma (&noise1[0][0], 32);
|
||||||
noise_diamondsquare (&noise2[0][0], 32, 4);
|
noise_diamondsquare (&noise2[0][0], 32, 4);
|
||||||
for (y = 0; y < 32; y++)
|
for (y = 0; y < 32; y++) {
|
||||||
{
|
|
||||||
dy2 = y - 16;
|
dy2 = y - 16;
|
||||||
dy2 *= dy2;
|
dy2 *= dy2;
|
||||||
for (x = 0; x < 32; x++) {
|
for (x = 0; x < 32; x++) {
|
||||||
|
@ -159,6 +159,8 @@ GDT_InitSmokeParticleTexture (void)
|
||||||
void
|
void
|
||||||
GDT_Init (void)
|
GDT_Init (void)
|
||||||
{
|
{
|
||||||
|
if (gl_feature_mach64)
|
||||||
|
part_tex_internal_format = 4;
|
||||||
GDT_InitParticleTexture ();
|
GDT_InitParticleTexture ();
|
||||||
GDT_InitDotParticleTexture ();
|
GDT_InitDotParticleTexture ();
|
||||||
GDT_InitSparkParticleTexture ();
|
GDT_InitSparkParticleTexture ();
|
||||||
|
|
|
@ -86,6 +86,8 @@ GLenum gl_mtex_enum = GL_TEXTURE0_ARB;
|
||||||
QF_glColorTableEXT qglColorTableEXT = NULL;
|
QF_glColorTableEXT qglColorTableEXT = NULL;
|
||||||
qboolean is8bit = false;
|
qboolean is8bit = false;
|
||||||
|
|
||||||
|
qboolean gl_feature_mach64 = false;
|
||||||
|
|
||||||
cvar_t *gl_multitexture;
|
cvar_t *gl_multitexture;
|
||||||
cvar_t *gl_vaelements_max;
|
cvar_t *gl_vaelements_max;
|
||||||
cvar_t *gl_screenshot_byte_swap;
|
cvar_t *gl_screenshot_byte_swap;
|
||||||
|
@ -297,6 +299,9 @@ GL_Init_Common (void)
|
||||||
|
|
||||||
CheckMultiTextureExtensions ();
|
CheckMultiTextureExtensions ();
|
||||||
CheckVertexArraySize ();
|
CheckVertexArraySize ();
|
||||||
|
|
||||||
|
if (strstr(gl_renderer, "Mesa DRI Mach64"))
|
||||||
|
gl_feature_mach64 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue