Comments (1)
I did this in Zircon Beta #48, however it is ugly. I'll describe the annoying barriers.
So everything that is painful about implementing this in DarkPlaces ...
- Cvars like r_nearest_2d and r_nearest_conchars -- gl_texturemode command does not play nice with those, and will want to override them. So if you honor those 2 cvars, you need to do a 2d pass.
- Now, gl_texturemode command sort of works and sort of doesn't .. you really need to add the "force" command line parameter for it to affect the map textures. Like mentioned above, it will also affect the 2D draw pics like the menu. DarkPlaces texture flags and how they are set on the textures are not friendly to switching the texturemode.
The short version .. I created an extra cvar -- called _gl_texture_mode that stores a value from 0 to 5 that is the index of the texture filtering "table" .. the default value must be set to the default value of 5 because of this .. (you could default 0 = NEAREST if you change defaults of gl_filter_min, etc.)
Changing cvar _gl_texture_mode will fire off the equivalent of "gl_texturemode" command with FORCE. And then force an update of the 2D pics based on the values of cvars r_nearest_2d and r_nearest_conchars.
(This 2nd update of the 2D pics must be done otherwise gl_texturemode will apply itself to the menu you are using an make it look muddy or not or just "wrong").
qbool gl_filter_force = false;
int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR;
int gl_filter_mag = GL_LINEAR;
static glmode_t gl_texture_modes[6] =
{
{"GL_NEAREST", GL_NEAREST, GL_NEAREST},
{"GL_LINEAR", GL_LINEAR, GL_LINEAR},
{"GL_NEAREST_MIPMAP_NEAREST", GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST},
{"GL_LINEAR_MIPMAP_NEAREST", GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR},
{"GL_NEAREST_MIPMAP_LINEAR", GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST},
{"GL_LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR}
};
End results are great, but you don't really want to see how the "hotdog factory" makes the hotdogs. 😉
Note another secret sauce component ... Zircon does automatic console scale that tries to get vid_conwidth and vid_conheight to be a clean division of vid.width and vid.height to make the text really nice and sharp.
I'm pointing this out because DarkPlaces, the ratio between vid.width and vid_conwidth might be a non-clean division .. making it difficult to use r_nearest_2d and r_nearest_conchars because the text won't look crisp.
Zircon Beta #48: https://www.moddb.com/mods/zircon-engine/downloads/zircon-beta-release-48-win64-binary-source
from darkplaces.
Related Issues (20)
- Quake Mods With quake.rc lacking "exec default.cfg" HOT 7
- modlist.txt looks for mods in c:\ on windows HOT 2
- makestatic on func_illusionary loses alpha
- Nehahra support is incomplete HOT 8
- Explosions leave scorch marks on water surfaces HOT 1
- Quake particle can be too small or big depending on distance
- Colour in screenshots are washed out and low contrast HOT 2
- particlefont.tga affects shape of Quake particles
- Remove Nexuiz-specific code and compile support HOT 1
- OBJ Support For MD3 Tags For Attachment Tutorial
- Improve sound/audio propagation and acoustics HOT 4
- Turning with the keys is too fast HOT 4
- ''cvar_set: variable campaign not found'' HOT 9
- Support more than just linear falloff attenuation on rtlights
- Option to restore old Darkplaces viewbob
- Can not see entities when outside the level
- New Immortal mod crashes to desktop with out of memory error HOT 1
- Allow texture variants without diffuse texture
- Explosions are missing default DarkPlaces particles HOT 1
- v_isometric_flipcullface causes console to be invisible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkplaces.