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 Node | |
{ | |
Node* child; | |
}; | |
void gatherDescendants(std::vector<Node*>& target, Node* root) | |
{ | |
if (root->child) | |
{ | |
target.push_back(root->child); |
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
abstract pass DefaultDecalPass | |
{ | |
scene_blend alpha_blend | |
depth_bias 4 0.5 | |
depth_write off | |
} | |
material DefaultSkinnedDecal: DefaultSkinned | |
{ | |
technique ffp |
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
#ifdef _WIN32 | |
#pragma warning(push) | |
#pragma warning(disable: 4073) | |
#pragma init_seg(lib) | |
struct SslInitializer | |
{ | |
SslInitializer() | |
{ | |
QSslSocket::supportsSsl(); | |
} |
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
zeux@zeux-laptop ~/BlogCode/2014/2/TestDisk $ sudo ./test_disk 4096 128 . | |
Creating file: './largeFile' size: 4294967296 bytes | |
file created, let's do some testing! | |
Testing block size: 65536 bytes, will read 2048 blocks. | |
cache is cleared | |
Wall elapsed: 2.11037 | |
Avg time per block: 1.03045 ms | |
Ignore: 18446744073657203244 | |
Testing block size: 131072 bytes, will read 1024 blocks. | |
cache is cleared |
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
#include <stdio.h> | |
void set_value(int rhs) | |
{ | |
printf("int\n"); | |
} | |
void set_value(unsigned int rhs) | |
{ | |
printf("uint\n"); |
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
# Before | |
$(BUILD)/%.o: % | |
@mkdir -p $(dir $@) | |
$(CXX) $< $(CXXFLAGS) -MMD -MP -o $@ | |
-include $(OBJECTS:.o=.d) | |
# After | |
.SECONDEXPANSION: |
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
for (int i_3 = 0; i_3 < 8; i_3++) { | |
vec2 offsetDepth_14; | |
vec2 tmpvar_15; | |
tmpvar_15 = (rotation_8 * OFFSETS1_7[i_3]); | |
offsetDepth_14.x = texture2D (xlu_depthBuffer, (uv_1 + (tmpvar_15 * radiusTex_5))).x; | |
offsetDepth_14.y = texture2D (xlu_depthBuffer, (uv_1 - (tmpvar_15 * radiusTex_5))).x; | |
float tmpvar_16; | |
tmpvar_16 = (float((i_3 + 1)) / 10.0); | |
vec2 tmpvar_17; | |
tmpvar_17 = (((offsetDepth_14 - vec2(baseDepth_9)) / (0.006 * |
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
vertex_program DefaultVPParams null | |
{ | |
default_params | |
{ | |
param_named_auto CameraPosition camera_position | |
param_named_auto ViewProjection viewproj_matrix | |
param_named_auto Lamp0Dir light_direction 0 | |
param_named_auto Lamp1Dir light_direction 1 | |
param_named_auto Lamp0Color light_diffuse_colour 0 |
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
class Renderbuffer: public Resource | |
{ | |
public: | |
Texture::Format getFormat() const { return format; } | |
unsigned int getWidth() const { return width; } | |
unsigned int getHeight() const { return height; } | |
}; | |
class Framebuffer: public Resource |
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
#pragma comment(lib, "opengl32.lib") | |
#include "glew.c" | |
template <typename T, typename U> static void patchUnsafe(T& t, U& u) | |
{ | |
if (!t && u) | |
t = reinterpret_cast<T>(u); | |
} |