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
// example how to set up D3D11 rendering | |
// set to 0 to create resizable window | |
#define WINDOW_WIDTH 1280 | |
#define WINDOW_HEIGHT 720 | |
// do you need depth buffer? | |
#define WINDOW_DEPTH 1 | |
// do you need stencil buffer? |
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
vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); | |
vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); | |
vec4 a_color0 : COLOR0; | |
vec3 a_position : POSITION; | |
vec2 a_texcoord0 : TEXCOORD0; |
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
sing Microsoft.Xna.Framework; | |
using System.Collections.Generic; | |
namespace GJK_test | |
{ | |
public struct GJKCollisionInfo | |
{ | |
public bool collided; | |
public Vector2[] simplex; |
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 DrawTriangleTextured(SDL_Surface *Buffer,SDL_Surface *Texture,float * Zbuffer, vec3 *Points,vec2 *UV,float* Intensity) { | |
Uint32 Rshift = 16, Gshift =8, Bshift = 0, Ashift=24; | |
vec2 BBoxmin = {}; | |
vec2 BBoxmax = {}; | |
// Compute triangle bounding box | |
BBoxmin.X = MIN(MIN(Points[0].X, Points[1].X), Points[2].X); | |
BBoxmin.Y = MIN(MIN(Points[0].Y, Points[1].Y), Points[2].Y); | |
BBoxmax.X = MAX(MAX(Points[0].X, Points[1].X), Points[2].X); | |
BBoxmax.Y = MAX(MAX(Points[0].Y, Points[1].Y), Points[2].Y); |
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
605895274 |
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 <SDL.h> | |
#include "glad.c" | |
int main(int argc,char **argv){ | |
SDL_Init(SDL_INIT_EVERYTHING); | |
SDL_DisplayMode CurrentDisplay; | |
SDL_GetCurrentDisplayMode(0, &CurrentDisplay); | |
SDL_Window *Window = SDL_CreateWindow("Game SDL",10,10,800,600,SDL_WINDOW_OPENGL|SDL_WINDOW_SHOWN); | |
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main() | |
{ | |
FILE * TemplateFile = fopen("../code/test.template.html","r"); | |
size_t Size = 0; | |
fseek(TemplateFile,0,SEEK_END); |
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 "main.h" | |
#include "resource.h" | |
global_variable bool32 GlobalRunning = 1; | |
global_variable win32_offscreen_buffer GlobalBackBuffer; | |
global_variable WINDOWPLACEMENT GlobalWindowPosition = { sizeof(GlobalWindowPosition) }; | |
global_variable HWND hDlgCurrent = NULL; | |
#define WINDOW_WIDTH 800 | |
#define WINDOW_HEIGHT 600 |
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
#if FNA || XNA | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
#endif | |
using System; | |
namespace Android_Invaders | |
{ | |
struct Object | |
{ |