conflict moment
This commit is contained in:
1 parent
200d971d35
commit
91a3b288ef
2 files changed
+6
-51
No files matched your search
@@ -432,9 +432,11 @@ static PFNglCopyTexImage2D pglCopyTexImage2D;
|
||||
typedef void (APIENTRY * PFNglCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
static PFNglCopyTexSubImage2D pglCopyTexSubImage2D;
|
||||
|
||||
#ifdef GL_VERSION_3_0
|
||||
/* 3.0 functions */
|
||||
typedef void (APIENTRY * PFNglGenerateMipmap) (GLenum target);
|
||||
static PFNglGenerateMipmap pglGenerateMipmap;
|
||||
#endif
|
||||
|
||||
/* 3.0 functions for framebuffers and renderbuffers */
|
||||
typedef void (APIENTRY * PFNglGenFramebuffers) (GLsizei n, GLuint *ids);
|
||||
@@ -742,7 +744,9 @@ void SetupGLFunc4(void)
|
||||
pglUniform3fv = GetGLFunc("glUniform3fv");
|
||||
pglGetUniformLocation = GetGLFunc("glGetUniformLocation");
|
||||
|
||||
#ifdef GL_VERSION_3_0
|
||||
pglGenerateMipmap = GetGLFunc("glGenerateMipmap");
|
||||
#endif
|
||||
|
||||
if (GLFramebuffer_IsFuncAvailible())
|
||||
{
|
||||
@@ -1102,40 +1106,6 @@ void GLFramebuffer_Disable(void)
|
||||
pglBindRenderbuffer(GL_RENDERBUFFER, 0);
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
// DeleteTexture : Deletes a texture from the GPU and frees its data
|
||||
// -----------------+
|
||||
EXPORT void HWRAPI(DeleteTexture) (GLMipmap_t *pTexInfo)
|
||||
{
|
||||
FTextureInfo *head = TexCacheHead;
|
||||
|
||||
if (!pTexInfo)
|
||||
return;
|
||||
else if (pTexInfo->downloaded)
|
||||
pglDeleteTextures(1, (GLuint *)&pTexInfo->downloaded);
|
||||
|
||||
while (head)
|
||||
{
|
||||
if (head->downloaded == pTexInfo->downloaded)
|
||||
{
|
||||
if (head->next)
|
||||
head->next->prev = head->prev;
|
||||
else // no next -> tail is being deleted -> update TexCacheTail
|
||||
TexCacheTail = head->prev;
|
||||
if (head->prev)
|
||||
head->prev->next = head->next;
|
||||
else // no prev -> head is being deleted -> update TexCacheHead
|
||||
TexCacheHead = head->next;
|
||||
free(head);
|
||||
break;
|
||||
}
|
||||
|
||||
head = head->next;
|
||||
}
|
||||
|
||||
pTexInfo->downloaded = 0;
|
||||
}
|
||||
|
||||
|
||||
// -----------------+
|
||||
// Flush : flush OpenGL textures
|
||||
|
||||
+2
-17
@@ -162,16 +162,8 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
SetupGLFunc4();
|
||||
|
||||
granisotropicmode_cons_t[1].value = maximumAnisotropy;
|
||||
|
||||
if (cv_vidwait.value)
|
||||
{
|
||||
if (SDL_GL_SetSwapInterval(-1) != 0) // try async vsync
|
||||
SDL_GL_SetSwapInterval(1); // normal vsync
|
||||
}
|
||||
else
|
||||
SDL_GL_SetSwapInterval(0);
|
||||
|
||||
//SDL_GL_SetSwapInterval(cv_vidwait.value ? -1 : 0);
|
||||
SDL_GL_SetSwapInterval(cv_vidwait.value ? 1 : 0);
|
||||
|
||||
// The screen textures need to be flushed if the width or height change so that they be remade for the correct size
|
||||
if (screen_width != w || screen_height != h)
|
||||
@@ -211,14 +203,7 @@ void OglSdlFinishUpdate(boolean waitvbl)
|
||||
int sdlw, sdlh;
|
||||
if (oldwaitvbl != waitvbl)
|
||||
{
|
||||
if (waitvbl)
|
||||
{
|
||||
if (SDL_GL_SetSwapInterval(-1) != 0) // try async vsync
|
||||
SDL_GL_SetSwapInterval(1); // normal vsync
|
||||
}
|
||||
else
|
||||
SDL_GL_SetSwapInterval(0);
|
||||
//SDL_GL_SetSwapInterval(waitvbl ? -1 : 0);
|
||||
SDL_GL_SetSwapInterval(waitvbl ? 1 : 0);
|
||||
}
|
||||
|
||||
oldwaitvbl = waitvbl;
|
||||
|
||||
Reference in new issue
Block a user