SFML community forums

Help => Graphics => Topic started by: Metapyziks on December 31, 2009, 11:56:33 pm

Title: [SFML 2] Using opengl
Post by: Metapyziks on December 31, 2009, 11:56:33 pm
(I'm using VC++ 2008 express)

I'm trying to use opengl in a project, but I keep getting errors similar to this:
Code: [Select]
1>.\main.cpp(23) : error C3861: 'glClearDepth': identifier not found
1>.\main.cpp(24) : error C3861: 'glClearColor': identifier not found
1>.\main.cpp(27) : error C2065: 'GL_DEPTH_TEST' : undeclared identifier
....


There are many more like that, one for each opengl related thing I reference.

I tested it with the opengl example from your tutorials (the errors above are from that). I have included the following things as additional dependencies in the linker settings:
Code: [Select]
glu32.lib
opengl32.lib
sfml-main.lib
sfml-system.lib
sfml-window.lib
sfml-graphics.lib


What could the problem be?
Title: [SFML 2] Using opengl
Post by: Nexus on January 01, 2010, 02:19:28 am
Did you write the following include directive?
Code: [Select]
#include <SFML/OpenGL.hpp>
Title: [SFML 2] Using opengl
Post by: jt030105 on January 17, 2010, 11:51:59 pm
you haven't installed the opengl library.
I don't know how to install it in vc because I am using gcc and will never use vc
Title: [SFML 2] Using opengl
Post by: jt030105 on January 17, 2010, 11:52:54 pm
Quote from: "Nexus"
Did you write the following include directive?
Code: [Select]
#include <SFML/OpenGL.hpp>


there is no SFML/OpenGL.hpp
Title: [SFML 2] Using opengl
Post by: Oz1571 on January 18, 2010, 12:13:37 am
Quote from: "jt030105"
Quote from: "Nexus"
Did you write the following include directive?
Code: [Select]
#include <SFML/OpenGL.hpp>


there is no SFML/OpenGL.hpp


Yes there is! I'm using it.  :wink:
Title: [SFML 2] Using opengl
Post by: Nexus on January 18, 2010, 12:26:20 am
It may depend on your SFML version. I'm not sure about this, but perhaps OpenGL.hpp is in the Graphics folder in older versions, just search the file in the SFML directory.
Title: [SFML 2] Using opengl
Post by: Laurent on January 18, 2010, 07:51:57 am
Quote
there is no SFML/OpenGL.hpp

Don't forget that we're talking about SFML 2 ;)
Title: [SFML 2] Using opengl
Post by: jt030105 on January 24, 2010, 06:53:26 pm
Quote from: "Laurent"
Quote
there is no SFML/OpenGL.hpp

Don't forget that we're talking about SFML 2 ;)


I love opengl, I would like to use GL/gl.h
Title: [SFML 2] Using opengl
Post by: OniLinkPlus on January 24, 2010, 07:50:21 pm
Quote from: "jt030105"
Quote from: "Laurent"
Quote
there is no SFML/OpenGL.hpp

Don't forget that we're talking about SFML 2 ;)


I love opengl, I would like to use GL/gl.h
Which SFML/OpenGL.hpp includes