Jump to content
  • Advertisement
Sign in to follow this  
JackTheRapper

Cg shader problem when switching to fullscreen

This topic is 3405 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, bit of a wierd one but my vert + frag shaders all work in windowed/fullscreen mode. Switching causes no problems. However, when ever I use the Win32 Common Dialogs (e.g. ChooseColour, GetOpenFileName etc) I get problems switching to fullscreen. Normal dialogs are fine (ones I've made in resource scripts and loaded programmatically). Using CG, OGL & Win32 compiled in VC++ Express on Vista machine. So, I can switch between windowed and fullscreen, no problem. However, it's as soon as one of the common dlgs get opened at any point in the app and I then try and switch to fullscreen I get this error:
CG ERROR: the file could not be read


The error occurs when trying to load the vert program. Running vert + frag programs on CG_PROFILE_ARBVP1 and CG_PROFILE_ARBFP1 profiles respectively. Any ideas? I'm really stumped myself

Share this post


Link to post
Share on other sites
Advertisement
This is a wild guess but I wonder if the current working directory is changed somehow when those dialogs open... I'm curious if you have the same problem if you give the full path to the cg file.

Share this post


Link to post
Share on other sites
Oh... my... GOD...

Thank you so much, Brad. You, sir, are one outside the box thinker! Not only did it solve the problem, but explained why I was getting such non sequitur errors in my code :D

Now all I gota do is find some way of preserving the working directory post CommonDlg, but at least the hardest part is out the way. Again, thank you, you pretty mich saved my skin there :D :D :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!