mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Change CMakeLists.txt to add 2d_game project, and added irrKlang to LIBS.
Added irrKlang.dll and ikpMP2.dll to dlls folder. Added irrKlang as a sub-folder under includes. Added irrKlang.lib to lib folder. At this point running cmake gave an error it couldn't find source files under 2d_game. Moved 2d_game source up one folder level, then cmake found the files.
This commit is contained in:
17
src/7.in_practice/3.2d_game/shaders/particle.vs
Normal file
17
src/7.in_practice/3.2d_game/shaders/particle.vs
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec4 vertex; // <vec2 position, vec2 texCoords>
|
||||
|
||||
out vec2 TexCoords;
|
||||
out vec4 ParticleColor;
|
||||
|
||||
uniform mat4 projection;
|
||||
uniform vec2 offset;
|
||||
uniform vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
float scale = 10.0f;
|
||||
TexCoords = vertex.zw;
|
||||
ParticleColor = color;
|
||||
gl_Position = projection * vec4((vertex.xy * scale) + offset, 0.0, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user