Author Topic: Issues running SGDK2 projects  (Read 2948 times)

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Issues running SGDK2 projects
« on: 2010-01-23, 07:23:11 PM »
I'm having problems running any OpenGL-based SGDK2 games on my system.

CPU - Core 2 Quad q9550
MOBO - Gigabyte EP45T-EXTREME
RAM - 4GB DDR3
GFX - ATI Radeon HD4890
OS - A fresh install of Windows 7 x64 (2 weeks old at most)



It occurs in every OpenGL game I've tried, (guitarsim, isometric sample, automatic turret sample) and it doesn't appear to matter whether the game is compiled or ran in the IDE.


When I try to use the map editor.
Code: [Select]
---------------------------
Map Editor Error
---------------------------
An error occurred while drawing the display in the map editor. In order to attempt to avoid fatal errors and data loss, the display handling in this map editor window will be disabled and you should close it yourself. Details:

System.ApplicationException: OpenGL version 1.2 is required; your version is: 3.2.9232

   at SGDK2.Display.CheckRequirements()

   at SGDK2.Display.DrawFrame(TextureRef texture, Rectangle sourceRect, Point[] corners, Int32 offsetX, Int32 offsetY)

   at SGDK2.Layer.Draw(Display Display, Size ViewSize)

   at SGDK2.frmMapEditor.MapDisplay_Paint(Object sender, PaintEventArgs e)
---------------------------
OK  
---------------------------


When I try to run a game.
Code: [Select]
---------------------------
Error
---------------------------
A fatal error occurred initializing or running the game:

System.ApplicationException: OpenGL version 1.2 is required; your version is: 3.2.9232

   at Display.CheckRequirements()

   at Display.DrawFrame(TextureRef texture, Rectangle sourceRect, PointF[] corners, Int32 offsetX, Int32 offsetY)

   at LayerBase.Draw()

   at Level_1_Map.Draw()

   at MapBase.DrawAllViews()

   at GameForm.Run()

   at Project.Main()
---------------------------
OK  
---------------------------






Correct me if I'm wrong, but as I understand it, OpenGL is included with graphics drivers and you can't just download a copy of an older version.


Graphics Software Information (According to Catalyst Control Centre (ATI Drivers))
[code]Driver Packaging Version   8.681-091124a-092499C-ATI   
Catalyst

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Issues running SGDK2 projects
« Reply #1 on: 2010-01-24, 09:55:03 AM »
It seems some drivers incorrectly report support for older OpenGL interfaces or something (or maybe OpenTK incorrectly passes that information along, but I doubt that).  You could try loading a project into the IDE, opening the Display.cs file from the project's SourceCode folder, locating the CheckRequirements function, and deleting the following block of code:
Code: [Select]
         if (!GL.SupportsExtension("VERSION_1_2"))
         {
            string errString = "OpenGL version 1.2 is required";
            try
            {
               errString += "; your version is: " + GL.GetString(StringName.Version);
            }
            catch
            {
            }
            throw new ApplicationException(errString);
         }

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Issues running SGDK2 projects
« Reply #2 on: 2010-01-24, 02:49:11 PM »
Ok that runs beautifully. Thanks.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Issues running SGDK2 projects
« Reply #3 on: 2010-01-24, 09:19:36 PM »
If I recall correctly, OpenTK had an issue parsing OpenGL versions of 3 or greater.  It has been fixed, but I ran into the issue not too long ago because I wasn't running the latest version of SGDK2.
Edward Dassmesser