Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: Lolilolight

Search: Search took 0.00 seconds.

  1. I suppose that you have the vertex position in...

    I suppose that you have the vertex position in view space. (in your shader)

    To get the vertex position in world space you have just to multiply your vertex by the inverse of the modelview matrix.
  2. I've tried this : const std::string...

    I've tried this :



    const std::string perPixLightingFragmentShader =
    "#version 130 \n"
    "uniform sampler2D normalMap;"
    "uniform vec3 resolution;"
    ...
  3. Problem with normal mapping. (Fragment position)

    Hi, I'm trying to set up a shader for normal mapping in a 2D context.

    This following image show what I'm trying to do :

    1370

    The normal map contains the normals of my tiles, and their...
  4. Maybe you can loop on all the triangles of your...

    Maybe you can loop on all the triangles of your surface and use the "raytracing" algorithm. (This is how I do)
  5. Replies
    6
    Views
    1,217

    Ok now I'm trying to bind textures but I've a...

    Ok now I'm trying to bind textures but I've a strange result. :o

    Here is the code :



    #include <GL/glew.h>
    #include <GL/gl.h>
    #include <SFML/Window.hpp>
    #include <iostream>
  6. Replies
    6
    Views
    1,217

    Woooowwwww, I didn't know that, I've read the...

    Woooowwwww, I didn't know that, I've read the tutorials on your website but I think I should have missed something.

    Ok so i suppose that I have to use triangles strips instead.

    But I'm...
  7. Replies
    6
    Views
    1,217

    I've tried to install the proprietary drivers...

    I've tried to install the proprietary drivers from the amd web site but as I excepected it tells me that there are not compatible with my graphical card. (Under ubuntu 14.04)
  8. Replies
    6
    Views
    1,217

    Ok, it works with triangles but not with quads....

    Ok, it works with triangles but not with quads. :/




    int main(int argc, char* argv[]) {
    odfaeg::RenderWindow window(sf::VideoMode(800, 600, 32), "Modern...
  9. Replies
    6
    Views
    1,217

    Trying to use modern opengl on linux.

    Hi, I've installed the last version of mesa driver, but, this one seems to be still experimental, and ..., I'm just wandering if I shoudn't use old opengl versions on linux.

    I'm trying to display...
  10. I've solved this, we must bind the shader before...

    I've solved this, we must bind the shader before changind parameters, I simply didn't know that.
  11. Problem when passing a matrix4f to my vertex shader.

    Hi!

    I'm trying to pass an array of 16 float to my shader (which represent a 4*4 matrix), but My shader doesn't draw nothing event if I pass an identity matrix.

    Here is the code :


    ...
  12. I've found the solution, we have just to separate...

    I've found the solution, we have just to separate the layout qualifiers by a , :


    "#version 330 core \n"
    "layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;"
    ...
  13. How to change the fragcoords relative location. (from the window)

    Hi!

    I want to change the origin lower left to the origin upper left corner like it's explained in the documentation :
    https://www.opengl.org/sdk/docs/man/html/gl_FragCoord.xhtml

    But I have an...
  14. O_O I've tried the source code of the first...

    O_O I've tried the source code of the first triangle from thte tutorial, and even if opengl returns me some errors, it's displaying something, so...
  15. This function returns 1 as value which is...

    This function returns 1 as value which is corresponding to the core profile :


    GLint profile;
    glGetIntegerv(GLX_CONTEXT_PROFILE_MASK_ARB, &profile);
    std::cout<<"profile : "<<profile;

    ...
  16. Haha! It seems that x11 don't want to create me...

    Haha!
    It seems that x11 don't want to create me a CORE profile, I have opengl errors when I call opengl functions.


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include...
  17. No, even if I put the source code into a...

    No, even if I put the source code into a separated file, the version 330 of my shaders doesn't compile.
  18. I've tried this : int attributes[] = ...

    I've tried this :


    int attributes[] =
    {
    GLX_CONTEXT_MAJOR_VERSION_ARB, static_cast<int>(m_settings.majorVersion),
    ...
  19. Mmm..., I have a core profile, if I try to create...

    Mmm..., I have a core profile, if I try to create a compatibility profile it fails to create the opengl context.

    And I load my shader from the memory so I need the \n otherwise, the text is...
  20. Mmm .......... I think that driver doesn't...

    Mmm .......... I think that driver doesn't support opengl 3.3 very, well.

    Opengl return me an invalid error while generating the vao.

    And the compilation of the shaders fails :


    const...
  21. It was glew which was not initialized, c++ simply...

    It was glew which was not initialized, c++ simply doesn't want to enter into my function which initialize glew so I typed all the code of the function into the constructor of my window and now it...
  22. Mesa 10.3.0 driver with ATI graphics card and opengl 3.3 (Driver bug ?)

    Hi!

    I'm trying to use moddern opengl with opensource drivers on linux.

    But I have a crash when I'm trying to generate a vao : (After creating the opengl context and the window, the opengl...
Results 1 to 22 of 22