-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Currently only basic flats are rendered - Trying out a different control scheme with the cursor unlocked to select flats/walls, and can hold right click to mouselook around. An 'always mouselook' style like before will probably also be an option, but the new scheme will probably be required in certain cases like wayland where we can't warp the mouse pointer (yet) - Also includes other various fixes/updates and refactoring
- Loading branch information
1 parent
1f050e5
commit 2195f5e
Showing
42 changed files
with
805 additions
and
3,855 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
in VertexData | ||
{ | ||
vec2 tex_coord; | ||
vec3 normal; | ||
} vertex_in; | ||
|
||
out vec4 f_colour; | ||
|
||
uniform vec4 colour = vec4(1.0); | ||
//uniform vec2 viewport_size; | ||
|
||
uniform sampler2D tex_unit; | ||
|
||
void main() | ||
{ | ||
vec4 col = colour * texture(tex_unit, vertex_in.tex_coord); | ||
|
||
f_colour = col; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
layout (location = 0) in vec3 in_position; | ||
layout (location = 1) in vec2 in_tex_coord; | ||
layout (location = 2) in vec3 in_normal; | ||
|
||
out VertexData | ||
{ | ||
vec2 tex_coord; | ||
vec3 normal; | ||
} vertex_out; | ||
|
||
uniform mat4 mvp; | ||
|
||
void main() | ||
{ | ||
vertex_out.tex_coord = in_tex_coord; | ||
vertex_out.normal = in_normal; | ||
|
||
gl_Position = mvp * vec4(in_position, 1.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
namespace slade::mapeditor | ||
{ | ||
struct Flat3D | ||
{ | ||
// Origin | ||
const MapSector* sector = nullptr; | ||
// const MapSector* control_sector = nullptr; // Maybe for 3d floors? | ||
bool ceiling = false; | ||
|
||
// Vertex buffer info | ||
unsigned vertex_offset = 0; | ||
unsigned vertex_count = 0; | ||
|
||
// Render info | ||
glm::vec4 colour = glm::vec4{ 1.0f }; | ||
glm::vec3 normal = glm::vec3{ 0.0f, 0.0f, 1.0f }; | ||
unsigned texture = 0; | ||
|
||
long updated_time = 0; | ||
}; | ||
} // namespace slade::mapeditor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.