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 texture_loadDDS(const char* path) { | |
FILE* f; | |
f = fopen(path, "rb"); | |
if(f == 0) | |
return 0; | |
// make sure this is a dds | |
char filecode[4]; | |
fread(&filecode, 1, 4, f); |
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
VAO* load_model(const char* path) { | |
// import model | |
const struct aiScene* scene = aiImportFile(path, aiProcess_Triangulate); // http://assimp.sourceforge.net/lib_html/structai_scene.html | |
if(scene->mNumMeshes <= 0) { | |
aiReleaseImport(scene); | |
return 0; | |
} | |
struct aiMesh* mesh = *scene->mMeshes; // http://assimp.sourceforge.net/lib_html/structai_mesh.html |
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
/* | |
Can load easier and more indepth with https://github.com/Hydroque/DDSLoader | |
Because a lot of crappy, weird DDS file loader files were found online. The resources are actually VERY VERY limited. | |
Written in C, can very easily port to C++ through casting mallocs (ensure your imports are correct), goto can be replaced. | |
https://www.gamedev.net/forums/topic/637377-loading-dds-textures-in-opengl-black-texture-showing/ | |
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/ | |
^ Two examples of terrible code |
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
REM Created by: http://github.com/tilkinsc | |
REM Use the -v or /v switch anywhere to see the command issued. | |
REM Adds supplied path to the %PATH% variable, supports multiple paths per variable | |
REM Usage: using %EnvVariable% [-v] | |
REM Example: | |
REM set examp=C:\Whatever;C:\Whatever2 | |
REM using %examp% -v |
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
REM opens current directory. Stick in C:\Windows or somewhere in path to use it easier. | |
REM Purpose is just to save typing and promote productivity | |
@echo off | |
explorer %cd% | |
exit /b |
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 <stdio.h> | |
#define STR2(x) #x | |
#define STR(x) STR2(x) | |
#define INCBIN(name, file) \ | |
__asm__(".section .rodata\n" \ | |
".global incbin_" STR(name) "_start\n" \ | |
".type incbin_" STR(name) "_start, @object\n" \ | |
".balign 16\n" \ |
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
Considerate Jessica Grey | |
A Short Story | |
by Mr Pseudonym | |
Jessica Grey had always loved urban Camborne with its jealous, jittery jungle. It was a place where she felt anxious. | |
She was a considerate, patient, beer drinker with sloppy eyelashes and wobbly fingers. Her friends saw her as an obedient, | |
old ogre. Once, she had even saved a steady baby that was stuck in a drain. That's the sort of woman he was. | |
Jessica walked over to the window and reflected on her chilly surroundings. The clouds danced like shouting foxes. |
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 "wave.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
// wave.h start | |
typedef struct WaveData { |
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
//example mac: b1:27:eb:b4:a0:9e | |
//example hex mac: 0xb1, 0x27, 0xeb, 0xb4, 0xa0, 0x9e | |
//put example max in place of #define MAC, make sure to end with a , like shown below | |
//also update IP, and PORT if you need to | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <winsock2.h> |
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
// 32-bit Instructions Types | |
op a b c d f | |
_____________________ | |
R-Type 6 5 5 5 5 6 | |
I-type 6 5 5 16 | |
J-Type 6 24 | |
Bit Length | |
R-Types |
OlderNewer