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

Author Topic: [SFML 2] Using opengl  (Read 5168 times)

0 Members and 1 Guest are viewing this topic.

Metapyziks

  • Newbie
  • *
  • Posts: 33
    • View Profile
[SFML 2] Using opengl
« 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?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
[SFML 2] Using opengl
« Reply #1 on: January 01, 2010, 02:19:28 am »
Did you write the following include directive?
Code: [Select]
#include <SFML/OpenGL.hpp>
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

jt030105

  • Newbie
  • *
  • Posts: 4
    • View Profile
[SFML 2] Using opengl
« Reply #2 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
OpenGL

jt030105

  • Newbie
  • *
  • Posts: 4
    • View Profile
[SFML 2] Using opengl
« Reply #3 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
OpenGL

Oz1571

  • Newbie
  • *
  • Posts: 28
    • View Profile
[SFML 2] Using opengl
« Reply #4 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:

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
[SFML 2] Using opengl
« Reply #5 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2] Using opengl
« Reply #6 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 ;)
Laurent Gomila - SFML developer

jt030105

  • Newbie
  • *
  • Posts: 4
    • View Profile
[SFML 2] Using opengl
« Reply #7 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
OpenGL

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
[SFML 2] Using opengl
« Reply #8 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
I use the latest build of SFML2

 

anything