Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: OpenGL fragment shader not working on core i5 laptop on windows7

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Newbie Newbie
    Join Date
    Nov 2013

    OpenGL fragment shader not working on core i5 laptop on windows7

    Hi all,
    I am new to OpenGL development. I am trying to work with some sample examples of OpenGL.
    In one example, i am trying to change colour of triangle through fragment shader but it is not reflecting in final output.

    I have tested same program on two machines with following configurations:
    1) windows 7 on core i5 CPU-- not working
    2) windows 7 on core i5-2540M CPU -- working

    Both machines are having same OpenGL libraries installed.

    Following is the fragment shader:
    #version 330 core
    out vec4 fColor;
    fColor = vec4(1.0, 0.5, 0.5,1.0f);

    By default i get white triangle, so when i try to change it through fragment shader,it doesn't reflect.

    please let me know, if any one of you have faced similar issue.


  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    CPU isn't relevant; what graphics cards do these machines have?

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Quote Originally Posted by mhagain View Post
    CPU isn't relevant...
    True, unless he's running on the integrated GPU (the i5-2540M has an HD Graphics 3000 GPU).

    sunitchanan, let's see the output of:

    Code :
    glGetString( GL_VENDOR )
    glGetString( GL_RENDERER )
    glGetString( GL_VERSION   )

    on those two machines (note: each returns a string). Also, which Core i5 is the first system? Not all i5's have on-board GPUs (List of Intel Core i5 microprocessors)

  4. #4
    Newbie Newbie
    Join Date
    Nov 2013
    Thanks for the reply.

    Here is the output i got on two machines
    1) on windows 7 on core i5 - M560 CPU
    "Intel(R) HD Graphics"
    "2.1.0 - Build"
    "1.20 - Intel Build"

    2)on windows 7 on core i5-2540M CPU
    "Intel(R) HD Graphics 3000"
    "3.1.0 - Build"
    "1.40 - Intel Build"

    Please note that i am facing issue on first machine(core i5- M560) with respect to shaders.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    OK, your first machine only supports GLSL 120 and your second GLSL 140, but you're requesting support for 330 in your shader - which is why it doesn't work. It shouldn't work on the second one either, but we can probably put that down to driver weirdness.

    You're should bump your OpenGL usage down to GL2.1 and GLSL 120 if you want it to work on both, as the hardware on the first machine just isn't capable of higher (and this is a hardware limitation, nothing to do with software).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts