mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 23:55:40 +12:00
More MacOS funni
This commit is contained in:
parent
7c68e70ba4
commit
d6a107afef
1 changed files with 5 additions and 1 deletions
|
@ -130,7 +130,7 @@ const char* displayFragmentShader = R"(
|
||||||
in vec2 UV;
|
in vec2 UV;
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
uniform sampler2D u_texture; // TODO: Properly init this to 0 when I'm not lazy
|
uniform sampler2D u_texture;
|
||||||
void main() {
|
void main() {
|
||||||
FragColor = texture(u_texture, UV);
|
FragColor = texture(u_texture, UV);
|
||||||
}
|
}
|
||||||
|
@ -181,10 +181,14 @@ void Renderer::initGraphicsContext() {
|
||||||
depthScaleLoc = OpenGL::uniformLocation(triangleProgram, "u_depthScale");
|
depthScaleLoc = OpenGL::uniformLocation(triangleProgram, "u_depthScale");
|
||||||
depthOffsetLoc = OpenGL::uniformLocation(triangleProgram, "u_depthOffset");
|
depthOffsetLoc = OpenGL::uniformLocation(triangleProgram, "u_depthOffset");
|
||||||
depthmapEnableLoc = OpenGL::uniformLocation(triangleProgram, "u_depthmapEnable");
|
depthmapEnableLoc = OpenGL::uniformLocation(triangleProgram, "u_depthmapEnable");
|
||||||
|
glUniform1i(OpenGL::uniformLocation(triangleProgram, "u_tex0"), 0); // Init sampler object
|
||||||
|
|
||||||
OpenGL::Shader vertDisplay(displayVertexShader, OpenGL::Vertex);
|
OpenGL::Shader vertDisplay(displayVertexShader, OpenGL::Vertex);
|
||||||
OpenGL::Shader fragDisplay(displayFragmentShader, OpenGL::Fragment);
|
OpenGL::Shader fragDisplay(displayFragmentShader, OpenGL::Fragment);
|
||||||
displayProgram.create({ vertDisplay, fragDisplay });
|
displayProgram.create({ vertDisplay, fragDisplay });
|
||||||
|
displayProgram.use();
|
||||||
|
|
||||||
|
glUniform1i(OpenGL::uniformLocation(displayProgram, "u_texture"), 0); // Init sampler object
|
||||||
|
|
||||||
vbo.createFixedSize(sizeof(Vertex) * vertexBufferSize, GL_STREAM_DRAW);
|
vbo.createFixedSize(sizeof(Vertex) * vertexBufferSize, GL_STREAM_DRAW);
|
||||||
vbo.bind();
|
vbo.bind();
|
||||||
|
|
Loading…
Add table
Reference in a new issue