Jump to content

Ingame Video Settings


Tommek
 Share

Recommended Posts

Window and Context. There would be no doc on exactly doing this. If you are using Lua you can look into App.lua to see how the window and context is created. You would want to :Release() those (maybe it's :Delete() now?) and recreate them (:Create()) inside your UI that allows the user to pick.

 

If using Lua you can make some functions inside App to do that and then you can call those inside your UI, although that would kill your UI textures and everything, so you'd have to recreate all of those as well. Most of the work here is in how you structure your code to make this work seamlessly.

 

You might get an error when you release the context if you have textures and such still active, so you might have to release all the UI first, then the context/window, then recreate the window/context, then recreate your UI and place them back into the options UI like nothing happened.

Link to comment
Share on other sites

Okay. I thaught it should be some general setting.

A downside is that effects can't be globally activated/deactivated globally independently from cameras (you have to code it yourself).

 

Would be good to have at least one Lua example code in official docs smile.png

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

These are all the video settings functions I have found that work with Lua.

 

self.world:SetTessellationQuality() can be 0 1 or 2

self.world:SetLightQuality() can be 0 1 or 2

Texture:SetAnisotropy() can be 1,2,4,8, or 16

self.camera:SetMultisampleMode() can be 1,2,4,8,16, or 32

  • Upvote 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...