]> git.tdb.fi Git - libs/gl.git/log
libs/gl.git
10 years agoUse base pixelformat when loading texture data
Mikko Rasa [Sun, 5 Jan 2014 10:51:29 +0000 (12:51 +0200)]
Use base pixelformat when loading texture data

10 years agoAdd gamma correction and sRGB conversion support to ColorCurve
Mikko Rasa [Sat, 28 Dec 2013 15:14:07 +0000 (17:14 +0200)]
Add gamma correction and sRGB conversion support to ColorCurve

10 years agoAdd basic support for 1D textures
Mikko Rasa [Sat, 28 Dec 2013 15:10:36 +0000 (17:10 +0200)]
Add basic support for 1D textures

10 years agoConvert desertpillars to use the new shader customization
Mikko Rasa [Mon, 23 Dec 2013 16:22:19 +0000 (18:22 +0200)]
Convert desertpillars to use the new shader customization

10 years agoMore flexible system for customizing generated shaders
Mikko Rasa [Mon, 23 Dec 2013 16:14:13 +0000 (18:14 +0200)]
More flexible system for customizing generated shaders

Any standard variable can now be overridden, and new ones added.  It's
still somewhat fragile concerning variable ordering and some other things,
but it works when used correctly.

10 years agoSimplify VAO setup code
Mikko Rasa [Sun, 22 Dec 2013 00:15:06 +0000 (02:15 +0200)]
Simplify VAO setup code

Previously buffer binding semantics caused complications, as index buffer
was unbound while a mesh was bound so batches couldn't be updated.  Now
that buffers behave better with bounds meshes, batches can take care of
themselves again.

Triggering the setup from bind() instead of draw() gets rid of another
bunch of complications, since it will only be called when the VAO is going
to be actually used.

10 years agoAvoid segfault for trying to refresh a Mesh with no buffers
Mikko Rasa [Sat, 21 Dec 2013 16:58:31 +0000 (18:58 +0200)]
Avoid segfault for trying to refresh a Mesh with no buffers

10 years agoThrow an exception if trying to draw a Mesh with a different Mesh bound
Mikko Rasa [Sat, 21 Dec 2013 16:57:41 +0000 (18:57 +0200)]
Throw an exception if trying to draw a Mesh with a different Mesh bound

10 years agoEnforce unbinding as well as binding buffers
Mikko Rasa [Sat, 21 Dec 2013 16:51:47 +0000 (18:51 +0200)]
Enforce unbinding as well as binding buffers

10 years agoPresent Mesh's index buffer as current while the Mesh is bound
Mikko Rasa [Sat, 21 Dec 2013 11:30:02 +0000 (13:30 +0200)]
Present Mesh's index buffer as current while the Mesh is bound

This simplifies the internal update operations.

10 years agoUse RAII binders in place of manual binding
Mikko Rasa [Sat, 21 Dec 2013 11:20:21 +0000 (13:20 +0200)]
Use RAII binders in place of manual binding

10 years agoBufferAlias is now obsolete
Mikko Rasa [Sat, 21 Dec 2013 09:59:28 +0000 (11:59 +0200)]
BufferAlias is now obsolete

10 years agoAdd support for multiple binding points in the RAII binders
Mikko Rasa [Sat, 21 Dec 2013 09:58:57 +0000 (11:58 +0200)]
Add support for multiple binding points in the RAII binders

10 years agoRewrite Bind as two different classes
Mikko Rasa [Sat, 21 Dec 2013 09:36:40 +0000 (11:36 +0200)]
Rewrite Bind as two different classes

Boolean flag parameters are not too clear without seeing the declaration.
This new implementation also doesn't use dynamic allocation.

10 years agoMake desertpillars compatible with the modernization changes
Mikko Rasa [Sat, 21 Dec 2013 09:17:17 +0000 (11:17 +0200)]
Make desertpillars compatible with the modernization changes

10 years agoEscape from the renderer before applying postprocessors
Mikko Rasa [Thu, 19 Dec 2013 21:15:36 +0000 (23:15 +0200)]
Escape from the renderer before applying postprocessors

10 years agoAutomatically determine texture units for effects
Mikko Rasa [Thu, 19 Dec 2013 21:10:15 +0000 (23:10 +0200)]
Automatically determine texture units for effects

At the moment this breaks such effects in fixed-function mode on platforms
that support shader-only texture units.  Will devise a fix later.

10 years agoAdd missing initializer
Mikko Rasa [Thu, 19 Dec 2013 21:03:49 +0000 (23:03 +0200)]
Add missing initializer

10 years agoAdd an overload of bind_attribute that takes a VertexComponent
Mikko Rasa [Thu, 19 Dec 2013 20:40:52 +0000 (22:40 +0200)]
Add an overload of bind_attribute that takes a VertexComponent

10 years agoAdd missing #include
Mikko Rasa [Tue, 17 Dec 2013 20:13:32 +0000 (22:13 +0200)]
Add missing #include

10 years agoAdd shd_eye_matrix to ShadowMap's shdata
Mikko Rasa [Mon, 16 Dec 2013 20:25:49 +0000 (22:25 +0200)]
Add shd_eye_matrix to ShadowMap's shdata

10 years agoUse vector and matrix operations in ShadowMap
Mikko Rasa [Mon, 16 Dec 2013 20:24:55 +0000 (22:24 +0200)]
Use vector and matrix operations in ShadowMap

10 years agoIntegrate modern shaders and VAOs with Renderer
Mikko Rasa [Sun, 15 Dec 2013 23:26:55 +0000 (01:26 +0200)]
Integrate modern shaders and VAOs with Renderer

10 years agoThe Scope enum has no need to be public
Mikko Rasa [Sun, 15 Dec 2013 23:23:50 +0000 (01:23 +0200)]
The Scope enum has no need to be public

10 years agoSupport generating modern, GLSL 1.30+ shaders with ProgramBuilder
Mikko Rasa [Sun, 15 Dec 2013 23:22:54 +0000 (01:22 +0200)]
Support generating modern, GLSL 1.30+ shaders with ProgramBuilder

10 years agoCreate ProgramData for materials and lights
Mikko Rasa [Sun, 15 Dec 2013 23:16:31 +0000 (01:16 +0200)]
Create ProgramData for materials and lights

10 years agoAdd interface for glBindFragDataLocation, required for modern shaders
Mikko Rasa [Sun, 15 Dec 2013 23:05:29 +0000 (01:05 +0200)]
Add interface for glBindFragDataLocation, required for modern shaders

10 years agoRemove VertexArray's own dirty member now that it's a Bufferable
Mikko Rasa [Sun, 15 Dec 2013 23:04:48 +0000 (01:04 +0200)]
Remove VertexArray's own dirty member now that it's a Bufferable

10 years agoAdd vertex array object support to Mesh
Mikko Rasa [Sun, 15 Dec 2013 23:03:26 +0000 (01:03 +0200)]
Add vertex array object support to Mesh

Renderer integration to be added soon.

10 years agoExplicitly bind buffer in Bufferable::update_buffer
Mikko Rasa [Sun, 15 Dec 2013 18:03:20 +0000 (20:03 +0200)]
Explicitly bind buffer in Bufferable::update_buffer

This reduces unnecessary bind/unbind thrashing if the buffer needs to be
resized.

10 years agoAdd some accessors to Buffer
Mikko Rasa [Sun, 15 Dec 2013 18:02:46 +0000 (20:02 +0200)]
Add some accessors to Buffer

10 years agoAdd a public refresh function to Bufferable
Mikko Rasa [Sat, 30 Nov 2013 18:15:29 +0000 (20:15 +0200)]
Add a public refresh function to Bufferable

This is needed soon for VAO support.

10 years agoTweak buffer logic a bit in Batch::draw
Mikko Rasa [Sat, 30 Nov 2013 16:56:42 +0000 (18:56 +0200)]
Tweak buffer logic a bit in Batch::draw

Excplicitly binding the buffer first avoids unnecessary implicit binds in
the buffer update code.

10 years agoConvert VertexArray into a Bufferable
Mikko Rasa [Sat, 30 Nov 2013 16:55:10 +0000 (18:55 +0200)]
Convert VertexArray into a Bufferable

10 years agoUse renderer for lighting in the shaders demo
Mikko Rasa [Fri, 29 Nov 2013 09:50:42 +0000 (11:50 +0200)]
Use renderer for lighting in the shaders demo

10 years agoDon't bother with clearing winding test
Mikko Rasa [Fri, 29 Nov 2013 09:35:47 +0000 (11:35 +0200)]
Don't bother with clearing winding test

Why was that even there?  Winding test is stored as part of Renderer's
State, so it will be cleared by a pop.

10 years agoRemove vertex array tracking from Renderer
Mikko Rasa [Fri, 29 Nov 2013 08:46:27 +0000 (10:46 +0200)]
Remove vertex array tracking from Renderer

It's unnecessary because VertexArray has its own state tracking and never
needs to be unbound.

10 years agoMove vertex buffer management from VertexArray to Mesh
Mikko Rasa [Thu, 28 Nov 2013 20:21:59 +0000 (22:21 +0200)]
Move vertex buffer management from VertexArray to Mesh

It was getting in the way of implementing vertex array objects.

10 years agoRestore old samples value if create_targets fails
Mikko Rasa [Thu, 28 Nov 2013 12:51:23 +0000 (14:51 +0200)]
Restore old samples value if create_targets fails

An application could use try-catch to check if a certain level of
multisampling is available, and leaving samples to that value would
interfere with later operations.

10 years agoRemove get(int *)
Mikko Rasa [Thu, 28 Nov 2013 12:42:58 +0000 (14:42 +0200)]
Remove get(int *)

By contrast to the previous commit, this was rather useless and not
actually used anywhere in the code.

10 years agoUse wrappers for single-value glGet* calls
Mikko Rasa [Thu, 28 Nov 2013 12:39:49 +0000 (14:39 +0200)]
Use wrappers for single-value glGet* calls

Having to create temporary stack variables just for passing in the return
pointer is quite annoying.

10 years agoCheck range when attaching Lights to a Lighting
Mikko Rasa [Thu, 28 Nov 2013 12:24:11 +0000 (14:24 +0200)]
Check range when attaching Lights to a Lighting

10 years agoFix some incorrect whitespace
Mikko Rasa [Thu, 28 Nov 2013 12:23:30 +0000 (14:23 +0200)]
Fix some incorrect whitespace

10 years agoBetter state tracking for bound objects
Mikko Rasa [Thu, 28 Nov 2013 12:14:56 +0000 (14:14 +0200)]
Better state tracking for bound objects

10 years agoGive TexEnv a default object since it can't be disabled
Mikko Rasa [Thu, 28 Nov 2013 11:11:35 +0000 (13:11 +0200)]
Give TexEnv a default object since it can't be disabled

10 years agoRewrite light binding to match textures
Mikko Rasa [Thu, 28 Nov 2013 00:02:49 +0000 (02:02 +0200)]
Rewrite light binding to match textures

Both have multiple multiple parallel bind points, so it makes sense they
behave in the same way.

10 years agoAlways bind textures in a specific texture unit
Mikko Rasa [Wed, 27 Nov 2013 21:23:33 +0000 (23:23 +0200)]
Always bind textures in a specific texture unit

This eliminates one level of global state, simplifying the API and
offering new optimization possibilities.  Since single-texturing is a
common use case, the parameterless bind/unbind functions have been left
in but changed to operate on unit 0.

10 years agoRemove ambient color from Light
Mikko Rasa [Wed, 27 Nov 2013 10:05:01 +0000 (12:05 +0200)]
Remove ambient color from Light

It doesn't make much sense, as there's already the global ambient color in
Lighting.  I haven't ever used it either, so remove directly instead of
deprecating.

10 years agoRemove some deprecated stuff
Mikko Rasa [Wed, 27 Nov 2013 09:56:01 +0000 (11:56 +0200)]
Remove some deprecated stuff

10 years agoConvert Matrix to use floats
Mikko Rasa [Wed, 27 Nov 2013 09:06:38 +0000 (11:06 +0200)]
Convert Matrix to use floats

This halves matrix storage size to 64 bytes and reduces overhead from
conversions at certain places.  If an application desires greater
precision, it can use the LinAl::Matrix and Geometry::AffineTransformation
classes internally.

10 years agoMake TexUnits aware of their incides
Mikko Rasa [Wed, 27 Nov 2013 08:30:26 +0000 (10:30 +0200)]
Make TexUnits aware of their incides

11 years agoUnbind Lighting in Renderer destructor
Mikko Rasa [Mon, 25 Nov 2013 18:29:32 +0000 (20:29 +0200)]
Unbind Lighting in Renderer destructor

This solves a problem where the same lightning would get bound later and
retain an incorrect matrix due to already being bound.  It's not really a
proper fix but works in the most common cases.

11 years agoCheck and report the use of legacy built-in variables in a program
Mikko Rasa [Mon, 25 Nov 2013 15:25:22 +0000 (17:25 +0200)]
Check and report the use of legacy built-in variables in a program

11 years agoUse sizeof when passing buffer size
Mikko Rasa [Mon, 25 Nov 2013 15:24:49 +0000 (17:24 +0200)]
Use sizeof when passing buffer size

11 years agoBe more direct about getting uniform counts from the program object
Mikko Rasa [Mon, 25 Nov 2013 15:24:18 +0000 (17:24 +0200)]
Be more direct about getting uniform counts from the program object

11 years agoAdd function to check GLSL version
Mikko Rasa [Mon, 25 Nov 2013 15:22:12 +0000 (17:22 +0200)]
Add function to check GLSL version

11 years agoRefactor version number extraction and checks
Mikko Rasa [Mon, 25 Nov 2013 15:21:46 +0000 (17:21 +0200)]
Refactor version number extraction and checks

11 years agoStore and expose the projection matrix
Mikko Rasa [Mon, 25 Nov 2013 14:23:51 +0000 (16:23 +0200)]
Store and expose the projection matrix

11 years agoMake better use of matrix operations in Camera
Mikko Rasa [Mon, 25 Nov 2013 14:21:57 +0000 (16:21 +0200)]
Make better use of matrix operations in Camera

11 years agoHomogenise binding semantics
Mikko Rasa [Fri, 11 Oct 2013 12:53:16 +0000 (15:53 +0300)]
Homogenise binding semantics

Objects that wrap always-on state should restore default states when
unbound.

Enable/disable of otherwise global state should be exposed through
binding, not a flag in an object.

11 years agoDeal with nontrivial image configurations
Mikko Rasa [Fri, 11 Oct 2013 11:51:41 +0000 (14:51 +0300)]
Deal with nontrivial image configurations

11 years agoGet function pointers on OS X through weak symbols
Mikko Rasa [Thu, 10 Oct 2013 12:24:09 +0000 (15:24 +0300)]
Get function pointers on OS X through weak symbols

11 years agoExtract parameter and return type information from gl.xml
Mikko Rasa [Thu, 10 Oct 2013 12:23:19 +0000 (15:23 +0300)]
Extract parameter and return type information from gl.xml

11 years agoHave the maketex script take texture parameters as options
Mikko Rasa [Fri, 4 Oct 2013 11:11:35 +0000 (14:11 +0300)]
Have the maketex script take texture parameters as options

11 years agoAdd a shortcut for specifying both texture filters
Mikko Rasa [Thu, 3 Oct 2013 21:21:26 +0000 (00:21 +0300)]
Add a shortcut for specifying both texture filters

11 years agoFinal touches of OS X support
Mikko Rasa [Thu, 3 Oct 2013 08:02:04 +0000 (11:02 +0300)]
Final touches of OS X support

11 years agoInclude extension headers in places that need enums from them
Mikko Rasa [Thu, 3 Oct 2013 07:57:40 +0000 (10:57 +0300)]
Include extension headers in places that need enums from them

A few places still rely on gl.h for OpenGL 1.3 or 1.4 enums.  I may look
into these later.

11 years agoCheck the presence of extension rather than function
Mikko Rasa [Thu, 3 Oct 2013 07:49:31 +0000 (10:49 +0300)]
Check the presence of extension rather than function

11 years agoMinor fixes, courtesy of Apple's compiler
Mikko Rasa [Thu, 3 Oct 2013 07:24:53 +0000 (10:24 +0300)]
Minor fixes, courtesy of Apple's compiler

It likes to complain about a lot of things.  Some of them make sense (like
unused private members), but mostly it's just being a bitch.

11 years agoAdd a missing initialization
Mikko Rasa [Wed, 2 Oct 2013 17:58:28 +0000 (20:58 +0300)]
Add a missing initialization

11 years agoDeal with extensions that are not present at compile time
Mikko Rasa [Wed, 2 Oct 2013 17:43:24 +0000 (20:43 +0300)]
Deal with extensions that are not present at compile time

11 years agoCleanup and documentation of extgen.py
Mikko Rasa [Wed, 2 Oct 2013 12:12:22 +0000 (15:12 +0300)]
Cleanup and documentation of extgen.py

11 years agoMigrate to the new XML-based OpenGL API registry
Mikko Rasa [Wed, 2 Oct 2013 11:36:25 +0000 (14:36 +0300)]
Migrate to the new XML-based OpenGL API registry

11 years agoAlways include glext.h
Mikko Rasa [Wed, 2 Oct 2013 08:20:03 +0000 (11:20 +0300)]
Always include glext.h

There's no real reason to leave it out, and having it in multiple places
causes trouble for the upcoming OS X support.

11 years agoSet read buffer as well as draw buffer for FBO
Mikko Rasa [Wed, 2 Oct 2013 07:56:28 +0000 (10:56 +0300)]
Set read buffer as well as draw buffer for FBO

Apparently Nvidia drivers are too lax with this, but some others don't
like if the FBO has no color attachments and the read buffer is left at
its default setting of COLOR_ATTACHMENT0.

11 years agoMake cube map textures loadable from datafiles
Mikko Rasa [Sat, 21 Sep 2013 17:06:54 +0000 (20:06 +0300)]
Make cube map textures loadable from datafiles

11 years agoSupport off-center frustum in Camera
Mikko Rasa [Sat, 21 Sep 2013 17:06:17 +0000 (20:06 +0300)]
Support off-center frustum in Camera

11 years agoAdd a Scene type that sorts its renderables by depth
Mikko Rasa [Sat, 21 Sep 2013 09:59:22 +0000 (12:59 +0300)]
Add a Scene type that sorts its renderables by depth

11 years agoStereographic rendering moved to a separate library (mspvr)
Mikko Rasa [Fri, 13 Sep 2013 13:27:55 +0000 (16:27 +0300)]
Stereographic rendering moved to a separate library (mspvr)

11 years agoAdd an option to export colors as sRGB
Mikko Rasa [Wed, 11 Sep 2013 09:31:28 +0000 (12:31 +0300)]
Add an option to export colors as sRGB

11 years agoDeal with some irregularities in the Blender exporter
Mikko Rasa [Wed, 11 Sep 2013 09:06:30 +0000 (12:06 +0300)]
Deal with some irregularities in the Blender exporter

Things like loose vertices, non-manifold edges or zero-length edges should
no longer cause crashes.

11 years agoAdd some documentation to the culler system
Mikko Rasa [Wed, 11 Sep 2013 09:03:03 +0000 (12:03 +0300)]
Add some documentation to the culler system

11 years agoRename Culler::setup_frame to setup_pass
Mikko Rasa [Wed, 11 Sep 2013 09:02:11 +0000 (12:02 +0300)]
Rename Culler::setup_frame to setup_pass

It's really called once per pass, so name it accordingly.

11 years agoAdd a frustum culler class
Mikko Rasa [Wed, 11 Sep 2013 08:02:43 +0000 (11:02 +0300)]
Add a frustum culler class

11 years agoAdd an interface for obtaining bounding spheres from renderables
Mikko Rasa [Wed, 11 Sep 2013 07:53:41 +0000 (10:53 +0300)]
Add an interface for obtaining bounding spheres from renderables

This can be used for various forms of culling.

11 years agoAdd interfaces for culling
Mikko Rasa [Mon, 9 Sep 2013 16:06:44 +0000 (19:06 +0300)]
Add interfaces for culling

Culler implementations to come soon.

11 years agoAdd a flag to RenderPass to render the back faces of a mesh
Mikko Rasa [Mon, 9 Sep 2013 16:00:40 +0000 (19:00 +0300)]
Add a flag to RenderPass to render the back faces of a mesh

This is useful for transparency effects.

11 years agoThrow if trying to render an Object without a Technique
Mikko Rasa [Mon, 9 Sep 2013 15:57:21 +0000 (18:57 +0300)]
Throw if trying to render an Object without a Technique

11 years agoMake RenderPass easier to use
Mikko Rasa [Mon, 9 Sep 2013 15:56:15 +0000 (18:56 +0300)]
Make RenderPass easier to use

11 years agoUse Renderer to bind Lighting
Mikko Rasa [Sat, 7 Sep 2013 14:12:15 +0000 (17:12 +0300)]
Use Renderer to bind Lighting

This fixes a problem where the matrix left behind by a pipeline pass could
interfere with the lighting of the next pass.  It's also required for
eventually supporting OpenGL 3.0+ without fixed-function lighting.

11 years agoAdd kerning support to Font
Mikko Rasa [Sat, 7 Sep 2013 14:09:39 +0000 (17:09 +0300)]
Add kerning support to Font

11 years agoMake the font script compatible with new ttf2png output
Mikko Rasa [Thu, 5 Sep 2013 19:22:00 +0000 (22:22 +0300)]
Make the font script compatible with new ttf2png output

11 years agoDo not store generated files in the repository
Mikko Rasa [Tue, 20 Aug 2013 15:27:43 +0000 (18:27 +0300)]
Do not store generated files in the repository

Instead generate them during the build process.  This helps with managing
any changes that might be necessary when porting to new platforms.

11 years agoAdd a StereoCombiner subclass for the Oculus Rift
Mikko Rasa [Tue, 18 Jun 2013 22:11:31 +0000 (01:11 +0300)]
Add a StereoCombiner subclass for the Oculus Rift

11 years agoField of view is an angle too
Mikko Rasa [Tue, 18 Jun 2013 21:30:18 +0000 (00:30 +0300)]
Field of view is an angle too

11 years agoAdd classes for stereographic rendering
Mikko Rasa [Tue, 18 Jun 2013 15:11:20 +0000 (18:11 +0300)]
Add classes for stereographic rendering

11 years agoSome fixes to the Build file
Mikko Rasa [Tue, 18 Jun 2013 14:52:52 +0000 (17:52 +0300)]
Some fixes to the Build file

11 years agoRender final pipeline output into the bound framebuffer
Mikko Rasa [Tue, 18 Jun 2013 14:38:29 +0000 (17:38 +0300)]
Render final pipeline output into the bound framebuffer

11 years agoFunction pointer typedefs for core functions are not available everywhere
Mikko Rasa [Sat, 15 Jun 2013 18:15:22 +0000 (21:15 +0300)]
Function pointer typedefs for core functions are not available everywhere

11 years agoAdd overloads for rotation functions that take axis as three coordinates
Mikko Rasa [Thu, 23 May 2013 20:14:27 +0000 (23:14 +0300)]
Add overloads for rotation functions that take axis as three coordinates