kl_mallory's picture

Create Shader error on laptop Nvidia GeForce GT 420M

I am getting an error when running my OpenTK framework app on this new laptop. It fails when creating a shader, but this video card supports up to openGL 2.1. I downloaded and installed the latest drivers for Nvidia and it still errors. I also downloaded GLView and it reports version openGL 2.1 and support for shader language 1.20. The GLView render tests work fine. I have also tested this framework / app on 12 other video cards (Nvidia & ATI) with no problems.

BTW: system is x64 - Windows 7, .NET 4.0. 8GB RAM, 500GB drive, Intel core i5.

Here is the exception stacktrace...

Unable to find an entry point named 'glCreateShader' in DLL 'opengl32.dll'.\r\n at OpenTK.Graphics.OpenGL.GL.Core.CreateShader(ShaderType type)\r\n at OpenTK.Graphics.OpenGL.GL.CreateShader(ShaderType type) in C:\\Code\\OpenTK\\Source\\OpenTK\\Graphics\\OpenGL\\GL.cs:line 41655\r\n at Fenrea.Client.OpenGL.Components.Programs.FragmentShader.GetContextId(IGraphicsContext context) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Components\\Programs\\FragmentShader.cs:line 17\r\n at Fenrea.Client.OpenGL.Components.AbstractComponent.Init(IGraphicsContext context) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Components\\AbstractComponent.cs:line 48\r\n at Fenrea.Client.OpenGL.Components.AbstractComponent..ctor(IGraphicsContext context) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Components\\AbstractComponent.cs:line 30\r\n at Fenrea.Client.OpenGL.Components.Programs.AbstractShader..ctor(IGraphicsContext context, String name, String shaderCo
de) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Components\\Programs\\AbstractShader.cs:line 15\r\n at Fenrea.Client.OpenGL.Components.Programs.FragmentShader..ctor(IGraphicsContext context, String name, String shaderCode) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Components\\Programs\\FragmentShader.cs:line 12\r\n at Fenrea.Client.OpenGL.Factories.Shaders.ShaderFactory.CreateFragment(IGraphicsContext context, String name, String shaderCode) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Factories\\Shaders\\ShaderFactory.cs:line 21\r\n at Fenrea.Client.OpenGL.Factories.Programs.SimpleFactory.Create(IGraphicsContext context) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\Factories\\Programs\\SimpleFactory.cs:line 27\r\n at Fenrea.Client.OpenGL.Tests.TestGameWindow.Init() in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL.Tests\\TestGameWindow.cs:line 62\r\n at Fenrea.Client.OpenGL.GLGameWindow..ctor(Int32 width, Int32 height, GraphicsMode graphicsMode, String
title, GameWindowFlags options, DisplayDevice displayDevice) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL\\GLGameWindow.cs:line 32\r\n at Fenrea.Client.OpenGL.Tests.TestGameWindow..ctor(Int32 width, Int32 height, GraphicsMode graphicsMode, String title, GameWindowFlags options, DisplayDevice displayDevice) in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL.Tests\\TestGameWindow.cs:line 31\r\n at Fenrea.Client.OpenGL.Tests.TestGameWindowFactory.Create() in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL.Tests\\TestGameWindowFactory.cs:line 35\r\n at Fenrea.Client.OpenGL.Tests.program.Main() in C:\\Source\\Projects\\Fenrae\\Fenrea.Client.OpenGL.Tests\\program.cs:line 62"

here is some additional debug from OpenTK

Detected configuration: Windows / .Net
DisplayDevice 1 (primary) supports 111 resolutions.
Creating default GraphicsMode (32, 16, 0, 0, 0, 2, False).
Creating GraphicsContext.
GraphicsMode: Index: 2, Color: 0 (0000), Depth: 0, Stencil: 0, Samples: 0, Accum: 0 (0000), Buffers: 2, Stereo: False
IWindowInfo: Windows.WindowInfo: Handle 8325384, Parent (Windows.WindowInfo: Handle 853824, Parent (null))
GraphicsContextFlags: Default
Requested version: 1.0
Loaded opengl32.dll: 8791443046400
OpenGL will be bound to window:8325384 on thread:1
Setting pixel format... 2
Creating temporary context for wgl extensions.
Load extensions for OpenTK.Platform.Windows.Wgl... 44 extensions loaded in 28 ms.
Falling back to GL2... success! (id: 131072)
Retrieving ARB pixel formats.... Disposing context 131072.
Device context: 1744900605
Retrieving PFD pixel formats...
Destroying window: Windows.WindowInfo: Handle 853824, Parent (null)
Creating GraphicsContext.
GraphicsMode: Index: 14, Color: 32 (8888), Depth: 16, Stencil: 8, Samples: 0, Accum: 64 (16161616), Buffers: 2, Stereo: False
IWindowInfo: Windows.WindowInfo: Handle 8063238, Parent (Windows.WindowInfo: Handle 919360, Parent (null))
GraphicsContextFlags: Default
Requested version: 1.0
OpenGL will be bound to window:8063238 on thread:1
Setting pixel format... 14
Falling back to GL2... success! (id: 196608)
Load extensions for OpenTK.Platform.Windows.Wgl... 26 extensions loaded in 25 ms.
Loading extensions for OpenTK.Graphics.OpenGL.GL... 2269 extensions loaded in 249.1182 ms.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Please check GL.GetString(StringName.Version/Vendor/Renderer). You might be getting software acceleration, for some reason.

kl_mallory's picture

you were dead on. I'm getting a software renderer.

-> Fenrea.Client.OpenGL.Tests.exe Information: 0 : OpenGL vendor Microsoft Corporation, renderer version GDI Generic

I haven't run into this before, is there a way around this?

I know the video card isn't great, I have an Nvidia Quadro 4k on my desktop for the heavy lifting. But it's nice to be able to work on my project when I travel.

Thanks for your help, and for a great framework!


kl_mallory's picture

I hate to reply to my own post, but I did find that my video card uses an integrated driver by Intel, and there are a few other people who have solved this problem in other openGL apps.

Would it be presumptive to add this kind of integrated driver issue to the list of open issues? I've been doing some research on this, I just might crack open the code and find a fix, who knows? ;-)

the Fiddler's picture

Are you using the 1.0 release? Please try compiling the latest code from SVN. Whereas the old code could fall back to software rendering if the specified GraphicsMode wasn't support by the hardware, the code in SVN will only fall back to software rendering if *no* hardware accelerated mode is available.

kl_mallory's picture

I was using trunk from like 3 months back. I will build the latest and try it when I get back from Memorial Day Weekend!