Graphic Driver

Started by Vincent, Sun 31/12/2017 08:50:15

Previous topic - Next topic

Vincent

Good morning to all AGSer!

Recently I discovered a minor issue that I am sure it is regarding my computer but at the moment I don't know why this is happening and I would like to know if I can fix it somehow. So, if I start a new project into Ags (no matter which graphic driver I choose from the default panel) the game seems to go slowly into the editor. But if I run the game from the exe file (with software renderer) then the game run as it should do. Also I found out that if I do (ctrl+F5) run the game without debugger then the game go fine like when I run it from the exe file. So I am wonder why into the editor the game look slowly? There is a way for me to fix this?

Crimson Wizard

Could you tell which exactly version of AGS are you using?
Also, when you run the game, press Ctrl + Alt + V, that will display gfx mode information. Is there any difference between it when you run with debugger or without debugger?

You should also know, that Default Config pane creates default config for your game, but as soon as you run setup program at least once there will be user config created (in the same location as savedgames), which will override default config.

Vincent

Thanks Crimson Wizard for answering.

At the moment I am using Ags 3.4.1 rc3.
I have to say that your advice to use this debug command have been very useful. So the first thing that I do when I open a new project is to go to the default panel in the editor and change the graphic driver to be Software renderer and then I run the game normally into the editor by pressing F5 and this is what I get so far.


I don't know why it is setted to be OpenGL when I just changed to be Software renderer before. Also into the "acsetup" it is setted as driver=Software.

If I do exactly the same thing by pressing ctrl+F5 by running with the debugger then I get it right as it should be.


Crimson Wizard

Default Setup does not apply unti you do Build -> Build Exe or Rebuild all files. Maybe that causes this issues.

Vincent

#4
I don't know because when I first open a new project I change graphic driver into the default panel in the editor to be software renderer, I do build -> rebuild all files then build -> build Exe, I run the game into the editor but anyway it is still show OpenGL as graphic driver...

:EDIT: I have just re done in this way and it is worked fine this time.

Crimson Wizard

I will test again later to see if there is patricular way to reproduce this. Also, it is strange that there were differences when you run with debugger and without one, because in theory it should work the same.

Vincent

Quote from: Crimson Wizard on Sun 31/12/2017 19:50:00
Also, it is strange that there were differences when you run with debugger and without one, because in theory it should work the same.

Yes in theory both of the way should work the same way as I thought. I was a kind of surprised that they were working differently at all but I am not sure though how to reproduce this. Maybe by changing the graphic driver without re build the exe file?  So maybe if you press F5 it show OpenGl but ctrl+F5 it show as you have setted the graphic driver without re build the exe file.

Vincent

#7
Ok I think I found out the problem maybe...

Quote from: Vincent on Sun 31/12/2017 17:03:19
So the first thing that I do when I open a new project is to go to the default panel in the editor and change the graphic driver to be Software renderer.

Now, if I set the resolution of the game to be lower than 800x600 (and doing Build-> Build exe) it keep the changes to be software renderer when I test the game into the editor by pressing F5. But if I set it to be 800x600 it display OpenGL...




Quote from: Vincent on Sun 31/12/2017 19:38:15
:EDIT: I have just re done in this way and it is worked fine this time.
I believe that it worked because the resolution of the game was lower than 800x600.

Crimson Wizard

#8
Do you have a game config written by setup program? It might be in the savedgames folder for your game.

What is your desktop resolution? I wonder why on your first screenshot the window is smaller than the size of the game.
In theory, software renderer may fail to create a window of certain size, in which case it may try other renderers.

Vincent

You mean acsetup.cfg? It's just showing this inside the document.
[graphics]
render_at_screenres=0
[language]
translation=

This is looking incomplete altought I am using to delete the folder of the savedgame and to re build the exe file anytime.

Vincent

At the moment I am using a netbook it has a screen resolution of 1024x600.

Quote from: Crimson Wizard on Sun 31/12/2017 22:58:37
I wonder why on your first screenshot the window is smaller than the size of the game.

This is a good question indeed, I really don't know why. But the screenshots were taken at the same game testing with same resolution. One runned by F5 and the other by ctrl+F5.


Quote from: Crimson Wizard on Sun 31/12/2017 22:58:37
In theory, software renderer may fail to create a window of certain size, in which case it may try other renderers.

If I try other renderers the game look slowly into the editor and from the exe file too. But software renderer seems to go much smoothly to my netbook.

Crimson Wizard

Quote from: Vincent on Sun 31/12/2017 23:32:01
At the moment I am using a netbook it has a screen resolution of 1024x600.

Quote from: Crimson Wizard on Sun 31/12/2017 22:58:37
I wonder why on your first screenshot the window is smaller than the size of the game.

This is a good question indeed, I really don't know why.

Well, your first sentence already explains why: if your game is 1024x768, and your desktop is 1024x600, the game just won't fit and has to be scaled down.

Vincent

Sure, this is quite logical for me too but why in the second screenshot it get a different scaled?

First screenshot is 758x569 and the second one is 1024x600.
By the way I understand that there is no way for me to fix this. If I do a resolution higher than 800x600 it display OpenGL no matter what.

Crimson Wizard

#13
Quote from: Vincent on Mon 01/01/2018 08:34:21
Sure, this is quite logical for me too but why in the second screenshot it get a different scaled?

First screenshot is 758x569 and the second one is 1024x600.

That's because on second screenshot it runs fullscreen - there is no "W" letter after resolution. Your monitor/gfx card supports 1024x600 fullscreen mode.
Since you were running without debugger AGS uses an option from Preferences: "When running without debugger". It was probably either "fullscreen" or "use config".


Quote from: Vincent on Mon 01/01/2018 08:34:21
By the way I understand that there is no way for me to fix this. If I do a resolution higher than 800x600 it display OpenGL no matter what.

The only reason I can think of is that software renderer just cannot create windows of necessary size, and it switch to other renderers. I am not sure why OpenGL though, on Windows it should try Direct3D 9 first, maybe it is also not well supported on your notebook?


We may know more if you turn logging on. If you open acsetup.cfg and put
Quote
[misc]
log=1
then run the game, it should write the log into ".ags" folder inside your usual saved games folder.

Vincent

Quote from: Crimson Wizard on Mon 01/01/2018 14:23:49
That's because on second screenshot it runs fullscreen - there is no "W" letter after resolution. Your monitor/gfx card supports 1024x600 fullscreen mode.
Since you were running without debugger AGS uses an option from Preferences: "When running without debugger". It was probably either "fullscreen" or "use config".

Thanks, I think that I have miss this option about Preferences before.


Quote from: Crimson Wizard on Mon 01/01/2018 14:23:49
The only reason I can think of is that software renderer just cannot create windows of necessary size, and it switch to other renderers. I am not sure why OpenGL though, on Windows it should try Direct3D 9 first, maybe it is also not well supported on your notebook?

We may know more if you turn logging on. If you open acsetup.cfg and put
Quote
[misc]
log=1
then run the game, it should write the log into ".ags" folder inside your usual saved games folder.

Yes, I believe that this is what happening at the moment.
Direct3D 9 it doesn't seems to be supported very well from this netbook too.
However, this is the report from the log document so far.


Adventure Game Studio v3.4 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2017 others
ACI version 3.4.1.10

Installing exception handler
Initializing allegro
Reading configuration
Looking for game data file
Located game data file: c:/Users/Vincent/DOCUME~1/FMV/_Debug/FMV.exe

Opened game data file: game28.dta
Game data version: 49
Compiled with: 3.4.1.10
Setting up window
Initializing TTF renderer
Initializing mouse: number of buttons reported is 5
Checking memory
Data directory: c:/Users/Vincent/DOCUME~1/FMV/_Debug
Optional install directory: Compiled\Windows
Optional audio directory: AudioCache
Optional voice-over directory: Speech
Voice pack was not found, but voice installation directory is defined: enabling voice-over.
Initializing keyboard
Install timer
Initialize sound drivers
Sound settings: digital driver ID: 'AXA ' (0x41584120), MIDI driver ID: 'Auto' (0xffffffff)
Installed digital driver ID: 'AXA ' (0x41584120), MIDI driver ID: 'W32M' (0x5733324d)
Install exit handler
Initialize path finder library
Load game data
Game GUI version: 118
Requested script API: v3.4.1 (5), compat level: v3.4.0 (4)
Built library path: ags_theora.dll
Plugin 'ags_theora' loading succeeded, resolving imports...
Game title: 'FMV'
Checking for disk space
Initializing MOD/XM player
Initializing resolution settings
Game native resolution: 1280 x 1024 (32 bit)
Device display resolution: 1024 x 600
Game settings: windowed = yes, screen def: scaling, screen size: 1024 x 600, match device ratio: ignore, game scale: max_round
Using graphics factory: Software
Created graphics driver: Software renderer
Supported gfx modes (32-bit):
   320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x600;
   
Attempting to find nearest supported resolution for screen size 711 x 569 (32-bit) windowed
Maximal allowed window size: 1024 x 569
Attempt to switch gfx mode to 711 x 569 (32-bit) windowed
Failed to init gfx mode. Error: Unable to find a suitable graphics driver
Attempt to switch gfx mode to 1024 x 600 (32-bit) windowed
Failed to init gfx mode. Error: Resolution not supported
Built library path: d3d9.dll
Using graphics factory: D3D9
Created graphics driver: Direct3D 9
Supported gfx modes (32-bit):
   320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x600;
   
Attempting to find nearest supported resolution for screen size 711 x 569 (32-bit) windowed
Maximal allowed window size: 1024 x 569
Attempt to switch gfx mode to 711 x 569 (32-bit) windowed
Failed to init gfx mode. Error: Failed to create Direct3D Device: 0x8876086C
Attempt to switch gfx mode to 1024 x 600 (32-bit) windowed
Failed to init gfx mode. Error: Failed to create Direct3D Device: 0x8876086C
Using graphics factory: OGL
Created graphics driver: OpenGL
Supported gfx modes (32-bit):
   320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x600;
   
Attempting to find nearest supported resolution for screen size 711 x 569 (32-bit) windowed
Maximal allowed window size: 1024 x 569
Attempt to switch gfx mode to 711 x 569 (32-bit) windowed
Running OpenGL: 1.4.0 - Build 8.14.10.2230
WARNING: OpenGL extension 'GL_EXT_framebuffer_object' not supported, rendering to texture mode will be disabled.
WARNING: OpenGL 3.0 or higher is required for tinting shader.
ERROR: OpenGL: Tinting program's fragment shader failed to compile:
----------------------------------------
ERROR: 0:1: '' :  Version number not supported by GL2
ERROR: 0:2: 'out' : syntax error parse error

----------------------------------------
ERROR: OpenGL: Lighting program's fragment shader failed to compile:
----------------------------------------
ERROR: 0:1: '' :  Version number not supported by GL2
ERROR: 0:2: 'out' : syntax error parse error

----------------------------------------
Succeeded. Using gfx mode 711 x 569 (32-bit) windowed
Render frame set, render dest (0, 0, 710, 567 : 711 x 568)
Requested gfx filter: StdScale
Graphics filter set: 'StdScale', filter dest (0, 0, 710, 567 : 711 x 568)
Using gfx filter: StdScale
Mouse control: off, base: 1.000000, speed: 1.000000
Mouse confined: (0,0)-(710,567) (711x568)
Check for preload image
Initialize sprites
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
***** ENGINE HAS SHUTDOWN

Crimson Wizard

Yes, this log confirms that both software and Direct3D failed to create a window of that size for some reason, but OpenGL could.

You also have pretty low version of OpenGL supported by your system, so tinting and lighting effects won't be seen when you run it. (They will still work in game, it's just that you, personally, won't see them on this notebook)

Vincent

Alright, thanks for all your kind help Crimson Wizard, I much appreciate it.

morganw

https://github.com/adventuregamestudio/ags/blob/master/Engine/platform/windows/acplwin.cpp

Quote from: Code comments in the window validation function
// MS Windows DirectDraw and Direct3D renderers do not support a window
// which exceeds the height of current desktop resolution

SMF spam blocked by CleanTalk