Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - herotom99

Pages: [1]
1
General / Re: OpenGL: Version 0.0
« on: March 25, 2016, 10:39:49 am »
I found the problem !

It was about my opengl32.dll
I used an old .dll because it was the same on my laptop.
I took the opengl32.dll in C:/Windows/system32/ and now it work !

I have also tried to use the "new" .dll on my laptop to be sure that I can switch between two pc without having to change the .dll and it looks to works correctly.

Thanks a lot for your help and your time !
You are awesome (first meaning)  :D !

2
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 11:56:26 pm »
Another thing, I have tried the OpenGL example in the "examples" file.
It works and I tried to recreate the program with the "OpenGL.cpp". It compiled
but it crashs when I launch the program.
It spams "Failed to activate the window's context"

3
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 11:23:42 pm »
SFML 2.3.2 Visual Studio 2013 32bits
I think it's the last version

4
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 11:07:50 pm »
I have downloaded OpenGL Extensions Viewer, make a complete test and there is no problem to create a context 4.4. It's very stange. I think it's not a problem of driver because everything else works...

5
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 10:16:30 pm »
I have installed different drivers:
-362.00
-361.91
-358.50
then come back to 364.51 but it doesn't works.

6
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 08:42:21 pm »
I have already tried to rollback the driver to the previous but it doesn't work, I will try to use a "more" old driver.

7
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 08:36:41 pm »
When go in the files drivers I have (about OpenGL):

For 32 bits:
-NvIFROpenGL.dll  (version: 10.18.13.6451)
-OpenCL.dll (version: 1.2.11.0)
-nvopencl.dll (version: 6.14.13.6451)

And 64 bits:
-OpenCL64.dll (version: 1.2.11.0)
-nvopencl.dll (version: 6.14.13.6451)

I don't know if it can help

8
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 08:31:56 pm »
It is a Desktop and I have the last nvidia driver: 364.51

9
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 08:14:34 pm »
Hum... Really I don't understand.
I have remove everything about glew.

And it still to return a null pointer ...

#include <iostream>
#include <string>

#include "SFML\OpenGL.hpp"
#include "SFML\Graphics.hpp"
#include "SFML\Window.hpp"

using namespace std;

int main(int argc, char *args[])
{
        sf::RenderWindow(sf::VideoMode(100, 100), "Opengl");

        const char* gl_version = (const char*)(glGetString(GL_VERSION));
        printf("GLVersion: %s\n", gl_version);

        system("pause");

        return 0;
}

Same thing without creating a window.

The result:
https://gyazo.com/37cad4f7696610d7e53712b67a530970

And when I use:
std::cout << glGetString(GL_VERSION) << std::endl;
It just crash :/

10
General / Re: OpenGL: Version 0.0
« on: March 24, 2016, 03:35:26 pm »
I think this is what you want:
https://gyazo.com/def7cb3534693548320471bb2e6483ad

and I am using the opengl32.dll


#include <iostream>
#include <string>

#include "GL\glew.h"

#include "SFML\OpenGL.hpp"
#include "SFML\Graphics.hpp"
#include "SFML\Window.hpp"

#include "glm\gtx\transform.hpp"

11
General / Re: OpenGL: Version 0.0
« on: March 23, 2016, 10:24:13 pm »
Hum... I don't understand I can't call this function without glew:

Error   1   error LNK2019: unresolved external symbol __imp__glGetString@4 referenced in function _main   


I can't call this function because I need an OpenGL Context and it is the problem.
And I use a char*, it return NULL :/

12
General / Re: OpenGL: Version 0.0
« on: March 23, 2016, 10:10:57 pm »
It just crash on this line (with debug mode) so I have nothing.

By the way, I have made a total clean up of my card drivers and the problem still here.
So, I think drivers are not the problem or the installation is always corrupted.

13
General / Re: OpenGL: Version 0.0
« on: March 23, 2016, 08:00:06 pm »
I have reroll my drivers but it doesn't works then re-updated and nothing ...

14
General / Re: OpenGL: Version 0.0
« on: March 23, 2016, 07:34:15 pm »
I've already updated my drivers :/
My friend has also tried the program and it works (GTX 950m).

15
General / OpenGL: Version 0.0
« on: March 23, 2016, 11:29:29 am »
Hi,
I'm trying to use correclty OpenGL on two different pc.

The first is a Laptop and it works perfectly:
-Intel(R) HD Graphics 4000
-Drivers updated
-Windows 10

But on my second pc (more powerful  :) ), I have an error:
-NVIDIA GeForce GTX770 4Go
-Drivers updated
-Windows 7

Here is the error message:
https://gyazo.com/7aae9d9c6f14e3dcac6b9f4899f212cc

I use the same code and it is recompiled before use it.

Code:
#include <iostream>
#include <string>

#include "GL\glew.h"

#include "SFML\OpenGL.hpp"
#include "SFML\Graphics.hpp"
#include "SFML\Window.hpp"

#include "glm\gtx\transform.hpp"

#include "Camera.h"

using namespace std;

int main(int argc, char *args[])
{
        sf::Context context;
        sf::ContextSettings settings;
        settings.depthBits = 24;
        settings.stencilBits = 8;
        settings.majorVersion = 4;
        settings.minorVersion = 0;
        settings.antialiasingLevel = 8;

        sf::RenderWindow window(sf::VideoMode(1280, 800), "OpenGL",sf::Style::Close, settings);

        glewExperimental = GL_TRUE;
        glewInit();

        sf::Event event;

        Camera camera(glm::vec3(4,4,3),1280.f / 800.f, glm::radians(90.f), 0.0001f, 1000.0f);

        bool IsRunning = true;

        //OPENGL//

        float points[] = {
                0.0f, 0.5f, 0.0f,
                0.5f, -0.5f, 0.0f,
                -0.5f, -0.5f, 0.0f
        };

        GLuint vbo = 0;
        glGenBuffers(1, &vbo);
        glBindBuffer(GL_ARRAY_BUFFER, vbo);
        glBufferData(GL_ARRAY_BUFFER, sizeof(points), points, GL_STATIC_DRAW);

        GLuint vao = 0;
        glGenVertexArrays(1, &vao);
        glBindVertexArray(vao);
        glEnableVertexAttribArray(0);
        glBindBuffer(GL_ARRAY_BUFFER, vbo);
        glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);

        const char* vertex_shader =
                "#version 400\n"
                "in vec3 vp;"
                "uniform mat4 MVP;"
                "void main () {"
                "  gl_Position = MVP * vec4 (vp, 1.0);"
                "}";

        const char* fragment_shader =
                "#version 400\n"
                "out vec4 frag_colour;"
                "void main () {"
                "  frag_colour = vec4 (1.0, 0.0, 0.0, 1.0);"
                "}";

        GLuint vs = glCreateShader(GL_VERTEX_SHADER);
        glShaderSource(vs, 1, &vertex_shader, NULL);
        glCompileShader(vs);
        GLuint fs = glCreateShader(GL_FRAGMENT_SHADER);
        glShaderSource(fs, 1, &fragment_shader, NULL);
        glCompileShader(fs);

        GLuint shader_programme = glCreateProgram();
        glAttachShader(shader_programme, fs);
        glAttachShader(shader_programme, vs);
        glLinkProgram(shader_programme);



        while (IsRunning)
        {
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed) IsRunning = false;
                }

                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

                glUseProgram(shader_programme);

                GLuint MVPID = glGetUniformLocation(shader_programme, "MVP");
                glUniformMatrix4fv(MVPID, 1, GL_FALSE, &camera.MVPMatrix()[0][0]);

                glBindVertexArray(vao);
                glDrawArrays(GL_TRIANGLES, 0, 3);

                window.display();
        }

        window.close();

        return 0;
}

Thanks for your help !

Pages: [1]
anything