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
float4 QuadraticPS(float2 p : TEXCOORD0, | |
float4 color : COLOR0) : COLOR | |
{ | |
// Gradients | |
float2 px = ddx(p); | |
float2 py = ddy(p); | |
// Chain rule | |
float fx = (2*p.x)*px.x - px.y; | |
float fy = (2*p.x)*py.x - py.y; | |
// Signed distance |
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> | |
class Destructor | |
{ | |
public: | |
Destructor(); | |
virtual ~Destructor() = delete; | |
void print(); | |
}; |
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> | |
void whatis(int*& pointer); | |
int main() | |
{ | |
int* isempty; | |
int* zero = 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
GLuint Shader::LoadShaders(const std::string VertexShaderCode, const std::string FragmentShaderCode) | |
{ | |
GLint Result = GL_FALSE; | |
glGetIntegerv(GL_SHADER_COMPILER, &Result); | |
if (Result == GL_FALSE) { | |
return Result; | |
} |
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
void Rect::create() | |
{ | |
static float a = 0; | |
a += 0.01f; | |
std::vector<float> vertex_buffer_data = { | |
0.0f + a, 0.0f + a, a, | |
0.3f + a, 0.0f + a, a, | |
0.3f + a, 0.3f + a, a, | |
0.0f + a, 0.0f + a, a, | |
0.3f + a, 0.3f + a, a, |
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
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) | |
value_type x, y, z, w; | |
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT) | |
union | |
{ | |
struct{value_type x, y, z, w;}; | |
struct{value_type r, g, b, a;}; | |
struct{value_type s, t, p, q;}; | |
}; | |
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES) |
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
int main() { | |
int x = 0; | |
while (x < 5) { | |
x = x++; | |
} | |
return 0; | |
} |
OlderNewer