Sam Hocevar
e960628223
gpu: allow to set array uniform values.
13 years ago
Benjamin ‘Touky’ Huet
c7219ff1dd
New year copyright update.
13 years ago
Sam Hocevar
d6634da83f
build: fix the WTFPL site URL in all code comments.
13 years ago
Sam Hocevar
84a308af4e
gpu: warn when a vertex shader attribute isn’t found and do not crash
when a stream is not found in the vertex declaration at bind time.
13 years ago
Sam Hocevar
0149c30df4
core: refactor the Hash class so that we can hash base types, too.
13 years ago
Sam Hocevar
549566cbf1
lolfx: use square brackets to indicate shader sections.
13 years ago
Sam Hocevar
4fc8ce6470
gpu: now shaders can only be created from a LolFx file.
13 years ago
Sam Hocevar
544f1e873b
gpu: increase default minimum shader model.
13 years ago
Sam Hocevar
7d5fe8a7c6
gpu: create the ShaderTexture class, replace Shader::SetTexture with a
Shader::SetUniform override, and implement most of the FBO code for
the Direct3D backend.
13 years ago
Sam Hocevar
23ab462042
gpu: try to patch some simple GLSL shaders on the fly so that they
work on OpenGL ES contexts.
13 years ago
Sam Hocevar
28728814cc
core: replace usage of sin() or std::sin() with lol::sin() where appropriate.
13 years ago
Sam Hocevar
2feb505b72
gpu: be more verbose about shader compilation; some warnings are useful.
13 years ago
Sam Hocevar
286c5edeb6
neercs: some refactoring.
13 years ago
Sam Hocevar
e5e598bd68
gpu: first shot at a Shader::SetTexture() function.
13 years ago
Sam Hocevar
e110495464
gpu: define the _XBOX macro in our HLSL compilation.
13 years ago
Sam Hocevar
a606290ed2
gpu: allow to load a .lolfx file instead of all those shaders.
13 years ago
Sam Hocevar
28b3a4f639
gpu: implement a few CG calls.
13 years ago
Sam Hocevar
a327302484
gpu: fix Direct3D handling of float3x3 uniforms; they need padding.
13 years ago
Sam Hocevar
f1c0e3ba4e
gpu: add methods to send mat2 and mat3 matrices to the shader.
13 years ago
Sam Hocevar
fe9bab81c1
gpu: fix a great lot of Direct3D problems, spotted using PIX.
13 years ago
Sam Hocevar
6169c874e4
gpu: port the vertex buffer abstraction layer to OpenGL.
13 years ago
Sam Hocevar
f7e202a7c8
gpu: implement vertex buffer streams for Direct3D. OpenGL is missing for now.
13 years ago
Sam Hocevar
57f393d0d3
gpu: port the texture and scene handling code to Direct3D. Not functional.
13 years ago
Sam Hocevar
1485e5bf63
gpu: add support for integer uniforms and fix a few PS3 and Linux compilation
issues that were introduced with the Direct3D changes.
13 years ago
Sam Hocevar
458378003c
win32: the uniform handling code was completely broken; we now properly
retrieve the constant's register index in the description table. This also
allows us to use a single uniform handle for both the vertex and pixel
shaders in a PS3 Cg program.
13 years ago
Sam Hocevar
88f10fe54b
build: allow to build the Direct3D 9 driver with the mingw compiler.
13 years ago
Sam Hocevar
090834b149
win32: start porting the graphical backend to DirectX 9. Apparently I
cannot used DirectX 10 because my video card only supports DX9, and there
is no compatibility layer. DX11 has feature levels for older hardware so
it would work with a DX9 card, but it's not available for WinXP.
13 years ago
Sam Hocevar
bd69c76f90
xbox: fix a few problems in the shader handling code; the first tutorial now
works on the Xbox.
13 years ago
Sam Hocevar
56e4332597
build: reorganise math files in a single "math" directory, and get rid of the
"shader" source directory since we have "gpu".
13 years ago
Sam Hocevar
43e152053a
win32: add a lot of DirectX stubs.
13 years ago
Sam Hocevar
2f4c181f7d
gl: compilation fix due to #if/#elif confusion.
13 years ago
Sam Hocevar
60a2e83d54
xbox: start working on an Xbox/Direct3D port.
13 years ago
Sam Hocevar
7cfcfb2413
shader: factor the uniform handling logic into platform-independent methods
for both OpenGL and the PS3.
14 years ago
Sam Hocevar
eb32d04c84
ps3: if the implementation supports Cg but not GLSL (for instance on the PS3),
use the system's Cg compiler.
14 years ago
Sam Hocevar
6ef55ca61f
ps3: some compilation fixes to accomodate for recent debug additions.
14 years ago
Sam Hocevar
2731e49fe5
shader: check that the shader really failed to compile before outputting
the compilation log as an error.
14 years ago
Sam Hocevar
660962e894
build: put debug stuff and shader stuff in subdirectories.
14 years ago
Sam Hocevar
2a9082fe50
shader: check CRC before patching the shader and fix vertex shaders and
fragment shaders differently.
14 years ago
Sam Hocevar
c4511d9b8d
shader: support most standard parameters in the shader patcher.
14 years ago
Sam Hocevar
f5c4331d2e
shader: write a minimalist shader patcher for future GLSL 1.20 compatibility.
14 years ago
Sam Hocevar
3d4af0869a
ps3: start a minimal PS3 port using PSGL, but not CG yet.
14 years ago
Sam Hocevar
d18820d320
video: enforce shader-enabled GL implementations, getting rid of a lot
of code.
14 years ago
Sam Hocevar
10b321b204
core: get rid of now useless <cstdio> includes.
14 years ago
Sam Hocevar
1e5624d551
core: create a logger class to reduce printf usage.
14 years ago
Sam Hocevar
8848cf53db
Put everything in the "lol" namespace. Better late than never.
15 years ago
Sam Hocevar
c643668297
The engine now builds for GL and GL ES 1.x and 2.x, and runs for each
one except GL ES 2.x for now.
15 years ago
Sam Hocevar
6e173ee3eb
Put the OpenGL header handling in <lolgl.h> for more convenience.
15 years ago
Sam Hocevar
c1a48408cf
Cache shader source CRCs to avoid costly recompilations.
15 years ago
Sam Hocevar
194a025bc8
Protect the Shader constructor and provide a static creation method that
will let us cache shaders.
15 years ago
Sam Hocevar
01be151c62
Try to factor all the recent GLSL stuff in the new Shader class.
15 years ago