cg-toolkit

Why won't CG shaders work with GL 3.2?

大兔子大兔子 提交于 2020-01-05 07:45:07
问题 I've tried everything to get OpenGL 3.2 to render with CG shaders in my game engine but I have had no luck. So I decided to make a bare minimal project but still shaders won't work. In theory my test project should just render a red triangle but it is white because the shader is not doing anything. I'll post the code here: #include <stdio.h> #include <stdlib.h> #include <vector> #include <string> #include <GL/glew.h> #include <Cg/cg.h> #include <Cg/cgGL.h> #include <SDL2/SDL.h> int main() {