Skip to content

Instantly share code, notes, and snippets.

View omern1's full-sized avatar

Nabeel Omer omern1

  • Sony Interactive Entertainment
  • ~
  • 09:34 (UTC +01:00)
View GitHub Profile
// compile this like g++ go2.c -lgdi32 [if you're using mingw]
#include <windows.h>
#include <stdio.h>
// Helper function to retrieve current position of file pointer:
inline int GetFilePointer(HANDLE FileHandle){
return SetFilePointer(FileHandle, 0, 0, FILE_CURRENT);
}
//---------------------------------------------------------------------------
@exavolt
exavolt / sdl2_opengl.c
Created April 11, 2012 16:36
Very basic SDL2 OpenGL application
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>