Original Post
I decided to create a shader in my program, but now the future's looking a bit shady.
Bad pun aside, I just ran code from http://nehe.gamedev.net/data/articles/article.asp?article=21 (the full linking code is near the bottom of that page); However, when I do, it throws an access violation in memory location 0x00000 or something like that. The full linking code I'm using is below:
(Oh, and how do you get those scrolling boxes you can put code in without taking as much space?) Thanks!
Bad pun aside, I just ran code from http://nehe.gamedev.net/data/articles/article.asp?article=21 (the full linking code is near the bottom of that page); However, when I do, it throws an access violation in memory location 0x00000 or something like that. The full linking code I'm using is below:
void mlInitShaders(){ char * my_fragment_shader_source="void main()\n{\ngl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n}"; // Get Vertex And Fragment Shader Sources GLenum my_program; GLenum my_vertex_shader; GLenum my_fragment_shader; // Create Shader And Program Objects my_program = glCreateProgramObjectARB(); my_fragment_shader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); // Load Shader Sources glShaderSourceARB(my_fragment_shader, 1, (const GLcharARB**)&my_fragment_shader_source, NULL); // Compile The Shaders glCompileShaderARB(my_fragment_shader); // Attach The Shader Objects To The Program Object glAttachObjectARB(my_program, my_fragment_shader); // Link The Program Object glLinkProgramARB(my_program); // Use The Program Object Instead Of Fixed Function OpenGL glUseProgramObjectARB(my_program);} (Oh, and how do you get those scrolling boxes you can put code in without taking as much space?) Thanks!