OpenGL or Driver Troubles?

Hi,

im working on a openGL-project and have some troubles with the visualisation of my project. On my Computer everything looks fine, but on my Laptop something gets wrong. See here:

Thats the right one (on my PC):

and the bad one (on my laptop):

It´s 1:1 the same source code. And i dont know whats the problem.
Here some information about my systems:

------------------
System Information
------------------
   Operating System: Windows 7 Professional 32-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.111118-2330)
           Language: German (Regional Setting: German)
System Manufacturer: To Be Filled By O.E.M.
       System Model: To Be Filled By O.E.M.
               BIOS: Default System BIOS
          Processor: AMD Athlon(tm) II X4 640 Processor (4 CPUs), ~3.0GHz
             Memory: 4096MB RAM
Available OS Memory: 3200MB RAM
          Page File: 1355MB used, 5041MB available
        Windows Dir: C:\Windows
    DirectX Version: DirectX 11
DX Setup Parameters: Not found
   User DPI Setting: Using System DPI
 System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
     DxDiag Version: 6.01.7601.17514 32bit Unicode

------------
DxDiag Notes
------------
      Display Tab 1: No problems found.
        Sound Tab 1: No problems found.
        Sound Tab 2: No problems found.
          Input Tab: No problems found.

--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)

---------------
Display Devices
---------------
          Card name: ATI Radeon HD 5700 Series
       Manufacturer: ATI Technologies Inc.
          Chip type: ATI display adapter (0x68B8)
           DAC type: Internal DAC(400MHz)
     Display Memory: 2358 MB
   Dedicated Memory: 1015 MB
      Shared Memory: 1343 MB
       Current Mode: 1440 x 900 (32 bit) (75Hz)
       Monitor Name: PnP-Monitor (Standard)
        Native Mode: 1680 x 1050(p) (59.954Hz)
        Output Type: HD15
        Driver Name: aticfx32.dll,aticfx32.dll,aticfx32.dll,atiumdag.dll,atidxx32.dll,atiumdva.cap
Driver File Version: 8.17.0010.1070 (English)
     Driver Version: 8.831.2.0
        DDI Version: 11
       Driver Model: WDDM 1.1
  Driver Attributes: Final Retail
   Driver Date/Size: 3/9/2011 06:56:54, 679424 bytes
        WHQL Logo'd: Yes

 Driver Strong Name: oem1.inf:ATI.Mfg.NTx86.6.1:ati2mtag_Evergreen:8.831.2.0:pci\ven_1002&dev_68b8
     Rank Of Driver: 00E62001
        Video Accel: ModeMPEG2_A ModeMPEG2_C 
       D3D9 Overlay: Not Supported
            DXVA-HD: Not Supported
       DDraw Status: Enabled
         D3D Status: Enabled
         AGP Status: Enabled


--------------
System Devices
--------------

     Name: ATI Radeon HD 5700 Series
Device ID: PCI\VEN_1002&DEV_68B8&SUBSYS_200A1787&REV_00\4&1C1F7BC1&0&0010
   Driver: C:\Windows\system32\DRIVERS\atikmdag.sys, 8.01.0001.1134 (English), 3/9/2011 11:21:34, 7723008 bytes
   Driver: C:\Windows\system32\DRIVERS\ati2erec.dll, 1.00.0000.0019 (English), 3/9/2011 06:16:14, 53248 bytes
   Driver: C:\Windows\system32\DRIVERS\atikmpag.sys, 8.14.0001.6195 (English), 3/9/2011 06:17:24, 239616 bytes
   Driver: C:\Windows\system32\atiumdag.dll, 7.14.0010.0817 (English), 3/9/2011 06:30:30, 4294656 bytes
   Driver: C:\Windows\system32\atiumdva.dll, 8.14.0010.0299 (English), 3/9/2011 05:34:12, 3471872 bytes
   Driver: C:\Windows\system32\atitmmxx.dll, 6.14.0011.0023 (English), 3/9/2011 06:51:56, 159744 bytes
   Driver: C:\Windows\system32\atiicdxx.dat, 2/2/2011 00:01:14, 227586 bytes
   Driver: C:\Windows\system32\amdpcom32.dll, 8.14.0010.0023 (English), 3/9/2011 05:18:52, 52736 bytes
   Driver: C:\Windows\system32\atimpc32.dll, 8.14.0010.0023 (English), 3/9/2011 05:18:52, 52736 bytes
   Driver: C:\Windows\system32\atiadlxx.dll, 6.14.0010.1054 (English), 3/9/2011 06:18:08, 258048 bytes
   Driver: C:\Windows\system32\atiumdva.cap, 3/9/2011 05:33:44, 790592 bytes
   Driver: C:\Windows\system32\atimuixx.dll, 6.14.0010.1002 (English), 3/9/2011 06:51:28, 15872 bytes
   Driver: C:\Windows\system32\atiapfxx.exe, 6.14.0010.1001 (English), 3/9/2011 06:57:04, 143360 bytes
   Driver: C:\Windows\system32\atiapfxx.blb, 3/9/2011 06:57:08, 152384 bytes
   Driver: C:\Windows\system32\atiumdmv.dll, 7.14.0010.0184 (English), 3/9/2011 05:42:06, 1912832 bytes
   Driver: C:\Windows\system32\atiesrxx.exe, 6.14.0011.1088 (English), 3/9/2011 06:52:54, 176128 bytes
   Driver: C:\Windows\system32\atieclxx.exe, 6.14.0011.1088 (English), 3/9/2011 06:53:18, 393216 bytes
   Driver: C:\Windows\system32\atipdlxx.dll, 6.14.0010.2563 (English), 3/9/2011 06:51:42, 356352 bytes
   Driver: C:\Windows\system32\Oemdspif.dll, 6.15.0006.0006 (English), 3/9/2011 06:51:34, 278528 bytes
   Driver: C:\Windows\system32\ati2edxx.dll, 6.14.0010.2514 (English), 3/9/2011 06:51:22, 43520 bytes
   Driver: C:\Windows\system32\ATIDEMGX.dll, 2.00.4084.43012 (German), 3/9/2011 06:53:44, 462848 bytes
   Driver: C:\Windows\system32\atioglxx.dll, 6.14.0010.10600 (English), 3/9/2011 07:19:22, 17397248 bytes
   Driver: C:\Windows\system32\aticaldd.dll, 6.14.0010.1332 (English), 3/9/2011 06:32:32, 5618688 bytes
   Driver: C:\Windows\system32\aticalrt.dll, 6.14.0010.1332 (English), 3/9/2011 06:34:34, 46080 bytes
   Driver: C:\Windows\system32\aticalcl.dll, 6.14.0010.1332 (English), 3/9/2011 06:34:22, 44032 bytes
   Driver: C:\Windows\system32\atipblag.dat, 1/13/2011 05:03:18, 3155 bytes
   Driver: C:\Windows\system32\atiu9pag.dll, 8.14.0001.6195 (English), 3/9/2011 06:16:48, 28672 bytes
   Driver: C:\Windows\system32\atigktxx.dll, 8.14.0001.6195 (English), 3/9/2011 06:17:48, 32768 bytes
   Driver: C:\Windows\system32\atiglpxx.dll, 8.14.0001.6195 (English), 3/9/2011 06:17:56, 12800 bytes
   Driver: C:\Windows\system32\atibtmon.exe, 2.00.0000.0000 (English), 5/12/2009 00:35:28, 118784 bytes
   Driver: C:\Windows\system32\atidxx32.dll, 8.17.0010.0342 (English), 3/9/2011 06:48:46, 4277760 bytes
   Driver: C:\Windows\system32\atiuxpag.dll, 8.14.0001.6195 (English), 3/9/2011 06:17:00, 31232 bytes
   Driver: C:\Windows\atiogl.xml, 1/14/2011 19:00:54, 30831 bytes
   Driver: C:\Windows\system32\ATIODCLI.exe, 1.00.0000.0001 (English), 6/22/2009 18:34:18, 45056 bytes
   Driver: C:\Windows\system32\ATIODE.exe, 1.00.0000.0001 (English), 8/27/2010 21:32:08, 294912 bytes
   Driver: C:\Windows\system32\aticfx32.dll, 8.17.0010.1070 (English), 3/9/2011 06:56:54, 679424 bytes
   Driver: C:\Windows\system32\coinst.dll, 1.00.0003.0005 (English), 3/9/2011 06:11:04, 52736 bytes



and the laptop:

------------------
System Information
------------------

   Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.111118-2330)
           Language: German (Regional Setting: German)
System Manufacturer: Hewlett-Packard
       System Model: HP Pavilion g6 Notebook PC      
               BIOS: InsydeH2O Version 03.61.01F.24
          Processor: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (4 CPUs), ~2.3GHz
             Memory: 4096MB RAM
Available OS Memory: 4044MB RAM
          Page File: 2144MB used, 5941MB available
        Windows Dir: C:\Windows
    DirectX Version: DirectX 11
DX Setup Parameters: Not found
   User DPI Setting: Using System DPI
 System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
     DxDiag Version: 6.01.7601.17514 32bit Unicode

------------
DxDiag Notes
------------
      Display Tab 1: No problems found.
        Sound Tab 1: No problems found.
        Sound Tab 2: No problems found.
          Input Tab: No problems found.

--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)

---------------
Display Devices
---------------
          Card name: Intel(R) HD Graphics Family
       Manufacturer: Intel Corporation
          Chip type: Intel(R) HD Graphics Family
           DAC type: Internal
     Display Memory: 1696 MB
   Dedicated Memory: 64 MB
      Shared Memory: 1632 MB
       Current Mode: 1366 x 768 (32 bit) (60Hz)
       Monitor Name: PnP-Monitor (Standard)
      Monitor Model: unknown
        Native Mode: 1366 x 768(p) (60.031Hz)
        Output Type: Internal
        Driver Name: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumdx32,igd10umd32,igd10umd32
Driver File Version: 8.15.0010.2353 (English)
     Driver Version: 8.15.10.2353
        DDI Version: 10.1
       Driver Model: WDDM 1.1
  Driver Attributes: Final Retail
   Driver Date/Size: 5/3/2011 20:07:28, 7473664 bytes
        WHQL Logo'd: Yes
 Driver Strong Name: oem7.inf:Intel.Mfg.NTamd64:iSNBM0:8.15.10.2353:pci\ven_8086&dev_0116&subsys_166f103c
     Rank Of Driver: 00E60001
        Video Accel: ModeMPEG2_A ModeMPEG2_C ModeWMV9_C ModeVC1_C 
       D3D9 Overlay: Supported
            DXVA-HD: Supported
       DDraw Status: Enabled
         D3D Status: Enabled
         AGP Status: Enabled

Hope someone can help me.

Thx and regards!

I think you have given us everything except the useful information!, eg OpenGL version and profile used by your application.
Do you detect and use extensions? How, and which are reported on each platform?
What about OpenGL version? Does your app rely upon some specific minimum version?

The biggest problem is this one:

Intel(R) HD Graphics Family

…as Intel is notoriously bad with OpenGL.

I dont know how to check the openG-Version. I found just some unserious tools which i dont want to install. I use Windows7. Isn´t there another Method to check it?
Btw: I use the OpenTK - GameWindow.

I dont know how to check the openG-Version.

Here is easy way (assuming compatibility profile which most likely what you are using)


std::cout << "
" << glGetString(GL_VERSION)
          << "
" << glGetString(GL_EXTENSIONS)
          << "
" << glGetString(GL_VENDOR);

i never used c++. what should i (#include) to can use these methods?

glGetString(…)

thx

Just printf the strings returned by each glGetString call.

I used this code:

/*************************************************************/ 
#include "StdAfx.h"
#include <stdio.h> 
#include <windows.h> 
#include <GL\gl.h> 
/*************************************************************/ 
#pragma comment(lib, "opengl32.lib") 
/*************************************************************/ 
int main() 
{ 
    printf("OpenGL Check
"); 
    printf("
OpenGL Version: %s
", glGetString(GL_VERSION)); 
    printf("	glGetError: %x
", glGetError()); 
    printf("OpenGL Extensionen: %s
", glGetString(GL_EXTENSIONS)); 
    printf("	glGetError: %x
", glGetError()); 

    getchar(); 

    return(0); 
} 
/*************************************************************/

and got the following result:

OpenGL Check

OpenGL Version: (null)
glGetError: 502
OpenGL Extension: (null)
glGetError: 502

You’re supposed to initialize OpenGL and get a valid context before calling GL functions.

Is it that hard to show how? As more as this is no software i want to write and profit from it, just want to check my troubles.

thx

… show how?

Didn’t you write the OpenGL program that you’re talking about? You must already have some library, code, or whatever that you use to create and manage that OpenGL window. Indeed, you could just hack your current code to dump those strings into a file once your OpenGL window finished opening.

So, did you write that application or not?

In OpenTK you should be able to get this data with the function OpenTK.Graphics.OpenGL.GL.GetString.

Just call it somewhere after you initialized your gamewindow and output the results.

Thx a lot!

Here are the Laptop-Properties:

GL_VERSION: 3.0.0 - Build 8.15.10.2353
GL_EXTENSION: GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_texture_edge_clamp GL_EXT_separate_specular_color GL_ARB_multitexture GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_color_buffer_float GL_ARB_half_float_pixel GL_ARB_texture_float GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_EXT_draw_buffers2 GL_WIN_swap_hint GL_EXT_texture_sRGB GL_ARB_multisample GL_EXT_packed_float GL_EXT_texture_shared_exponent GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_NV_conditional_render GL_EXT_texture_swizzle GL_ARB_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_ARB_depth_buffer_float GL_EXT_transform_feedback GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_ARB_framebuffer_object GL_EXT_texture_array GL_EXT_texture_integer GL_ARB_map_buffer_range GL_EXT_texture_snorm GL_INTEL_performance_queries GL_ARB_vertex_array_object
GL_VENDOR: Intel
GL_RENDERER: Intel(R) HD Graphics Family
GL_ShadingLanguageVersion: 1.30 - Intel Build 8.15.10.2353

Here are the PC-Properties:

GL_VERSION: 4.1.10600 Compatibility Profile Context
GL_EXTENSION: GL_AMDX_debug_output GL_AMDX_vertex_shader_tessellator GL_AMD_conservative_depth GL_AMD_debug_output GL_AMD_depth_clamp_separate GL_AMD_draw_buffers_blend GL_AMD_name_gen_delete GL_AMD_performance_monitor GL_AMD_sample_positions GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export GL_AMD_shader_trace GL_AMD_texture_cube_map_array GL_AMD_texture_texture4 GL_AMD_transform_feedback3_lines_triangles GL_AMD_vertex_shader_tessellator GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_color_buffer_float GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_draw_indirect GL_ARB_draw_instanced GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_provoking_vertex GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_stencil_export GL_ARB_shader_subroutine GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_snorm GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_meminfo GL_ATI_separate_stencil GL_ATI_texture_compression_3dc GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_copy_buffer GL_EXT_copy_texture GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_histogram GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shader_image_load_store GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_bptc GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_explicit_multisample GL_NV_float_buffer GL_NV_half_float GL_NV_primitive_restart GL_NV_texgen_reflection GL_NV_texture_barrier GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_swap_control
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: ATI Radeon HD 5700 Series
GL_ShadingLanguageVersion: 4.10

I thought OpenGL will be updated automatically by Windows-Update, but i got no one?

GL_VERSION: 3.0.0 - Build 8.15.10.2353

Looks like you’ve got a newer Intel chipset.

I thought OpenGL will be updated automatically by Windows-Update, but i got no one?

Different hardware supports different version of OpenGL. Specifically: OpenGL 4.x has tessellation, random image write support and a number of other goodies. Intel GPU’s do not have any of these capabilities, so regardless of how new the drivers are, that hardware does not have that ability, thus it cannot report GL 4.x. [As a side note, GeForce 8xxx, 9xxx, 1xx, 2xx and 3xx also cannot support GL 4.x, but their drivers are regularly updated by NVIDIA].

My usual bet is that the Intel GPU and driver combination is what is causing your issues, but … sometimes it pays to not jump the gun.

Check got GL errors (glGetError), if an error comes up, pinpoint what GL call(s) generate the error(s).

Also, check that your shaders successfully compiled and linked on the laptop.

hi,

first thanks for your answer.
I want to remember that i use OpenTK-GameWindow. In my Programm i dont get a error, dont know why, but when you install OpenTK, u will get the OpenTK-Sample Browser. In the Sample OpenGL->Picking, thats what i implemented and what cause my problem, i get always the Error “Error at Swapbuffers: InvalidEnum
The source code of that Example is:

using System;
using System.IO;
using System.Drawing;
using System.Diagnostics;

using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using OpenTK.Input;

using Examples.Shapes;

namespace Examples.Tutorial
{
    /// <summary>
    /// This demo shows over which triangle the cursor is, it does so by assigning all 3 vertices of a triangle the same Ids.
    /// Each Id is a uint, split into 4 bytes and used as triangle color. In an extra pass, the screen is cleared to uint.MaxValue,
    /// and then the mesh is drawn using color. Using GL.ReadPixels() the value under the mouse cursor is read and can be converted.
    /// </summary>
    [Example("Picking", ExampleCategory.OpenGL, "1.x", Documentation = "Picking")]
    class Picking : GameWindow
    {
        /// <summary>Creates a 800x600 window with the specified title.</summary>
        public Picking()
            : base(800, 600, GraphicsMode.Default, "Picking", GameWindowFlags.Default, DisplayDevice.Default, 1, 1, GraphicsContextFlags.Default)
        {
            VSync = VSyncMode.On;
        }

        struct Byte4
        {
            public byte R, G, B, A;

            public Byte4(byte[] input)
            {
                R = input[0];
                G = input[1];
                B = input[2];
                A = input[3];
            }

            public uint ToUInt32()
            {
                byte[] temp = new byte[] { this.R, this.G, this.B, this.A };
                return BitConverter.ToUInt32(temp, 0);
            }

            public override string ToString()
            {
                return this.R + ", " + this.G + ", " + this.B + ", " + this.A;
            }
        }

        struct Vertex
        {
            public Byte4 Color; // 4 bytes
            public Vector3 Position; // 12 bytes

            public const byte SizeInBytes = 16;
        }

        const TextureTarget Target = TextureTarget.TextureRectangleArb;
        float angle;
        BeginMode VBO_PrimMode;
        Vertex[] VBO_Array;
        uint VBO_Handle;

        uint SelectedTriangle;

        // int VertexShaderObject, FragmentShaderObject, ProgramObject;

        /// <summary>Load resources here.</summary>
        /// <param name="e">Not used.</param>
        protected override void OnLoad(EventArgs e)
        {
            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.CullFace);

            #region prepare data for VBO from procedural object
            DrawableShape temp_obj = new SierpinskiTetrahedron(3f, SierpinskiTetrahedron.eSubdivisions.Five, false);
            VertexT2fN3fV3f[] temp_VBO;
            uint[] temp_IBO;
            temp_obj.GetArraysforVBO(out VBO_PrimMode, out temp_VBO, out temp_IBO);
            temp_obj.Dispose();
            if (temp_IBO != null)
                throw new Exception("Expected data for GL.DrawArrays, but Element Array is not null.");

            // Convert from temp mesh to final object, copy position and add triangle Ids for the color attribute.
            VBO_Array = new Vertex[temp_VBO.Length];
            int TriangleCounter = -1;
            for (int i = 0; i < temp_VBO.Length; i++)
            {
                // Position
                VBO_Array[i].Position = temp_VBO[i].Position;

                // Index
                if (i % 3 == 0)
                    TriangleCounter++;
                VBO_Array[i].Color = new Byte4(BitConverter.GetBytes(TriangleCounter));
            }
            #endregion prepare data for VBO from procedural object

            #region Setup VBO for drawing
            GL.GenBuffers(1, out VBO_Handle);
            GL.BindBuffer(BufferTarget.ArrayBuffer, VBO_Handle);
            GL.BufferData<Vertex>(BufferTarget.ArrayBuffer, (IntPtr)(VBO_Array.Length * Vertex.SizeInBytes), VBO_Array, BufferUsageHint.StaticDraw);
            GL.InterleavedArrays(InterleavedArrayFormat.C4ubV3f, 0, IntPtr.Zero);

            ErrorCode err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("VBO Setup failed (Error: " + err + "). Attempting to continue.");
            #endregion Setup VBO for drawing

            #region Shader
            /*
            // Load&Compile Vertex Shader

            using (StreamReader sr = new StreamReader("Data/Shaders/Picking_VS.glsl"))
            {
                VertexShaderObject = GL.CreateShader(ShaderType.VertexShader);
                GL.ShaderSource(VertexShaderObject, sr.ReadToEnd());
                GL.CompileShader(VertexShaderObject);
            }

            err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("Vertex Shader: " + err);

            string LogInfo;
            GL.GetShaderInfoLog(VertexShaderObject, out LogInfo);
            if (LogInfo.Length > 0 && !LogInfo.Contains("hardware"))
                Trace.WriteLine("Vertex Shader failed!
Log:
" + LogInfo);
            else
                Trace.WriteLine("Vertex Shader compiled without complaint.");

            // Load&Compile Fragment Shader

            using (StreamReader sr = new StreamReader("Data/Shaders/Picking_FS.glsl"))
            {
                FragmentShaderObject = GL.CreateShader(ShaderType.FragmentShader);
                GL.ShaderSource(FragmentShaderObject, sr.ReadToEnd());
                GL.CompileShader(FragmentShaderObject);
            }
            GL.GetShaderInfoLog(FragmentShaderObject, out LogInfo);

            err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("Fragment Shader: " + err);

            if (LogInfo.Length > 0 && !LogInfo.Contains("hardware"))
                Trace.WriteLine("Fragment Shader failed!
Log:
" + LogInfo);
            else
                Trace.WriteLine("Fragment Shader compiled without complaint.");

            // Link the Shaders to a usable Program
            ProgramObject = GL.CreateProgram();
            GL.AttachShader(ProgramObject, VertexShaderObject);
            GL.AttachShader(ProgramObject, FragmentShaderObject);

            // link it all together
            GL.LinkProgram(ProgramObject);

            err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("LinkProgram: " + err);

            GL.UseProgram(ProgramObject);

            err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("UseProgram: " + err);

            // flag ShaderObjects for delete when not used anymore
            GL.DeleteShader(VertexShaderObject);
            GL.DeleteShader(FragmentShaderObject);

            int temp;
            GL.GetProgram(ProgramObject, ProgramParameter.LinkStatus, out temp);
            Trace.WriteLine("Linking Program (" + ProgramObject + ") " + ((temp == 1) ? "succeeded." : "FAILED!"));
            if (temp != 1)
            {
                GL.GetProgramInfoLog(ProgramObject, out LogInfo);
                Trace.WriteLine("Program Log:
" + LogInfo);
            }

            Trace.WriteLine("End of Shader build. GL Error: " + GL.GetError());

            GL.UseProgram(0);
*/
            #endregion Shader

        }

        protected override void OnUnload(EventArgs e)
        {
            GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
            GL.DeleteBuffers(1, ref VBO_Handle);

            base.OnUnload(e);
        }

        /// <summary>
        /// Called when your window is resized. Set your viewport here. It is also
        /// a good place to set up your projection matrix (which probably changes
        /// along when the aspect ratio of your window).
        /// </summary>
        /// <param name="e">Contains information on the new Width and Size of the GameWindow.</param>
        protected override void OnResize(EventArgs e)
        {
            GL.Viewport(ClientRectangle);

            Matrix4 projection = Matrix4.CreatePerspectiveFieldOfView(MathHelper.PiOver4, this.Width / (float)this.Height, 0.1f, 10.0f);
            GL.MatrixMode(MatrixMode.Projection);
            GL.LoadMatrix(ref projection);
        }

        /// <summary>
        /// Called when it is time to setup the next frame. Add you game logic here.
        /// </summary>
        /// <param name="e">Contains timing information for framerate independent logic.</param>
        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            if (Keyboard[Key.Escape])
                Exit();
        }

        /// <summary>
        /// Called when it is time to render the next frame. Add your rendering code here.
        /// </summary>
        /// <param name="e">Contains timing information.</param>
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            GL.Color3(Color.White);
            GL.Enable(EnableCap.ColorArray);

            #region Pass 1: Draw Object and pick Triangle
            GL.ClearColor(1f, 1f, 1f, 1f); // clears to uint.MaxValue
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            Matrix4 modelview = Matrix4.LookAt(Vector3.UnitZ, Vector3.Zero, Vector3.UnitY);
            GL.MatrixMode(MatrixMode.Modelview);
            GL.LoadMatrix(ref modelview);
            GL.Translate(0f, 0f, -3f);
            GL.Rotate(angle, Vector3.UnitX);
            GL.Rotate(angle, Vector3.UnitY);
            angle += (float)e.Time * 3.0f;

            // You may re-enable the shader, but it works perfectly without and will run on intel HW too
            // GL.UseProgram(ProgramObject);
            GL.DrawArrays(VBO_PrimMode, 0, VBO_Array.Length);
            // GL.UseProgram(0);

            // Read Pixel under mouse cursor
            Byte4 Pixel = new Byte4();
            GL.ReadPixels(Mouse.X, this.Height - Mouse.Y, 1, 1, PixelFormat.Rgba, PixelType.UnsignedByte, ref Pixel);
            SelectedTriangle = Pixel.ToUInt32();
            #endregion Pass 1: Draw Object and pick Triangle

            GL.Color3(Color.White);
            GL.Disable(EnableCap.ColorArray);

            #region Pass 2: Draw Shape
            if (SelectedTriangle == uint.MaxValue)
                GL.ClearColor(.2f, .1f, .3f, 1f); // purple
            else
                GL.ClearColor(0f, .2f, .3f, 1f); // cyan
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            GL.Color3(1f, 1f, 1f);
            GL.DrawArrays(VBO_PrimMode, 0, VBO_Array.Length);

            GL.PolygonMode(MaterialFace.Front, PolygonMode.Line);
            GL.Color3(Color.Red);
            GL.DrawArrays(VBO_PrimMode, 0, VBO_Array.Length);
            GL.PolygonMode(MaterialFace.Front, PolygonMode.Fill);

            if (SelectedTriangle != uint.MaxValue)
            {
                GL.Disable(EnableCap.DepthTest);
                GL.Color3(Color.Green);
                GL.DrawArrays(VBO_PrimMode, (int)SelectedTriangle * 3, 3);
                GL.Enable(EnableCap.DepthTest);
            }
            #endregion Pass 2: Draw Shape

           this.SwapBuffers();

            ErrorCode err = GL.GetError();
            if (err != ErrorCode.NoError)
                Trace.WriteLine("Error at Swapbuffers: " + err);
        }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            // The 'using' idiom guarantees proper resource cleanup.
            // We request 30 UpdateFrame events per second, and unlimited
            // RenderFrame events (as fast as the computer can handle).
            using (Picking example = new Picking())
            {
                // Get the title and category  of this example using reflection.
                ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]);
                example.Title = String.Format("OpenTK | {0} {1}: {2} (use the mouse to pick)", info.Category, info.Difficulty, info.Title);
                example.Run(30.0);
            }
        }
    }
}

So the Error occure in the OnRenderFrame() when SwapBuffers() is called.

As u can see the Shader is commented and not used, so i dont use it, too. Because im a beginner in OpenGL-Programming. Could it be that thats the problem?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.