Using DirectX by default on Windows?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Graph
Veteran
Posts: 230
Joined: Sat Jul 03, 2010 7:22 pm
Completed: Touhou Mecha Chap. 1
Projects: Touhou Mecha, Eastern Starlight Romance
Organization: Dai-Sukima Dan
Contact:

Using DirectX by default on Windows?

#1 Post by Graph »

I was wondering if there's a variable I can set somewhere to make a Ren'py game use DirectX instead of OpenGL by default when running on Windows OS?

When given the choice, I find that games use 30% more memory and sometimes run choppier on OpenGL, not to mention the machine-specific nature of updating OpenGL. At the least I'd like my VN to start off using DirectX when making test builds.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Using DirectX by default on Windows?

#2 Post by PyTom »

There isn't a way to do this without disabling OpenGL and the software renderer entirely.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Using DirectX by default on Windows?

#3 Post by nyaatrap »

Graph wrote:I was wondering if there's a variable I can set somewhere to make a Ren'py game use DirectX instead of OpenGL by default when running on Windows OS?

When given the choice, I find that games use 30% more memory and sometimes run choppier on OpenGL, not to mention the machine-specific nature of updating OpenGL. At the least I'd like my VN to start off using DirectX when making test builds.
I support this suggestion, since ren'py has a memory leak problem in its hardware acceleration. Playing games several hours without minimize windows leads to crash an application (people actually plays more than 10 hours long my game). When using DirectX, it allows 1.5 times higher image caches.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Using DirectX by default on Windows?

#4 Post by PyTom »

I haven't heard about such a memory leak. Is it repeatable? If so, how do we repeat it? Does the memory increase while Ren'Py is idle, or only when it's being played? Does it only occur with hardware rendering, or does it occur with the software renderer as well?

I'm not going to hold up 6.16.2 for it, but I'd rather fix the leak, as opposed to trying to work around it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Using DirectX by default on Windows?

#5 Post by nyaatrap »

I got many report about memory crash bug on DMC when playing very long hours. It looks memory leaks when rendering a new image (my game has more than 1GB png images), only with hardware acceleration turns on. Memo of RAM consumption playing DMC setting config.image_cache = 8 with Intel HD graphics (from report, it looks memory leaking is also occurred on OSX with Nvidia):

Softwhere: startup = 52mb, playing 3min = 140mb, playing 15min = 155mb, after minimized window = 155mb.
DirectX: startup = 78mb, playing 1 min = 248mb, playing 5min = 320mb, after minimized window = 180mb
OpenGL: startup = 118mb, playing 1min = 347mb, playing 5min = 500mb, after minimized window = 190mb

I don't know applications which releases memory cache when minimizing a window other than ren'py.

Post Reply

Who is online

Users browsing this forum: GoldenGob, SelLi