mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibGL+LibSoftGPU: Add GPU side shader infrastructure
This adds a shader class to LibSoftGPU and makes use of it when linking GLSL program in LibGL. Also adds actual rendering code to the shader tests.
This commit is contained in:
parent
4ad41e6680
commit
93ab2db80f
11 changed files with 96 additions and 3 deletions
|
@ -59,6 +59,18 @@ TEST_CASE(0001_program_creation)
|
|||
glAttachShader(program, vertex_shader);
|
||||
glAttachShader(program, fragment_shader);
|
||||
glLinkProgram(program);
|
||||
glUseProgram(program);
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor3f(1, 0, 0);
|
||||
glVertex2i(-1, -1);
|
||||
glColor3f(0, 1, 0);
|
||||
glVertex2i(1, -1);
|
||||
glColor3f(0, 0, 1);
|
||||
glVertex2i(1, 1);
|
||||
glEnd();
|
||||
|
||||
context->present();
|
||||
|
||||
glDeleteShader(vertex_shader);
|
||||
glDeleteShader(fragment_shader);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue