Commit graph

151 commits

Author SHA1 Message Date
70c51eb04d Rename some maths interfaces 2015-12-27 17:09:05 +01:00
6d3a0e19e7 Setup the opengl context on a separate thread
This requires all opengl functions to be executed on this separate
thread.
2015-12-27 17:09:05 +01:00
99e97f7b71 Fix the import of the transform attribute in the scene graph 2015-12-27 17:09:05 +01:00
b0f45911ab Use defparameter to declare shader variables 2015-12-27 17:09:05 +01:00
a3cc27237b Add accessors for vect and matrix classes to the underlying data 2015-12-27 17:09:05 +01:00
5e4b3241aa Define generics with common names to be used by several different classes 2015-12-27 17:09:05 +01:00
e9be960167 Fix the job module interface to make use of specialized threads 2015-12-27 17:09:05 +01:00
d6af14d552 Move clock utility to time.lisp 2015-12-27 17:09:05 +01:00
53de3d0cf6 Wrap glop functions in a viewport file
regroup opengl version and window creation and event polling in the
viewport file.
To further clean up the files layout, move input.lisp to engine folder
gl-utils is now used for some simple macros
2015-12-27 17:09:05 +01:00
073bec3e64 Move the shader folder to the root folder 2015-12-27 17:09:05 +01:00
ab0698bef1 Add a way to import graphic assets from various sources 2015-12-27 17:09:05 +01:00
4e974ad8a2 Add a resource module
Resources are loaded as binary or lisp files. A streamed resource is
also planned but not yet implemented.
Resources are shared and loading happens asynchronically,
powered by promises.
Resources are used through proxies that shares a weak pointer.
When a proxy is gc'd, a finalizer is triggered using trivial-garbage to
release the resource.
2015-12-27 17:09:05 +01:00
7e6f6f699c Make a job-utils package for test system
This lets us dynamically create new threads to test features in
multithreaded environment.
2015-12-27 17:09:05 +01:00
0f0ed3a879 Introduce promises into the job module 2015-12-27 17:09:05 +01:00
0c4b744e75 Remove aif and awhen
Hopefully we won't be using anaphoric macros in this project
2015-12-27 17:09:05 +01:00
c4b1680d2f Adapt unit test framework for inferred-system
Add unit tests for jobs
2015-12-27 17:09:05 +01:00
f31a433854 Rewrite job system using clos 2015-12-27 17:09:05 +01:00
7c3a9a01c0 Fix unary v- function which didn't do anything 2015-12-27 17:09:05 +01:00
00fa5fab7a Fix the typed returned by quaternion constructor 2015-12-27 17:09:05 +01:00
0aef2509d5 fix type spec in maths module 2015-12-27 17:09:05 +01:00
fc69969099 Refactor packages layout using inferred-packages-system 2015-12-27 17:09:05 +01:00
dbc009d466 Rewrite maths library's implementation and interface
Make use of CLOS for vector and matrix types
Rewrite matrix implementation as column major
Verify the computations in rewritten unit tests
2015-05-25 23:20:17 +02:00
9b69dee238 Fix unit test for the new defshader system 2015-05-05 18:31:50 +02:00
c910a4ce1f Implement a new shader definition system
Use a Domain Specific Language to define shaders in common-lisp syntax.
The code is then walked and compiled into glsl expressions and stored in
easy to use structures.

At the program initialization, the shader programs are compiled into opengl.

Dependencies are also kept, so that if a shader is redefined, the
corresponding program will be recompiled into opengl.

The old glsl-compiler is deleted as it is now rendered useless.

The render and mesh code are fixed according to changes in the interface.
2015-05-05 14:07:32 +02:00
e73a96de44 fixup command-line-option 2015-05-05 13:28:18 +02:00
2fda251cd7 fixup loop-with-progress 2015-05-05 13:27:41 +02:00
7a8f3117ed Add a way to check if opengl is initialized or not 2015-05-03 23:38:19 +02:00
fa14b3dae4 Properly parse numbers from the command line or in version strings 2015-04-27 22:19:28 +02:00
7ba21e011c Add a macro to display a progress indicator to looping process 2015-04-24 14:30:41 +02:00
a26b19be1b Enhance the gl-assert macro to include an implicit progn 2015-04-21 17:19:35 +02:00
8b96f8166f Add glsl version directive to the shader according to the supported version 2015-04-04 23:45:23 +02:00
a7fd8e4842 Handle the shader lambda-list (preamble) 2015-04-04 23:42:56 +02:00
c66e3c62e8 Transform common-lisp symbols into glsl compliant variable names 2015-04-04 23:38:01 +02:00
5cc428df88 Fix gl version retrieval and get glsl version at init 2015-04-04 23:32:34 +02:00
1c1862dd6d Handle more operations and wrap in main function
Add handlers for infix operations (+ - * / %) and assignments.
Wrap the resulting code in a main function.
Prepare for the lambda-list processing
2015-03-29 19:02:59 +02:00
f8c1db2192 Add helpers for let handler 2015-03-25 23:25:25 +01:00
1a94093619 Enhance output layout 2015-03-25 23:25:00 +01:00
f12a8076d0 Add a simple handler for `let' 2015-03-25 17:37:27 +01:00
2c0f5f1904 Add a starting block for a glsl dsl compiler 2015-03-22 22:40:18 +01:00
906d165556 Enhance the genericity of the walker 2015-03-22 22:39:39 +01:00
927aa91f93 Fix utf-8 encoding 2015-03-22 22:30:55 +01:00
64a7d83e80 Add the first part of a code walker for the shader dsl 2015-03-20 16:44:37 +01:00
d8df41dbe4 Refactor the game module and rethink the way to import symbols
From now on, import symbols from other packages when it makes sense.
2014-11-14 21:53:24 +09:00
9faa777972 Rewrite modules functions as macro
This let us recompile initialize/finalize/update functions during
runtime without having to register them once again.
2014-11-14 21:45:54 +09:00
6b2c2df3bf Add some simple objects to be rendered
A cube and a triangle
Make use of the input system to move the camera.
2014-11-10 16:54:03 +09:00
f51bb6d4cf Add an input system inspired by emacs' keymaps
Use glop to poll the events each frame and pass any input event to the
input system.
Provide functions like `global-set-key' or `global-set-motion' to setup
function to be triggered when a key is pressed or when the mouse is moved.
2014-11-10 16:54:03 +09:00
764baddb3c fix the render module to use the scene graph defined in game module
Modify the mesh class to use a foreign array for the vertex and index
streams to pass to opengl, but the memory is not yet properly managed.

Add a function to render each node in the scene graph when it finds a
mesh component.
2014-11-10 16:54:02 +09:00
d4fd7ecc55 Add a game module
The game module contains for now a internal loop to allow the game to
always update at 16ms and a simple scene graph to place object in a 3d
world. A camera class is defined to be able to view the world.
2014-11-10 16:54:02 +09:00
75f40f6be8 cl-test-more has been renamed prove 2014-11-09 12:17:24 +09:00
75aae52cfe Include alexandria library in the project
Discard useless once-only macro and replace it by alexandria's implementation
2014-11-04 16:58:47 +09:00