PDA

View Full Version : Another Win32 issue



Defoc8
06-28-2003, 03:00 PM
Please, if you know how to solve these
problems - help me.

1) This should be pretty easy - how can
i grab info about the desktop settings..
..more specifically the colour depth.

2) Is there anyway to determine whether or
not opengl is supported by the display
device. & assuming it is..is there anyway
i can determine whether or not the selected
display mode is fully hardware accelerated??

please..please..help..
- im developing an opensource win32
- setup wrapper...& although ive created
- an opengl win32setup wrapper before...
- i didnt implement full system testing.

many thanks,
matt http://www.opengl.org/discussion_boards/ubb/wink.gif

knackered
06-28-2003, 03:05 PM
What? You didn't use the pixel format functions? (eg. choosepixelformat, get/setpixelformat etc.)
You've never used the DEVMODE structure? Look it up.
This is all very basic stuff, why do you post in the advanced forum?

Defoc8
06-28-2003, 03:40 PM
lol..
listen man..i have used the methods &
structs you refer to..& ive jst found my
answers..which didnt have anything todo with
these structs/methods...

i do apologise for invading your space...
but if you think writing a robust win32
wrapper is a simple task..then go make one.

The reason i posted it here was that i
guessed - someone that considers themselves
an advanced coder..would have been able to
offer better advice...
this has offended you and for that im sorry..
though i must point out..being patronising
is no way to talk to people you dont know..

anyway..thanks for nothing

knackered
06-28-2003, 04:18 PM
Ok pal, let's hear you then.

ive jst found my
answers..which didnt have anything todo with
these structs/methods...
I've just read your other topic (well, it's the same topic isn't it? getting a bit over-enthusiastic obviously), anyway - you seem to have had a problem with the DEVMODE structure, which has now been sorted out for you. I'm so pleased for you.
But you're not going to use the DEVMODE structure, are you?
So, basically how do you intend to find out the bit depth of the desktop without using the DEVMODE structure?
Secondly, how do you intend to find out if your display device can hardware accelerate opengl without using the pixelformat 'methods'?
Please post back your secret techniques, we'd all be extatic to hear them.


if you think writing a robust win32
wrapper is a simple task..then go make one.
It's not simple, but then again, it's not difficult. Mind you if you're stuck at this point, then I suspect we haven't heard the last from you....

Defoc8
06-28-2003, 04:49 PM
hehe..got you kinda pissed off http://www.opengl.org/discussion_boards/ubb/tongue.gif

you where right about one thing..they
are simple problems..one i forgot how to
implement...part of the price you pay for
taking big time-outs...

anyway here are the methods for doing
the simple tasks i was refering to..erg

1)Determine desktop colour depth

HWND hwnd=GetDesktopWindow();
HDC hdc = GetWindowDC(hwnd);
int appdepth=GetDeviceCaps(hdc,BITSPIXEL);
ReleaseDC(hwnd,hdc);
-dumb, i know..but i simply forgot.

2)Determine if display is hardware accelerated.

glGetString(GL_RENDERER))//returns vendor of implementation..if this is "microsoft"..well
then your software rendering...

ok i know this
isnt perfect & that some display modes will
be software only on some cards that implement
OpenGL HW acceleration...to determine the
specific modes that are HW accelerated
probably does involve checking against the
pixel format descriptor..but then im not sure
about which fields determine this..though i
think i have a vague idea....


Thanks go to m8 Drago for pointing these obviouse things out...

again..i am sorry...but you see, you didnt even follow my simple questions..so i dont
think you should be firing out the insults..

hehe..anyway..it was fun http://www.opengl.org/discussion_boards/ubb/wink.gif
- chill out + go down the pub m8


[This message has been edited by Defoc8 (edited 06-28-2003).]

[This message has been edited by Defoc8 (edited 06-28-2003).]

knackered
06-29-2003, 02:33 AM
touche turtle!