mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 15:52:09 +00:00
- removed some obsolete init stuff and some deprecated constants.
This commit is contained in:
parent
4df25d951b
commit
ed5ee4e8d1
3 changed files with 5 additions and 16 deletions
|
@ -138,7 +138,6 @@ void OpenGLFrameBuffer::InitializeState()
|
|||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
glClearDepth(1.0f);
|
||||
glDepthFunc(GL_LESS);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
glEnable(GL_DITHER);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
|
@ -146,7 +145,7 @@ void OpenGLFrameBuffer::InitializeState()
|
|||
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||
glEnable(GL_POLYGON_OFFSET_LINE);
|
||||
glEnable(GL_BLEND);
|
||||
glEnable(GL_DEPTH_CLAMP_NV);
|
||||
glEnable(GL_DEPTH_CLAMP);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
|
@ -154,15 +153,6 @@ void OpenGLFrameBuffer::InitializeState()
|
|||
glAlphaFunc(GL_GEQUAL,0.5f);
|
||||
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
|
||||
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
|
||||
// This was to work around a bug in some older driver. Probably doesn't make sense anymore.
|
||||
glEnable(GL_FOG);
|
||||
glDisable(GL_FOG);
|
||||
|
||||
glHint(GL_FOG_HINT, GL_FASTEST);
|
||||
glFogi(GL_FOG_MODE, GL_EXP);
|
||||
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
|
|
|
@ -140,7 +140,6 @@ void gl_LoadExtensions()
|
|||
if (CheckExtension("GL_ARB_texture_compression")) gl.flags|=RFL_TEXTURE_COMPRESSION;
|
||||
if (CheckExtension("GL_EXT_texture_compression_s3tc")) gl.flags|=RFL_TEXTURE_COMPRESSION_S3TC;
|
||||
if (gl.version >= 4.f && CheckExtension("GL_ARB_buffer_storage")) gl.flags |= RFL_BUFFER_STORAGE;
|
||||
if (gl.version >= 3.2f || CheckExtension("GL_ARB_draw_elements_base_vertex")) gl.flags |= RFL_BASEINDEX;
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&gl.max_texturesize);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
|
|
@ -253,9 +253,9 @@ void FHardwareTexture::LoadImage(unsigned char * buffer,int w, int h, unsigned i
|
|||
// When using separate samplers the stuff below is not needed.
|
||||
// if (gl.flags & RFL_SAMPLER_OBJECTS) return;
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapparam==GL_CLAMP? GL_CLAMP_TO_EDGE : GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapparam==GL_CLAMP? GL_CLAMP_TO_EDGE : GL_REPEAT);
|
||||
clampmode = wrapparam==GL_CLAMP? GLT_CLAMPX|GLT_CLAMPY : 0;
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapparam);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapparam);
|
||||
clampmode = wrapparam==GL_CLAMP_TO_EDGE? GLT_CLAMPX|GLT_CLAMPY : 0;
|
||||
|
||||
if (forcenofiltering)
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ unsigned int FHardwareTexture::CreateTexture(unsigned char * buffer, int w, int
|
|||
unsigned int * pTexID=GetTexID(translation);
|
||||
|
||||
if (texunit != 0) glActiveTexture(GL_TEXTURE0+texunit);
|
||||
LoadImage(buffer, w, h, *pTexID, wrap? GL_REPEAT:GL_CLAMP, alphatexture, texunit);
|
||||
LoadImage(buffer, w, h, *pTexID, wrap? GL_REPEAT:GL_CLAMP_TO_EDGE, alphatexture, texunit);
|
||||
if (texunit != 0) glActiveTexture(GL_TEXTURE0);
|
||||
return *pTexID;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue