mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 17:00:48 +00:00
- fixed: Automatic brightmap textures should not have names.
- fixed: Setting a glow color switched the green and blue component of the color. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@555 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
e530a50a29
commit
0a818f014a
3 changed files with 22 additions and 12 deletions
|
@ -62,12 +62,12 @@ struct FStateVec4 : public FStateAttr
|
|||
return false;
|
||||
}
|
||||
|
||||
void Set(float x, float y, float z, float w)
|
||||
void Set(float r, float g, float b, float a)
|
||||
{
|
||||
vec[0] = x;
|
||||
vec[1] = z;
|
||||
vec[2] = y;
|
||||
vec[3] = w;
|
||||
vec[0] = r;
|
||||
vec[1] = g;
|
||||
vec[2] = b;
|
||||
vec[3] = a;
|
||||
mLastChange = ++ChangeCounter;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -303,7 +303,7 @@ static bool CheckExtension(const char *ext)
|
|||
{
|
||||
for (unsigned int i = 0; i < m_Extensions.Size(); ++i)
|
||||
{
|
||||
if (strcmp(ext, m_Extensions[i]) == 0) return true;
|
||||
if (stricmp(ext, m_Extensions[i]) == 0) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -418,8 +418,9 @@ static void APIENTRY LoadExtensions()
|
|||
// SM2 only uses shaders for colormaps on camera textures and has no option to use them in general.
|
||||
// On SM2 cards the shaders will be too slow and show visual bugs (at least on GF 6800.)
|
||||
if (strcmp((const char*)glGetString(GL_SHADING_LANGUAGE_VERSION), "1.3") >= 0) gl->shadermodel = 4;
|
||||
else if (CheckExtension("GL_NV_GPU_SHADER4")) gl->shadermodel = 4; // for pre-3.0 drivers that support GF8xxx.
|
||||
else if (CheckExtension("GL_NV_VERTEX_PROGRAM3")) gl->shadermodel = 3;
|
||||
else if (CheckExtension("GL_NV_GPU_shader4")) gl->shadermodel = 4; // for pre-3.0 drivers that support GF8xxx.
|
||||
else if (CheckExtension("GL_EXT_GPU_shader4")) gl->shadermodel = 4; // for pre-3.0 drivers that support GF8xxx.
|
||||
else if (CheckExtension("GL_NV_vertex_program3")) gl->shadermodel = 3;
|
||||
else if (!strstr(gl->vendorstring, "NVIDIA")) gl->shadermodel = 3;
|
||||
else gl->shadermodel = 2; // Only for older NVidia cards which had notoriously bad shader support.
|
||||
|
||||
|
@ -447,7 +448,7 @@ static void APIENTRY LoadExtensions()
|
|||
gl->BufferSubData = (PFNGLBUFFERSUBDATAPROC)wglGetProcAddress("glBufferSubData");
|
||||
gl->MapBuffer = (PFNGLMAPBUFFERPROC)wglGetProcAddress("glMapBuffer");
|
||||
gl->UnmapBuffer = (PFNGLUNMAPBUFFERPROC)wglGetProcAddress("glUnmapBuffer");
|
||||
//gl->flags |= RFL_VBO;
|
||||
gl->flags |= RFL_VBO;
|
||||
}
|
||||
else if (CheckExtension("GL_ARB_vertex_buffer_object"))
|
||||
{
|
||||
|
@ -458,7 +459,7 @@ static void APIENTRY LoadExtensions()
|
|||
gl->BufferSubData = (PFNGLBUFFERSUBDATAPROC)wglGetProcAddress("glBufferSubDataARB");
|
||||
gl->MapBuffer = (PFNGLMAPBUFFERPROC)wglGetProcAddress("glMapBufferARB");
|
||||
gl->UnmapBuffer = (PFNGLUNMAPBUFFERPROC)wglGetProcAddress("glUnmapBufferARB");
|
||||
//gl->flags|=RFL_VBO;
|
||||
gl->flags |= RFL_VBO;
|
||||
}
|
||||
|
||||
if (CheckExtension("GL_ARB_map_buffer_range"))
|
||||
|
@ -482,6 +483,7 @@ static void APIENTRY LoadExtensions()
|
|||
|
||||
gl->flags|=RFL_FRAMEBUFFER;
|
||||
}
|
||||
#if 0
|
||||
else if (CheckExtension("GL_EXT_framebuffer_object") &&
|
||||
CheckExtension("GL_EXT_packed_depth_stencil"))
|
||||
{
|
||||
|
@ -495,15 +497,19 @@ static void APIENTRY LoadExtensions()
|
|||
|
||||
gl->flags|=RFL_FRAMEBUFFER;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (CheckExtension("GL_ARB_texture_buffer_object") &&
|
||||
CheckExtension("GL_ARB_texture_float") &&
|
||||
CheckExtension("GL_EXT_GPU_Shader4") &&
|
||||
CheckExtension("GL_ARB_texture_rg") &&
|
||||
gl->shadermodel == 4)
|
||||
{
|
||||
gl->TexBufferARB = (PFNGLTEXBUFFERARBPROC)wglGetProcAddress("glTexBufferARB");
|
||||
gl->flags|=RFL_TEXTUREBUFFER;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -592,13 +592,15 @@ bool FTexture::ProcessData(unsigned char * buffer, int w, int h, bool ispatch)
|
|||
|
||||
FBrightmapTexture::FBrightmapTexture (FTexture *source)
|
||||
{
|
||||
memcpy(Name, source->Name, 9);
|
||||
memset(Name, 0, sizeof(Name));
|
||||
SourcePic = source;
|
||||
CopySize(source);
|
||||
bNoDecals = source->bNoDecals;
|
||||
Rotations = source->Rotations;
|
||||
UseType = source->UseType;
|
||||
gl_info.bBrightmap = true;
|
||||
id.SetInvalid();
|
||||
SourceLump = -1;
|
||||
}
|
||||
|
||||
FBrightmapTexture::~FBrightmapTexture ()
|
||||
|
@ -637,13 +639,15 @@ int FBrightmapTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotat
|
|||
|
||||
FCloneTexture::FCloneTexture (FTexture *source, int usetype)
|
||||
{
|
||||
memcpy(Name, source->Name, 9);
|
||||
memset(Name, 0, sizeof(Name));
|
||||
SourcePic = source;
|
||||
CopySize(source);
|
||||
bNoDecals = source->bNoDecals;
|
||||
Rotations = source->Rotations;
|
||||
UseType = usetype;
|
||||
gl_info.bBrightmap = false;
|
||||
id.SetInvalid();
|
||||
SourceLump = -1;
|
||||
}
|
||||
|
||||
FCloneTexture::~FCloneTexture ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue