aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change OpenGL context version to 3.2 for better portabilityTomasz Kramkowski2018-07-151-1/+1
| | | | Apparently some version OSX or something doesn't support 3.3.
* dorp says this is no longer UB if float (*)[4] is cast to float *Tomasz Kramkowski2018-05-151-3/+3
| | | | The C standard is a strange beast.
* Add README.mdTomasz Kramkowski2018-05-041-0/+42
|
* faqe.c: main now returns 0 to fix SDL_main on windowsTomasz Kramkowski2018-05-041-0/+2
| | | | | On windows SDL replaces main with SDL_main and uses a WinMain function. SDL_main is not main so it must return something.
* Remove tex directory (accidentally left in)Tomasz Kramkowski2018-05-041-5/+0
|
* Cleanup and fix texture loadingTomasz Kramkowski2018-05-041-6/+8
|
* Remove texture fetching functionality from makefileTomasz Kramkowski2018-05-044-12/+1
|
* Move assets to an assets subdirectory and simplify model loadingTomasz Kramkowski2018-05-042-12/+18
|
* Replace manual definitions of GL types and enums with GL/gl.hTomasz Kramkowski2018-05-042-79/+2
| | | | | This is cumbersome and pointless. The goal is to write a simple loader not to rewrite the entire OpenGL header file.
* fragment shader: implement blinn-phongTomasz Kramkowski2018-05-041-3/+3
|
* Animate the light position around the cubeTomasz Kramkowski2018-05-032-3/+9
|
* Add a simple camera struct and camera controlsTomasz Kramkowski2018-05-035-16/+125
|
* Cleanup: License headers, spacing, namingTomasz Kramkowski2018-05-0211-9/+45
| | | | | | | Rename vnorm to fnorm (fragment normal). Change shader license headers to C++ style comments. Fix spacing for PI define in faqe.c. Add missing license headers.
* .gitignore: Add .dir-locals.elTomasz Kramkowski2018-05-021-0/+1
|
* Implement diffuse texture loading and basic material supportTomasz Kramkowski2018-05-0215-8/+184
|
* fmd.c: Bump file magic number versionTomasz Kramkowski2018-05-021-1/+1
|
* fmd.c: Correct bugs in implementationTomasz Kramkowski2018-05-021-2/+4
| | | | | Materials are now loaded correctly. Material indices should be loaded with 0xffffffff being -1.
* Improve glprog_load to take sentinel terminated listsTomasz Kramkowski2018-05-023-10/+12
| | | | | | Numerous times a new uniform has been added and the corresponding increment of the nunis parameter was forgotten causing confusion. This should not happen anymore.
* Enable SRGB framebuffer and backface culling.Tomasz Kramkowski2018-05-022-0/+4
|
* shaders: fix initialisation of vec3Tomasz Kramkowski2018-04-302-3/+3
|
* Implement basic fixed point light source and phong shadingTomasz Kramkowski2018-04-302-5/+30
| | | | | | This patch places a single point light source in the scene and implements view-space phong shading around it. This is in preparation for texture values being fed in from a set of textures.
* Fix model matrix being transposed.Tomasz Kramkowski2018-04-301-1/+1
|
* Store camera position in a variable for now.Tomasz Kramkowski2018-04-301-1/+2
|
* Fix proj mat not being set requiring a resize before anything showsTomasz Kramkowski2018-04-301-0/+1
| | | | | | The projection matrix uniform was being used before the shader program was being used. This caused nothing to get rendered until a window resize.
* gl.h: Clean up enumeration constants for error returns.Tomasz Kramkowski2018-04-271-7/+7
|
* Implement basic model loading of FMD format.Tomasz Kramkowski2018-04-2715-49/+404
| | | | | | | | | | | | The FMD (Faqe Model Data) format is a format designed for faqe. It stores vertex, element and material information and mesh information. This patch provides the basic implementation and use of this format. This patch also implements perspective projection, depth testing and view and model matrices. An example fmd file is provided.
* glfunc.h: remove superfluous semicolonsTomasz Kramkowski2018-04-261-3/+3
|
* Fixup license headersTomasz Kramkowski2018-04-225-4/+16
|
* Move linmath.h out of the project and into its own fork.Tomasz Kramkowski2018-04-203-594/+4
|
* Replace GLFW3 with SDL2Tomasz Kramkowski2018-04-202-30/+52
| | | | Replace all of GLFW3 with SDL2 for future benefits.
* Rename project gltest -> faqeTomasz Kramkowski2018-03-303-6/+6
| | | | | | The project has been renamed to faqe. The logic for this name: quake -> fake quake -> faqe
* Simplify gl loading by removing m4 and merging gldefs.hTomasz Kramkowski2018-03-309-165/+76
| | | | | | | | | | | m4 has been removed, loadgl.c.in is now gl.c, gldefs.h and loadgl.h.in have now been merged into gl.h. loadgl.m4 has been transformed into glfunc.h which is being used in the way of a bie index file to generate information at 3 places. lgl_load is now gl_load and doesn't return anything, the jongjmp.h method of error handling was pre-emptive and for now this much simpler system will suffice. This means that lgl_strerror is no longer neede.
* Remote texture assets can now be included in the project.Tomasz Kramkowski2018-03-285-1/+17
|
* Move assets*.o from Makefile to assets.mkTomasz Kramkowski2018-03-282-5/+7
|
* Move to using bie for assetsTomasz Kramkowski2018-03-287-31/+44
| | | | | Shaders are now stored in a bie flat archive and indexed via assets.c and assets.h.
* Makefile: -lm needed on linuxTomasz Kramkowski2018-03-281-1/+1
|
* linmath: more cleanupTomasz Kramkowski2018-03-281-38/+69
|
* .gitignore: loadgl.[ch]Tomasz Kramkowski2018-03-271-0/+2
|
* loadgl: gl_uni_*Tomasz Kramkowski2018-03-271-0/+36
| | | | Add gl_uni_loc and gl_uni_set* functions to loadgl.
* Add more vertex attributes (use a struct)Tomasz Kramkowski2018-03-274-7/+28
|
* glprog: Wrap OpenGL program object loadingTomasz Kramkowski2018-03-276-46/+107
| | | | | glprog provides a simple interface to loadign OpenGL program objects and getting their uniform locations.
* Add gl_strerror implementationTomasz Kramkowski2018-03-274-0/+27
| | | | gl_strerror takes an OpenGL error enum and acts like strerror.
* loadgl: Use m4 to generate the loadsTomasz Kramkowski2018-03-266-157/+133
| | | | | The loadgl interfaces, loads and functions are now generated with m4 so that all the information can be stored in a single place.
* init commitTomasz Kramkowski2018-03-2611-0/+1019