Browse Source
This solves a chicken and egg problem when loading shaders that need to know about GLContext limits. Also moved initGLContext() from tangerine.cpp to shader.cppmain
5 changed files with 93 additions and 30 deletions
@ -0,0 +1,30 @@
|
||||
|
||||
#pragma once |
||||
|
||||
|
||||
const char* DUMMY_VERTEX_SHADER = R"VS( |
||||
#version 330 core |
||||
layout (location = 0) in vec3 position; |
||||
|
||||
uniform mat4 world_transform; |
||||
uniform mat4 MVP; |
||||
|
||||
|
||||
void main() |
||||
{ |
||||
gl_Position = MVP * world_transform * vec4(position, 1); |
||||
} |
||||
)VS"; |
||||
|
||||
const char* DUMMY_FRAGMENT_SHADER = R"FS( |
||||
#version 330 core |
||||
|
||||
out vec4 color; |
||||
|
||||
|
||||
void main() |
||||
{ |
||||
color = vec4(1, 0, 0, 1); |
||||
} |
||||
)FS"; |
||||
|
||||
Loading…
Reference in new issue