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
#include "GLDebugCallback.h" | |
// by Qookie | |
void GLAPIENTRY glDebugCallback(GLenum source, GLenum type, GLuint, GLenum severity, GLsizei, | |
const GLchar* message, const void*) | |
{ | |
// clang-format off | |
const char* severityString = "?"; | |
switch (severity) { |
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
glCheck(glEnable(GL_DEPTH_TEST)); | |
framebuffer.bind(); | |
glCheck(glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT)); | |
screen.onRender(); | |
glBindTexture(GL_TEXTURE_2D, 0); | |
// Begin Post Processing | |
screenDrawable.bind(); | |
glCheck(glDisable(GL_DEPTH_TEST)); | |
glCheck(glActiveTexture(GL_TEXTURE0)); |
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
#include "GL/GLDebug.h" | |
#include "Screen.h" | |
#include "ScreenInGame.h" | |
#include "ScreenMainMenu.h" | |
#include <SFML/Window/Event.hpp> | |
#include <SFML/Window/Window.hpp> | |
#include <imgui/imgui.h> | |
#include <imgui_impl/imgui_impl_opengl3.h> | |
#include <imgui_impl/imgui_impl_sfml.h> | |
#include <iostream> |
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
#version 330 | |
out vec4 outColour; | |
uniform vec3 lightPosition; | |
in vec3 passFragPosition; | |
in vec3 passNormal; | |
void main() { |
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
#include <SFML/Graphics.hpp> | |
#include <SFML/Audio.hpp> | |
#include <cmath> | |
const float SPEED = 5.0f; | |
int main() | |
{ | |
sf::Clock time; | |
sf::RenderWindow window(sf::VideoMode(1600, 720), "SFML works!"); |
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
#include <iostream> | |
#include <bitset> | |
#include <cstdint> | |
using u32 = uint32_t; | |
using u8 = uint8_t; | |
int main() { | |
u32 vertex = 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
local air = game.data.getVoxel("openbuilder_air") | |
local wood = game.data.getVoxel("openbuilder_wood") | |
local leaf = game.data.getVoxel("openbuilder_leaf") | |
function createTree(chunk, bx, by, bz) | |
local trunkHeight = 5 | |
local leavesHeight = trunkHeight - 1; | |
for y = 0, 1, 1 do |
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
#include <iostream> | |
#include <SFML/Graphics.hpp> | |
#include <ctime> | |
#include <cstdlib> | |
#include <gtc/noise.hpp> | |
#include <array> |
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
#include <SFML/Graphics.hpp> | |
#include <thread> | |
#include <array> | |
#include <iostream> | |
#include <SFML/Network/Packet.hpp> | |
#define _WINSOCK_DEPRECATED_NO_WARNINGS | |
#define ENET_IMPLEMENTATION | |
#include "enet.h" |
NewerOlder