]>
git.tdb.fi Git - libs/gl.git/log
Mikko Rasa [Sun, 14 Feb 2021 14:57:32 +0000 (16:57 +0200)]
Refactor error reporting in SL::Parser
There's now dedicated exception classes which take care of the
formatting.
Mikko Rasa [Sun, 14 Feb 2021 12:13:56 +0000 (14:13 +0200)]
Move the GLSL compiler entirely in its own namespace
Mikko Rasa [Sun, 14 Feb 2021 00:52:21 +0000 (02:52 +0200)]
Rearrange soucre files into subdirectories
Mikko Rasa [Sun, 14 Feb 2021 00:28:43 +0000 (02:28 +0200)]
Remove the deprecated ProgramBuilder class
Mikko Rasa [Sat, 13 Feb 2021 20:08:01 +0000 (22:08 +0200)]
Fix filename handling in the Blender exporter on Windows
os.path.basename seems to consider the // prefix to indicate a UNC
path and will return an empty string if the path contains exactly
two components.
Mikko Rasa [Sat, 13 Feb 2021 18:53:41 +0000 (20:53 +0200)]
Support exporting "empty" materials with only a technique or shader
Mikko Rasa [Sat, 13 Feb 2021 18:41:33 +0000 (20:41 +0200)]
Refactor material property handling in the Blender exporter
Mikko Rasa [Sat, 13 Feb 2021 16:45:25 +0000 (18:45 +0200)]
Don't export plain values for texture-only material properties
Mikko Rasa [Sat, 13 Feb 2021 16:22:39 +0000 (18:22 +0200)]
Minor fixes
Mikko Rasa [Sat, 13 Feb 2021 16:05:34 +0000 (18:05 +0200)]
Add description fields to the export operators
Mikko Rasa [Sat, 13 Feb 2021 15:39:45 +0000 (17:39 +0200)]
Add an exporter setting to export all selected objects or meshes at once
Mikko Rasa [Sat, 13 Feb 2021 15:35:17 +0000 (17:35 +0200)]
Fix typos in custom property UI layout
Mikko Rasa [Sat, 13 Feb 2021 15:34:47 +0000 (17:34 +0200)]
Use the right property when collecting materials for a material map
Mikko Rasa [Sat, 13 Feb 2021 15:34:12 +0000 (17:34 +0200)]
Export texture sampling settings as sampler objects
Mikko Rasa [Sat, 13 Feb 2021 13:53:55 +0000 (15:53 +0200)]
Adjust texture datafile statements in Blender exporter
Sized pixel formats are now used for storage and it's only specified if
data is exported inline.
Mikko Rasa [Sat, 13 Feb 2021 11:57:23 +0000 (13:57 +0200)]
Use min_retain_frames to decide when to clear the resource load queue
Mikko Rasa [Sat, 13 Feb 2021 09:42:20 +0000 (11:42 +0200)]
Add some files which got forgotten in earlier commits
Mikko Rasa [Thu, 11 Feb 2021 23:03:16 +0000 (01:03 +0200)]
Use samplers in effects and postprocessors
Mikko Rasa [Thu, 11 Feb 2021 22:19:53 +0000 (00:19 +0200)]
Support setting a sampler directly in Renderer
Mikko Rasa [Mon, 8 Feb 2021 11:51:44 +0000 (13:51 +0200)]
Better lifecycle management of the fullscreen quad in PostProcessor
It's now stored in a WeakPtr and the postprocessor instances hold
a RefPtr to it, so it will be deleted together with the last
postprocessor.
Mikko Rasa [Sun, 7 Feb 2021 16:20:52 +0000 (18:20 +0200)]
Async load texture data directly into the pixel buffer
Mikko Rasa [Sun, 7 Feb 2021 16:20:13 +0000 (18:20 +0200)]
Fix sampler binding bug
Mikko Rasa [Sun, 7 Feb 2021 16:20:01 +0000 (18:20 +0200)]
Initialize Texture::use_srgb_format
Mikko Rasa [Sun, 7 Feb 2021 13:33:20 +0000 (15:33 +0200)]
Ensure that mapped memory is unmapped in Texture2D::AsyncLoader
Mikko Rasa [Sun, 7 Feb 2021 13:24:59 +0000 (15:24 +0200)]
Graphics::Image::get_data was renamed to get_pixels
Mikko Rasa [Sat, 6 Feb 2021 22:14:14 +0000 (00:14 +0200)]
Only mark changed fields dirty when unloading a sampler
Mikko Rasa [Sat, 6 Feb 2021 22:09:19 +0000 (00:09 +0200)]
Fix material registry initialization bug
Mikko Rasa [Sat, 6 Feb 2021 21:37:41 +0000 (23:37 +0200)]
Add sampler support to materials
Mikko Rasa [Sat, 6 Feb 2021 21:36:55 +0000 (23:36 +0200)]
Rename Material::LoaderBase to PropertyLoader
Mikko Rasa [Sat, 6 Feb 2021 17:46:31 +0000 (19:46 +0200)]
Avoid invalid memory access when destroying Mesh
Mikko Rasa [Sat, 6 Feb 2021 13:28:46 +0000 (15:28 +0200)]
Allow samplers to be loaded from datafiles
Mikko Rasa [Sat, 6 Feb 2021 13:27:53 +0000 (15:27 +0200)]
Support samplers as independent objects
Mikko Rasa [Fri, 5 Feb 2021 22:14:12 +0000 (00:14 +0200)]
Depracate the srgb parameter of Texture::image functions
Now that texture datafiles can be used to specify import settings on a
per-texture basis and the Blender exporter uses them, there's no need
for this anymore.
Mikko Rasa [Fri, 5 Feb 2021 21:30:45 +0000 (23:30 +0200)]
Load .tex2d format textures with resource manager
This allows universal use of .tex2d to specify texture settings, even
when the actual image data is loaded from an external file.
Mikko Rasa [Wed, 3 Feb 2021 22:58:19 +0000 (00:58 +0200)]
Refactor texture external image loading into a helper function
Mikko Rasa [Mon, 1 Feb 2021 20:22:04 +0000 (22:22 +0200)]
Reorder some pixel format values
They're now rougly in order from most to least used by category
Mikko Rasa [Mon, 1 Feb 2021 20:17:35 +0000 (22:17 +0200)]
Require texture data to be uploaded in a format matching the storage
This is almost always the case anyway. It makes things simpler as I don't
have to figure out what to do if someone tries to upload RGB data into a
LUMINANCE_ALPHA texture, which is really an RG texture in disguise.
There are some potential exceptions, like uploading FLOAT data to a
texture with HALF_FLOAT storage. I'll write conversion routines if those
become relevant.
Mikko Rasa [Mon, 1 Feb 2021 19:18:29 +0000 (21:18 +0200)]
Support BGR and BGRA as texture formats through swizzling
Mikko Rasa [Mon, 1 Feb 2021 19:08:29 +0000 (21:08 +0200)]
Separate abstract pixel compositions from concrete pixel formats
Texture and renderbuffer storage must now be specified using a sized
pixel format. The PixelFormat API has also been refactored.
Mikko Rasa [Mon, 1 Feb 2021 16:19:36 +0000 (18:19 +0200)]
Remove the deprecated form of Texture3D::load_image
Mikko Rasa [Mon, 1 Feb 2021 12:52:05 +0000 (14:52 +0200)]
Always use swizzle to implement luminance formats
ARB_texture_swizzle was promoted to core in OpenGL 3.3 and hardware not
supporting that is obsolete.
Mikko Rasa [Sun, 31 Jan 2021 11:11:52 +0000 (13:11 +0200)]
Simplify applying texture swizzling
It's now set once when creating storage for the texture, so tracking its
dirty state is not necessary.
Mikko Rasa [Sun, 31 Jan 2021 00:55:49 +0000 (02:55 +0200)]
Move texture sampler state to a separate object
First step in supporting sampler objects
Mikko Rasa [Sun, 31 Jan 2021 00:24:14 +0000 (02:24 +0200)]
Allow texture mipmap levels to be specified in datafiles
This appears to have been missed in
03d3984 which removed the filtering
heuristic from storage/allocate.
Mikko Rasa [Sun, 31 Jan 2021 00:09:16 +0000 (02:09 +0200)]
Move filter heuristic for mipmap levels to Texture::Loader
Mikko Rasa [Sat, 30 Jan 2021 18:03:47 +0000 (20:03 +0200)]
Improve allocation handling in cube map textures
While there isn't enough bits to track all face allocations, tracking
the base level per face is possible. This allows mipmap generation to
work more sensibly.
Mikko Rasa [Sat, 30 Jan 2021 17:57:58 +0000 (19:57 +0200)]
Deprecate the mipmap_levels parameter in Texture
Instead specify the desired amount of mipmap levels when loading an
image. This can be more robustly checked against the defined storage.
Mikko Rasa [Tue, 26 Jan 2021 23:49:00 +0000 (01:49 +0200)]
Remove the usage member from Buffer entirely
Mikko Rasa [Mon, 25 Jan 2021 23:47:05 +0000 (01:47 +0200)]
Clear Texture2D's allocation flags when unloading
Mikko Rasa [Mon, 25 Jan 2021 23:41:16 +0000 (01:41 +0200)]
Disallow drawing batches without an index buffer
Mikko Rasa [Mon, 25 Jan 2021 23:38:57 +0000 (01:38 +0200)]
Give a name to the ResourceManager loading thread
Mikko Rasa [Mon, 25 Jan 2021 23:20:48 +0000 (01:20 +0200)]
Don't try to set parameters for textures which aren't loaded yet
Mikko Rasa [Mon, 25 Jan 2021 23:19:33 +0000 (01:19 +0200)]
Use glCreateTextures also for async loading
Otherwise the texture won't be fully created when glTextureStorage2D
is called.
Mikko Rasa [Mon, 25 Jan 2021 23:17:52 +0000 (01:17 +0200)]
Better way of refreshing VertexSetup
It can now disable attribute arrays which are no longer used.
Mikko Rasa [Mon, 25 Jan 2021 23:15:18 +0000 (01:15 +0200)]
Refresh vertex setup when loading vertices for a mesh
Also add a better guard against performing OpenGL calls from the loading
thread.
Mikko Rasa [Mon, 25 Jan 2021 23:01:53 +0000 (01:01 +0200)]
Trigger Mesh::check_buffers from MeshBuilder destructor
Doing it for every vertex wastes performance
Mikko Rasa [Mon, 25 Jan 2021 02:18:50 +0000 (04:18 +0200)]
Minor comment adjustments
Mikko Rasa [Mon, 25 Jan 2021 02:15:33 +0000 (04:15 +0200)]
Clear offset of Bufferable when removing from buffer
It shouldn't really matter but just in case.
Mikko Rasa [Mon, 25 Jan 2021 02:15:02 +0000 (04:15 +0200)]
Remove commented out debugging statements
Mikko Rasa [Mon, 25 Jan 2021 02:14:35 +0000 (04:14 +0200)]
Add some hints for older compilers
Mikko Rasa [Mon, 25 Jan 2021 02:13:10 +0000 (04:13 +0200)]
Add datafile statement which was apparently forgotten
Mikko Rasa [Mon, 25 Jan 2021 02:07:49 +0000 (04:07 +0200)]
Refactor setting uniform values in ProgramData
This eliminates copies when changing values of existing uniforms.
Mikko Rasa [Mon, 25 Jan 2021 02:04:11 +0000 (04:04 +0200)]
Throw an exception if there's too many uniforms in a ProgramData
I'd rather find out I need to make the mask wider than have a program
unexplainably slow down.
Mikko Rasa [Mon, 25 Jan 2021 01:21:00 +0000 (03:21 +0200)]
Add another constructor to RenderTarget to resolve an ambiguity
RenderOutput looks like an unsigned more than a RenderTargetFormat so
the compiler would resolve it to the multisample overload.
Mikko Rasa [Mon, 25 Jan 2021 01:13:29 +0000 (03:13 +0200)]
Rename batch's data_type to index_type
Mikko Rasa [Mon, 25 Jan 2021 01:07:18 +0000 (03:07 +0200)]
Read shader and program info logs directly into an std::string
Mikko Rasa [Mon, 25 Jan 2021 00:56:06 +0000 (02:56 +0200)]
Make buffer storage immutable and use ARB_buffer_storage
Mikko Rasa [Mon, 25 Jan 2021 00:48:21 +0000 (02:48 +0200)]
Deprecate some Buffer features which don't translate to Vulkan
Mikko Rasa [Mon, 25 Jan 2021 00:12:26 +0000 (02:12 +0200)]
Move buffer resizing out of Bufferable
Required for immutable buffer storage. This commit has a couple warts
I didn't bother to fix because those parts will be rewritten.
Mikko Rasa [Sun, 24 Jan 2021 23:46:34 +0000 (01:46 +0200)]
Some tweaks to Mesh::add_batch
Index buffer can be assumed to exist. Add a fast path for first batch,
which will also be useful in the next stage of buffer refactoring.
Mikko Rasa [Sun, 24 Jan 2021 16:25:51 +0000 (18:25 +0200)]
Further refactor Bufferable's API for derived classes
Mikko Rasa [Sun, 24 Jan 2021 14:13:20 +0000 (16:13 +0200)]
Clear the dirty flag of Bufferable in upload_data
Mikko Rasa [Sat, 23 Jan 2021 17:27:32 +0000 (19:27 +0200)]
Remove support for UInt8 indices from Batch
Vulkan does not support them
Mikko Rasa [Sat, 23 Jan 2021 17:26:28 +0000 (19:26 +0200)]
Collapse the shared part of Mesh::draw and draw_instanced
Mikko Rasa [Sat, 23 Jan 2021 10:01:36 +0000 (12:01 +0200)]
Increase version to 3.0
The recent modernization work has introduced some incompatible changes,
and now I'm gearing towards Vulkan support which will change the API
even more.
Mikko Rasa [Sun, 17 Jan 2021 17:02:26 +0000 (19:02 +0200)]
Use matching type to retrieve interpolated spline values
This way the double-to-float conversion is done at a more relevant stage.
Mikko Rasa [Sat, 9 Jan 2021 16:53:09 +0000 (18:53 +0200)]
Convert the extension generator script to Python 3
Mikko Rasa [Thu, 7 Jan 2021 22:28:19 +0000 (00:28 +0200)]
Fix applying of single-component scaling curves
Mikko Rasa [Thu, 7 Jan 2021 10:16:33 +0000 (12:16 +0200)]
Suppress some deprecation warnings from internal use
Mikko Rasa [Wed, 30 Dec 2020 15:09:15 +0000 (17:09 +0200)]
Add multiplication operators between Matrix and float
Newer gcc versions are complaining about an ambiguity between the vector
multiplication operators in GL::Matrix and the scalar multiplication for
LinAl::Matrix.
Mikko Rasa [Sun, 2 Aug 2020 12:04:41 +0000 (15:04 +0300)]
Actually use the light color in cooktorrance shader
Mikko Rasa [Sun, 2 Aug 2020 11:44:56 +0000 (14:44 +0300)]
Use correct shader variable names for PBR materials
Mikko Rasa [Sat, 27 Jun 2020 09:30:44 +0000 (12:30 +0300)]
Convert exporter operator properties to annotations
Mikko Rasa [Sat, 27 Jun 2020 08:57:58 +0000 (11:57 +0300)]
Replace single file mode in object exporter with collection
Mikko Rasa [Fri, 26 Jun 2020 23:07:02 +0000 (02:07 +0300)]
Refactor export extension change into the exporter base class
Mikko Rasa [Fri, 26 Jun 2020 22:53:21 +0000 (01:53 +0300)]
Refactor writing files in the Blender exporter
Instead of having the same loop over statements in a dozen of places,
put it in the Resource class.
Mikko Rasa [Tue, 23 Jun 2020 16:38:56 +0000 (19:38 +0300)]
Remove support for inline textures in RenderPass
The datafile system has advanced sufficiently that this particular case
of inlining is no longer needed.
Mikko Rasa [Tue, 23 Jun 2020 16:38:03 +0000 (19:38 +0300)]
Update export progress more frequently
Mikko Rasa [Tue, 23 Jun 2020 16:37:40 +0000 (19:37 +0300)]
Raise an exception if the TBN UV layer is not found during export
Mikko Rasa [Tue, 23 Jun 2020 15:14:59 +0000 (18:14 +0300)]
Rework Blender material and texture export
Mikko Rasa [Tue, 23 Jun 2020 14:20:20 +0000 (17:20 +0300)]
Require all uniforms in a buffer-backed block to be present
Mikko Rasa [Tue, 23 Jun 2020 14:19:11 +0000 (17:19 +0300)]
Make setting a nonexistent uniform only a warning in debug builds
During development it's sometimes necessary to disable parts of a shader,
which causes variables to disappear.
Mikko Rasa [Tue, 23 Jun 2020 14:11:54 +0000 (17:11 +0300)]
Normalize fragment normal
With some shading models even small deviations, such as result from
the quantization to 8-bit texel component values, may cause visible
artifacts.
Mikko Rasa [Tue, 23 Jun 2020 14:06:30 +0000 (17:06 +0300)]
Add a PBR material type and corresponding shader
Mikko Rasa [Tue, 23 Jun 2020 14:01:53 +0000 (17:01 +0300)]
Naming tweaks in builtin shaders
Mikko Rasa [Thu, 11 Jun 2020 19:24:20 +0000 (22:24 +0300)]
Use HDR rendering and a colorcurve postprocessor in desertpillars
Mikko Rasa [Thu, 11 Jun 2020 15:07:38 +0000 (18:07 +0300)]
Modernize the demo and tool programs
Mikko Rasa [Thu, 11 Jun 2020 19:05:19 +0000 (22:05 +0300)]
Add a flag to BasicMaterial to enable shadow map
Mikko Rasa [Thu, 11 Jun 2020 14:18:08 +0000 (17:18 +0300)]
Fix shadow map uniform name
Mikko Rasa [Thu, 11 Jun 2020 13:23:19 +0000 (16:23 +0300)]
Give materials the capability to automatically create a suitable shader