Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 14-Jul-2010, 17:23   #1
FoxMcCloud
Junior Member
 
Join Date: Dec 2008
Posts: 32
Default OpenGL context creation time on Win32

An app I'm working on has entered the polishing stage, and one of our goals is to cut down startup time to less than 700 msec, but OpenGL is causing us to hit a glass ceiling due to context creation times - fastest I can get context creation (2.x) on Windows (7, x64 if that matters) is 425 msec. First of all, is this normal or am I doing something drastically wrong? And if it *IS* normal, don't you guys think it's a HUGE amount of time? My dev machine (where those results are from, warm startup) is a Core 2 quad 2.0 with a GTX260M 1 GB. Sampling leads me to believe that ChoosePixelFormat is where the most time is being spent, along with a mysterious wglNumHardwareFormats (Google has no results for the latter).

Any tips on reducing the context creation time? Am I really hitting the ceiling there?
FoxMcCloud is offline   Reply With Quote
Old 20-Jul-2010, 21:49   #2
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,140
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

If ChoosePixelFormat() is taking a lot of time you could try creating your own mode enumeration function and select the best match with more simple logic instead of the rather complex and highly undocumented rules that ChoosePixelFormat() uses.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 20-Jul-2010, 23:24   #3
ERP
Moderator
 
Join Date: Feb 2002
Location: Redmond, WA
Posts: 2,284
Default

My bet would be on the actual mode enumeration.
It can be a lot of combinations when you count all the resolutions x all the possible refresh rates x with Z without Z etc etc.
__________________
My "exciting" blog
ERP is offline   Reply With Quote
Old 21-Jul-2010, 16:19   #4
FoxMcCloud
Junior Member
 
Join Date: Dec 2008
Posts: 32
Default

Humus, I'm interested in bypassing ChoosePixelFormat(), but the MSDN docs are very limited. Where should I go for resources on how to do this?
FoxMcCloud is offline   Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:53.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.