Jump to content

Less memory usage by using OpenGL


Recommended Posts

openGL saves me a bit over 1gb ram on my system. got an i5-3570k (3.4GHz overclocked to 4.20GHz) 8gb ram and a radeon HD5770. I also run -popupwindow so I can alt tab without actualy causeing the issues with KSP and alt tabing.

For the most part performance is on par or slightly better than without openGL. with all the mods (also runing ATM) I was hovering around 3.1 gb of ram usage without openGL. With its around 1.9. Video quality is about the same and FPS is possibly a touch faster although hard to tell. it does take a second or two longer on scene change on average with openGL and I frequently get some FPS stutter and screen tearing for another couple of seconds afterwards but once everything stabilizes things are golden.

Overall a much better option than runing 64bit. at 3.1gb it didnt take much for a memory leak or a large craft to crash the 32bit game. 64 bit avoids the memory crash but will just crash on its own randomly. openGL only had mild but acceptable drawbacks and alows for stable gameplay.

Link to post
Share on other sites

I definitely get less RAM Usage, and higher FPS. However, I have an odd issue when running OpenGL, my Simulation Speed tanks bigtime.

As an example, launching the same rocket in DX mode, It is a large rocket with a fair few parts. In DX Mode, it stays green with some very occasional flicks to yellow on sim speed. In OpenGL Mode, it stays yellow and is noticeably slower, sim speed wise.

Definitely rather odd.

Link to post
Share on other sites
I definitely get less RAM Usage, and higher FPS. However, I have an odd issue when running OpenGL, my Simulation Speed tanks bigtime.

As an example, launching the same rocket in DX mode, It is a large rocket with a fair few parts. In DX Mode, it stays green with some very occasional flicks to yellow on sim speed. In OpenGL Mode, it stays yellow and is noticeably slower, sim speed wise.

Definitely rather odd.

I got really bad simulation speed as well--though I didn't experience any FPS boost, just a graphical glitch, some FPS slowdown, and much reduced RAM consumption (the only benefit in my case).

10x is the minimum acceleration that isn't slower than than real time, and it seems worse on larger rockets. If OpenGL is to be a realistic alternative, that's something you'd have to overcome. Is there anything that can be done with Max Delta-Time Per Frame settings?

Edited by Synthesis
Link to post
Share on other sites

Still no luck with enabling AA, anyone please help? Nvidia panel doesn´t seem to change anything while the game is forced to use OpenGL... And yes, I am using those settings at KSP executable, not 64 or launcher. Anyone else encountered something similar? Its the same on 2 different PCs, so i guess I am doing something wrong, but i dont know what it is.

Link to post
Share on other sites

While OpenGL works great for me in terms of sheer performance, I am plagued with OpenGL memory issues that tend to hit after KSP has been running for a bit with OpenGL forced. Have been searching for a resolution for it but haven't found anything yet. When I check my event log for info on the eventual crashes it just says ---

The NVIDIA OpenGL driver has encountered

an out of memory error. This application might

behave inconsistently and fail.

First time I've ever encountered the error, and strangely enough it's only happening with KSP in OpenGL mode. Current video card is a GTX970 SSC running under Win7X64, and there had been many reports of stability problems under the last driver. I updated to the most recent 344.48 reference driver hoping it might solve the problem, but sadly it has not. :(

Link to post
Share on other sites

In Fraps benchmarks on my GPU, it has a higher FPS when running with DirectX 9.0c (which is what my GPU only supports), but I rule in favor of DirectX, because it is hardware-accelerated, and OpenGL is basically software-acceleration.

Link to post
Share on other sites
In Fraps benchmarks on my GPU, it has a higher FPS when running with DirectX 9.0c (which is what my GPU only supports), but I rule in favor of DirectX, because it is hardware-accelerated, and OpenGL is basically software-acceleration.

Please, really, if you have this little idea about the subject, sometimes it it just better to keep quiet and not make a fool of yourself.

While different cards have different HARDWARE support, (Nvidia usually being the best for OpenGL in my experience, but YMMV) OpenGL is most definitely Hardware Acceleration.

Link to post
Share on other sites
anybody using the DX11 renderpath?

sadly, the drop shadows are all missing with openGL for me. but DX11 works and saves some ram too

~2gb as to 2,6gb with the default path at the start screen.

How would I go about setting this up?

Link to post
Share on other sites
How would I go about setting this up?

Ditto. With forced openGL game doesnt start at all (HD 7850). Im tired of crashing every hour or so. And them mods keep getting bigger and bigger.

Edit: Nvm, found it. " -force-d3d11". No impact on ram usage, nor fps. It just messes the geme up for me. No water, no lighting effects, no EVE clouds on Kerbin.

Edited by Plusk
Link to post
Share on other sites

I've found that OpenGL mode allows me to play with my zillions of mods, instead of not at all, but I can't alt-tab while inside the game. If I do, it will crash. This is quite unfortunate when I am trying to geosynchronous orbit a satellite over a world other than Kerbin (I have Kerbin's geosynch altitude memorized). I need to look up the altitude for it, but can't alt-tab to get to the wiki....

Link to post
Share on other sites
I've found that OpenGL mode allows me to play with my zillions of mods, instead of not at all, but I can't alt-tab while inside the game. If I do, it will crash. This is quite unfortunate when I am trying to geosynchronous orbit a satellite over a world other than Kerbin (I have Kerbin's geosynch altitude memorized). I need to look up the altitude for it, but can't alt-tab to get to the wiki....

Add '-popupwindow' to the same line you add '-force-opengl', and that should fix your Alt-Tab problems. It did for me, anyway, and it even seems to run a little better as well (maybe just confirmation bias on the performance, but it certainly fixed the alt-tab issue.)

Link to post
Share on other sites

Ok, well I gave the -force-d3d11 option a try aswell, (For reference I am running an Nvidia Gtx 460) and while it did work, the fonts all looked horrible, extreme kerning and spacing issues and some almost completely garbled. Not much of a performance boost either, but there was a slight one. Not enough to be worth unable to read anything though. XD

Link to post
Share on other sites

Yesterday, I was forced to make the switch to OpenGl (on a Geforce GTX670) because the constant crashes were making my life miserable, despite Active Texture Management and TextureReplacer. The effect seems as predicted that I now require a lot (at least 1 Gigabyte) less memory an no noticable performance issues. However one side effect is that whenever I switch between KSP and Desktop, KSP get's into Window mode (instead of full screen). It made worse because I have duel screen it get's in between 2 screens.

Question: Is there a way to force KSP to remain in Fullscreen or activate Fullscreen by a simple method?

Edit:

Hello,

For those that might not know this is what you type for full screen window mode with the openGL option:

-force-opengl -popupwindow

Enjoy!

Thanks, that's what I was looking for

Edited by FreeThinker
Link to post
Share on other sites
I believe I figured out what is happening to cause my problem. It just keeps going up until it finally crashes. Is anybody else experiencing a memory leak when forcing KSP to run in OpenGL?

http://oi62.tinypic.com/28v6pgj.jpg

The same hapenens in Direct3D. There seems to be some inherent memory leaks or the garbage collection fails to free unused memory (because perhaps it is still referenced somehow).

Edited by FreeThinker
Link to post
Share on other sites

Beside the memory advantage, there appears a second big bonus of using Open GL, which is KSP no longer pauses and disaperars if I switch to windows. No I can fly long distances, or accelerate slowly with ion egines, and at the same time browse or watch a movie

Link to post
Share on other sites
Beside the memory advantage, there appears a second big bonus of using Open GL, which is KSP no longer pauses and disaperars if I switch to windows. No I can fly long distances, or accelerate slowly with ion egines, and at the same time browse or watch a movie

I'm glad to hear it's working for you, but I think this is often offset by the fact that simulation time is halved for many people (myself included) when using OpenGL.

The game operates at half speed (necessitating more time acceleration use), but you have few options to use lots of mods (and since 0.25 64-bit doesn't work with 0.24.2 saves).

Link to post
Share on other sites
I'm glad to hear it's working for you, but I think this is often offset by the fact that simulation time is halved for many people (myself included) when using OpenGL.

The game operates at half speed (necessitating more time acceleration use), but you have few options to use lots of mods (and since 0.25 64-bit doesn't work with 0.24.2 saves).

What do you mean by half speed? You mean when outside of KSP it plays at half speed or all the time? what kind of hardware do you use? I use a 4.6G overclocked watercooled Ivy Brigde rig with 512 SDD and Gefore 670GTX. Although It's a few years old, it is still kicking but.

Link to post
Share on other sites
What do you mean by half speed? You mean when outside of KSP it plays at half speed or all the time? what kind of hardware do you use? I use a 4.6G overclocked watercooled Ivy Brigde rig with 512 SDD and Gefore 670GTX. Although It's a few years old, it is still kicking but.

Your actual computer specs don't really matter at that sort of performance. Because of the way KSP calculates physics, I believe that using OpenGL affects the amount of time it takes KSP to do a physics calculation, effectively running the game at half the speed it would whilst using DirectX. As long as you have a core with a clock higher than around 2.4Ghz, at least 4Gb and a fairly decent graphics card, KSP will work decently. Any hardware higher than that then you won't notice much difference performance wise.

Link to post
Share on other sites

for me run much slower within but i have only about 50 mods (and run slow ONLY during reentery/mach effeckt) i can deal without( but by by clouds-life is way of choices) nad full scren problem(even with alt-enter shoot out to normal window)

Link to post
Share on other sites

That's the thing. it doesn't SEEM to run slower. Physically, it does not affect any sort of lag. BUT, and this is a big but (hehe :P), it affects the SIMULATION speed which you may not necessarily notice. You will only notice it in some circumstances. It also depends on what OS you are running to how much it actually affects the simulation time because each OS runs their graphical rendering a different way even though they use the same engine (with an exception to OS X, which I am not entirely sure if it has any option to use DX 9/10/11 etc). SO, although you may not notice it, 7/10 it is there but you just don't realise it. Now you are probably thinking, "well if I don't realise it, why did you bring it up?". That's a good question. I brought it up because - because KSP now spends longer on each physics calculation a potential bottleneck may/will occur when more parts and ships are in the physics calculation range at once. Your 1000 part ship that your computer can reasonably handle using DX 11 (or whatever DX you use), your computer may not be able to handle OR there will be a physical decrease in speed whilst using OpenGL. Again, depends on the DX version you are benchmarking against if you are going to do this. Also depends on the OpenGL version you use to benchmark this AND the OS you are running. On some occasions also depends on your hardware. I hope this clears some stuff up,

ToTheMun

Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...