View Issue Details

IDProjectCategoryView StatusLast Update
0004401The Dark ModTexturespublic22.11.2016 17:44
Reporterduzenko Assigned Toduzenko  
PrioritylowSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Platformx32OSwinOS Version10
Product VersionSVN 
Target VersionTDM 2.05Fixed in VersionTDM 2.05 
Summary0004401: Faster texture loading via native OpenGL Mipmap Generation
DescriptionThe idea here is to skip the legacy mipmap generation and offload it to driver.
Another small tweak is to skip internal copying of the original picture data as to save additional milliseconds.
TagsNo tags attached.

Activities

duzenko

duzenko

24.10.2016 19:15

developer   ~0008391

Only "regular" textures w/o border should be affected.
nbohr1more

nbohr1more

25.10.2016 00:50

developer   ~0008392

This doesn't seem to be working as intended.

http://forums.thedarkmod.com/topic/18438-tdm-205/page-2#entry396118
nbohr1more

nbohr1more

25.10.2016 01:15

developer   ~0008393

Last edited: 25.10.2016 01:17

View 3 revisions

Rev 6644

Added:

glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_FALSE);

to prevent mipmap regeneration every frame

"OpenGL 1.4 is required for support for automatic mipmap generation. GL_GENERATE_MIPMAP is part of the texture object state and it is a flag (GL_TRUE or GL_FALSE). If it is set to GL_TRUE, then whenever texture level 0 is updated, the mipmaps will all be regenerated."

https://www.opengl.org/wiki/Common_Mistakes

duzenko

duzenko

25.10.2016 07:01

developer   ~0008394

Moved the nbohr1more's fix to the {} above after encountered a wipelevel crash
duzenko

duzenko

25.10.2016 21:36

developer   ~0008395

Intel driver has a problem with switching GL_GENERATE_MIPMAP on and off.
I added a vendor check as the only workaround available to me.
duzenko

duzenko

26.10.2016 19:28

developer   ~0008396

Added support for glGenerateMipmap(). System requirements should not change.
duzenko

duzenko

26.10.2016 20:12

developer   ~0008397

Added new cvar image_mipmapMode just in case.
duzenko

duzenko

14.11.2016 14:39

developer   ~0008480

Just noticed a compiler warning: == instead of =

Issue History

Date Modified Username Field Change
24.10.2016 19:13 duzenko New Issue
24.10.2016 19:13 duzenko Status new => assigned
24.10.2016 19:13 duzenko Assigned To => duzenko
24.10.2016 19:15 duzenko Note Added: 0008391
25.10.2016 00:50 nbohr1more Note Added: 0008392
25.10.2016 01:15 nbohr1more Note Added: 0008393
25.10.2016 01:16 nbohr1more Note Edited: 0008393 View Revisions
25.10.2016 01:17 nbohr1more Note Edited: 0008393 View Revisions
25.10.2016 04:03 nbohr1more Status assigned => feedback
25.10.2016 07:01 duzenko Note Added: 0008394
25.10.2016 07:01 duzenko Status feedback => assigned
25.10.2016 21:36 duzenko Note Added: 0008395
26.10.2016 19:28 duzenko Note Added: 0008396
26.10.2016 20:12 duzenko Note Added: 0008397
14.11.2016 14:39 duzenko Note Added: 0008480
15.11.2016 14:53 nbohr1more Status assigned => feedback
22.11.2016 17:44 nbohr1more Status feedback => resolved
22.11.2016 17:44 nbohr1more Resolution open => fixed
22.11.2016 17:44 nbohr1more Product Version TDM 2.05 => SVN
22.11.2016 17:44 nbohr1more Fixed in Version => TDM 2.05
22.11.2016 17:44 nbohr1more Summary Faster texture loading => Faster texture loading via native OpenGL Mipmap Generation