hi i am reading the opengl programming guide and am trying to display textured point sprites.
here are my shaders:
Code :const char *fshader = "#version 430 core \n" " \n" "uniform sampler2D tex1; \n" "uniform sampler2D tex2; \n" " \n" "out vec4 color; \n" " \n" "void main(void) \n" "{ \n" " color = texture(tex1, gl_PointCoord) + texture(tex2, gl_PointCoord); \n" "} \n"; const char *vshader = "#version 430 core \n" "layout (location = 0) in vec4 vertices;\n" " \n" "void main(void) \n" "{ \n" " \n" " gl_Position = vertices; \n" "} \n";
i then just simply set the point size using glPointSize(60) load my textures with SOIL and setup my array buffer and draw four points. all i get is one color for all the points. im also binding the textures to the appropriate texture unit. what am i doing wrong?