This file contains hidden or 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
xaxxon@ubuntu:~$ telnet 104.207.142.70 80 | |
Trying 104.207.142.70... | |
Connected to 104.207.142.70. | |
Escape character is '^]'. | |
GET / HTTP/1.1 | |
host: terabyte-gaming.net | |
HTTP/1.1 200 OK | |
Server: nginx/1.9.3 (Ubuntu) | |
Date: Sun, 17 Apr 2016 07:04:38 GMT |
This file contains hidden or 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
WARNING: It looks like you are running these tools from an MSYS shell | |
(as opposed to a MinGW shell). This shell is not supported and may | |
fail in mysterious ways. | |
To run the supported MinGW shell, use `git bash`, or use `bin/bash.exe` | |
in your MinGW installation, as opposed to `usr/bin/bash.exe`. |
This file contains hidden or 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
TextureData Graphics::load_font_texture(const std::string & message, int max_width, int max_height) | |
{ | |
SDL_Color color = {255,255,255,255}; | |
SDL_Surface * rendered_message = TTF_RenderText_Blended(Graphics::font, message.c_str(), color); | |
if (rendered_message->w > max_width || | |
rendered_message->h > max_height) { | |
const float horizontal_scaling = rendered_message->w / (float)max_width; | |
const float vertical_scaling = rendered_message->h / (float)max_height; | |
const float final_scaling = horizontal_scaling > vertical_scaling ? horizontal_scaling : vertical_scaling; | |
SDL_Surface * scaled_surface = SDL_CreateRGBSurface(0, max_width / final_scaling, max_height / final_scaling, |
This file contains hidden or 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
const char * LineSegmentList::VERTEX_SHADER = R"VERTEXSHADER(#version 410 | |
in vec2 vertex; | |
in vec2 normal; | |
in vec4 color; | |
in float width; | |
out vec2 normal_g; |
This file contains hidden or 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
const char * LineSegmentList::VERTEX_SHADER = R"VERTEXSHADER(#version 410 | |
in vec2 vertex; | |
in vec2 normal; | |
in vec4 color; | |
in float width; | |
out vec2 normal_g; |
This file contains hidden or 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
struct LineSegment { | |
struct Vertex { | |
glm::vec2 position; | |
glm::vec2 normal; | |
float width; | |
uint32_t color; | |
Vertex() = default; | |
Vertex(const Vertex &) = delete; | |
}; |
This file contains hidden or 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
x clang+llvm-3.8.0-x86_64-apple-darwin/bin/scan-build | |
x clang+llvm-3.8.0-x86_64-apple-darwin/bin/scan-view | |
x clang+llvm-3.8.0-x86_64-apple-darwin/bin/set-xcode-analyzer | |
x clang+llvm-3.8.0-x86_64-apple-darwin/bin/verify-uselistorder | |
x clang+llvm-3.8.0-x86_64-apple-darwin/bin/yaml2obj | |
zacs-MacBook-Pro:deleteme-clang xaxxon$ cd clang+llvm-3.8.0-x86_64-apple-darwin | |
zacs-MacBook-Pro:clang+llvm-3.8.0-x86_64-apple-darwin xaxxon$ ls | |
bin include lib libexec share | |
zacs-MacBook-Pro:clang+llvm-3.8.0-x86_64-apple-darwin xaxxon$ ls -l/ | |
ls: illegal option -- / |
This file contains hidden or 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
void Graphics::check_error(const char * filename, int line_number) { | |
GLenum error; | |
while ((error = glGetError()) != 0) { | |
printf("GL Error %x: %s:%d\n", error, filename, line_number); | |
exit(1); | |
} | |
} | |
This file contains hidden or 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
GLuint Graphics::build_shader_program(const char * vertex_shader_source, const char * fragment_shader_source) { | |
// printf("Compiling shaders %s and %s\n", vertex_shader_source, fragment_shader_source); | |
/* create program object and attach shaders */ | |
GLuint program = glCreateProgram(); | |
shaderAttach(program, GL_VERTEX_SHADER, vertex_shader_source); | |
check_error(__FILE__, __LINE__); | |
shaderAttach(program, GL_FRAGMENT_SHADER, fragment_shader_source); | |
check_error(__FILE__, __LINE__); |
This file contains hidden or 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
template<typename T, class Enable=void> | |
struct CastToNative; | |
// This line causes the compiler error below | |
CastToNative<std::vector<std::string>>()(...); | |
modules.cpp:55:25: error: ambiguous partial specializations of 'CastToNative<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >, void>' | |
/users/xaxxon/v8-class-wrapper/casts.hpp:90:8: note: partial specialization matches [with ElementType = std::__1::basic_string<char>, Rest = <std::__1::allocator<std::__1::basic_string<char> >>] |