Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (EternallyCurious, Quad, vicknick), 700 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using OpenGL? #459014
04/13/16 09:43
04/13/16 09:43
Joined: Mar 2010
Posts: 120
Switzerland
T
TehV Offline OP
Member
TehV  Offline OP
Member
T

Joined: Mar 2010
Posts: 120
Switzerland
Hello again,
I've run into an issue recently where the newer graphics drivers under Windows 10 can no longer force VSync on Gamestudio applications. I had a lead that said that the reason for this is that DirectX10 and newer no longer properly support VSync, and an attempt to install DirectX9.0c (which the engine prefers to use) is no longer supported in these newer versions of Windows.

This leads to a situation where a program I've made works properly on some computers but not on others (i.e. VSync is used on some but not others).

Contributing to this problem is the fact that the newer graphics drivers for both nVidia and AMD graphics devices seem to only support forcing these settings on OpenGL (according to several support forums I've asked on), so I'm trying to support both DirectX and OpenGL in order to increase the amount of systems on which my application works properly.

Now, GameStudio *does* have an OpenGL header, which I've included, but I'm not sure on a few things still. Please consider that I've never worked with OpenGL before and these questions may reflect my absolute ineptitude:

1) According to some research I've done, I can use wglSwapIntervalEXT(1) to enable VSync on my program (or at least make it prefer running with VSync). This function does not exist in that header. I believe I'd still be able to force it in the graphics driver, so this wouldn't be a huge issue, but I'd rather be sure and haven't been able to test this yet. Are there any substitutes for this function?
2) Again, according to some research, I'd need to use glFinish() to block the thread until all OpenGL execution has finished to properly sync to the screen refresh rate. Does this call substitute the GameStudio wait(n) function or does it not allow the renderer to update?
3) When starting up my program with opengl.h included, it complains that glaux.dll cannot be found. I've searched my entire computer for it and it doesn't exist. I've also searched online and found several sources saying it is obsolete. Is this true, does it still work reliably on newer Windows versions and where do I get it?
4) I've included opengl.h in my code but I'm not sure at all if the engine is using OpenGL instead of DirectX because of that. Are there any steps I need to take to make that happen?

The GameStudio documentation on this topic is very scarce and seems incomplete. Any help on this is very much appreciated. Thanks!

Last edited by TehV; 04/13/16 09:45.
Re: Using OpenGL? [Re: TehV] #459032
04/14/16 20:32
04/14/16 20:32
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Unfortunately it's not that easy.
When you include the OpenGL Header, the engine will not automatically use OpenGL (correct me if I'm wrong). It's just there if you want to write your own renderer in lite-C, which you probably don't want to. Calls to wglSwapIntervalEXT(1) will end with an error or even a crash when there is no OpenGL Context defined. The function should not be able to change VSync for a DirectX renderer as Acknex.

Future engine version will need to use OpenGL, when they want to support publishing to android. I don't expect that will ever happen, at least not this decade grin.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1