How i can disable hardware acceleration?

Can i disable/enable hardware acceleration from my program?

Well, I don´t really know, I never tried it because I don´t see a sense why doing it. However, you will have your own reasons. So here is my suggestion: If you create your glwindow under windows and do not use glut then you surely know that you have to setup a window a device context, bla bla bla…
Well, I remember that when you set up a window or the pixel format, you somewhere use a flag which tells windows to use OpenGL (I don´t know the name of the flag, but you will find it, because of its name). Try if the program still runs if you don´t use this flag. I am absolutely uncertain if it will, but it is worth a try, I think. However, if you just want to test how big the differences are between accelerated and not-accelerated programs you should look if there is such an option in your graphics-card-panel. I think some cards let you disable the acceleration.

I hope I could help you, but how I said, I am not sure if it is possible. In spite of this, I don´t know why one want to do this.

In theory, if when requesting a pixelformat in win32 that has the PFD_GENERIC_FORMAT and doesn’t have the PFD_GENERIC_ACCELERATED should work.
For testing purposes, I switch my video color depth to 8bit to test if my code works in software, etc. It requieres that you manage palletes in win32 (which you can get out from sample code out there).

Originally posted by coco:
In theory, if when requesting a pixelformat in win32 that has the PFD_GENERIC_FORMAT and doesn’t have the PFD_GENERIC_ACCELERATED should work.

Search for a post by Eric on that. He has posted working source (I tried ;-)).

And Jan2000: There is sense in doing that. There are some cards which crash when calling certain OpenGL functions. If the user has such a card, he can choose software rendering.

Hehe, I am glad it worked Kilam !

Here is the link:
http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/001818.html

Regards.

Eric

Another option would be to use 8-bit colour, since few cards accelerate 8-bit colour modes these days. Granted, your stuck with only 256 colours, but depending on what you’re testing this won’t matter much, and it’ll work on non-Win32 platforms as well.

outlander78:
Thats what I said, but remember that at least on windows your app should manage palettes so your opengl display makes any sense in 8bits.

eric:
well, I believe described the short version: use PFD_GENERIC_FORMAT instead PFD_GENERIC_ACCELERATED, and you implemented a fully working version with a lot of other functionalities.

Originally posted by coco:
outlander78:
Thats what I said, but remember that at least on windows your app should manage palettes so your opengl display makes any sense in 8bits.

Sorry about that. I only read as far as your use of constants before skimming on. I didn’t mean to repeat you word for word!

Outlander:
Hey, I didnt mean to complain about anything, just wanted to point out that to use 8bit it’s better to manage palettes, that’s all. In fact, its cool to know that others do that ugly trick too!

Originally posted by coco:
well, I believe described the short version[/b]

Hi Coco !

Actually, if the only thing you do is use PFD_GENERIC_FORMAT instead of PFD_GENERIC_ACCELERATED, you will most likely obtain an accelerated context anyway… I don’t know why but it seems that the Win32 API call ChoosePixelFormat does not care about this flag !

A funny thing I found while writing this routine is that a software rendering context features the PFD_GENERIC_FORMAT and not the PFD_GENERIC_ACCELERATED (logical!). But an accelerated one features none of them (not even PFD_GENERIC_ACCELERATED !). Perhaps it is due to my drivers but I thought it was strange… Mind you, if the flag for “generic” is not there, it should mean that you are “accelerated” !

Regards.

Eric

Wow, so the Win32 api messed that one too. We have to learn not to trust 100% the Win32 documentation. It says:
“PFD_GENERIC_FORMAT:
The pixel format is supported by the GDI software implementation, which is also known as the generic implementation. If this bit is clear, the pixel format is supported by a device driver or hardware.”
So you shouldn’t be getting an accelerated context if this bit is set.

[This message has been edited by coco (edited 01-12-2001).]

>>A funny thing I found while writing this routine is that a software rendering context features the PFD_GENERIC_FORMAT and not the PFD_GENERIC_ACCELERATED (logical!). But an accelerated one features none of them (not even PFD_GENERIC_ACCELERATED !). <<

IIRC, the PFD_GENERIC_ACCELERATED was used to distinguish Mini Client Drivers (MCD, not miniGL!) from full Installable Client Drivers (ICD).
Means the geometry and state calculations were SW (MCD server) and the rasterizer (MCD client) could be HW.

And yes, ChoosePixelFormat() is evil!!!

[This message has been edited by Relic (edited 01-12-2001).]

Thanks Relic !

I learnt two things from your post:

  1. The meaning of PFD_GENERIC_ACCELERATED.
  2. IIRC = If I Remember/Recall Correctly.

(I spent 3 minutes trying to figure out the IIRC thing !)

Seriously, these flags are pretty confusing when you start using OpenGL ! Thanks for the info !!!

Regards.

Eric

You’re welcome.
Found this: http://info.astrian.net/jargon/

[This message has been edited by Relic (edited 01-15-2001).]