Experimenting with modern OpenGL and SDL2
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ceffectpp @ 366678e
configuration
datastructures
entity
experiments
glla @ d525746
glsw
lua-5.3.5
math
meter
models
open-simplex-noise-in-c @ 0d555e7
shaders
space
trackball
.gitignore
.gitmodules
4x7.png
Makefile
MetalFloor.png
README.md
_kiss_fft_guts.h
buffer_group.c
buffer_group.h
conf.lua
debug_graphics.c
debug_graphics.h
draw.c
draw.h
drawf.c
drawf.h
effects.c
effects.h
emcc_stubs.h
flycam.c
flycam.h
glsw_shaders.c
glsw_shaders.h
graphics.h
grass.png
init.c
init.h
input_event.c
input_event.h
kiss_fft.c
kiss_fft.h
kiss_fftr.c
kiss_fftr.h
lights.c
lights.h
macros.h
main.c
mesh.c
mesh.h
root.mk
scene.c
scene.h
shader_utils.c
shader_utils.h
state_machine.c
state_machine.h
tasks.todo
terrain_constants.h

README.md

Sock Engine

Sock is a free 3D game engine that I'm making in my free time as a hobby and learning project. Sock sort of stands for Simple OpenGL C. The 'k' is silent.

I'm using the project as a means to learn OpenGL, to develop my C style and practices on a large-ish project, and to learn computer graphics techniques such as deferred rendering, stencil-buffer shadows, procedural generation, erosion simulation, physically-based rendering, and more. Eventually I hope to turn it into a nice lightweight space exploration game.

Currently the project is only maintained for OSX, as I develop on a somewhat-dated but still adequate 2011 MacBook Pro 13".

If you're reading this sometime in the far future, there may be development blogs about this project at http://www.gavinblog.space/.

Compiling

Extract to a directory, cd in, and run make.

The executable will be "sock". You can change this in the Makefile.

Dependencies

I try to keep Sock light on dependencies, but there are a few things that can't be avoided.

SDL 2.0

SDL 2.0 is a game library that creates the window context, OpenGL context, handles input, etc.

http://libsdl.org/download-2.0.php

SDL_image

SDL_image is used for loading different image formats into the engine to be used as textures.

http://www.libsdl.org/projects/SDL_image/

GLEW

GLEW helps manage OpenGL extensions.

This may come pre-installed with OSX, otherwise you can get it from Homebrew.

OpenGL (3.3 minimum)

This project uses the OpenGL interface.

Awk (Gawk, to be specific)

Awk is used to convert model files into header files to compile them into the engine.

This should come pre-installed with OSX.

Lua 5.3

I'm gradually integrating Lua as a scripting and configuration language for the project. I'm also in the process of converting my awk scripts to Lua to reduce dependencies. At the moment, you'll need both the Lua library and the binary. In the future I'll have the library compiled first so it can be used to run the Lua build scripts.