I have problem with glsl on windows 8 in Microsoft Visual Studio Express 2012 with Radeon. Even #version 150 is not recognized in code.
#version 150
#include <glm\ext.hpp>
#include <glm\glm.hpp>
#include <GL\glew.h>
#include <GL\glut.h>
#include <GL\GL.h>
#include <GL\GLU.h>
#include <GL\glfw.h>
in vec2 position;
out vec4 outColor;
int main()
{
vec3 commeo;
glfwInit();
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2);
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE);
glfwOpenWindow(800, 600, 0, 0, 0, 0, 0, 0, GLFW_WINDOW);
glfwSetWindowTitle("Crion World Alpha");
while( glfwGetWindowParam( GLFW_WINDOW ) )
{
glfwSwapBuffers();
}
if( glfwGetKey( GLFW_KEY_ESC ) == GLFW_PRESS )
return 0;
glewExperimental = GL_TRUE;
glewInit();
GLuint vertexBuffer;
glGenBuffers( 1, &vertexBuffer );
printf( "%u\n", vertexBuffer);
float vertices[] = {
0.0f, 0.5f,
0.5f, -0.5f,
-0.5f, -0.5f
};
GLuint vbo;
glGenBuffers( 1, &vbo); //generate 1 buffer
glBindBuffer( GL_ARRAY_BUFFER, vbo );
glBufferData( GL_ARRAY_BUFFER, sizeof( vertices ), vertices, GL_STATIC_DRAW );
GLuint vertexShader = glCreateShader( GL_VERTEX_SHADER );
glShaderSource( vertexShader, 1, &vertexSource, NULL );
glCompileShader( vertexShader );
glfwTerminate();
return 0;
}
I have errors:
1 IntelliSense: unrecognized preprocessing directive /// #version 150 2 IntelliSense: identifier "in" is undefined 4 IntelliSense: identifier "out" is undefined 6 IntelliSense: identifier "vec3" is undefined 7 IntelliSense: identifier "vertexSource" is undefined
I have linked:
opengl32.lib
glu32.lib
glut32.lib
glfwdll.lib
glew32d.lib






