2012-10-18  Ivan Vučica  <ivan@vucica.net>

	* Demo/DemoOpenGLView.m:
	Resolved a bug with animating 'buttons' via setTransform:. Verified
	correctness of a few other setTransform:-involving pieces of code
	that was marked as broken.

	* Source/CAAnimation.m:
	Fixed linearInterpolationQuaternion() to avoid returning NaN values
	in case input quaternions are the same.

	* Source/CATransform3D.m:
	In a debug piece of code, replaced GLfloat with CGFloat.

2012-10-18  Ivan Vučica  <ivan@vucica.net>

	* Demo/DemoOpenGLView.m:
	* Headers/QuartzCore/CATransaction.h:
	* Source/CATransaction.m:
	Added support for disabling actions in a transaction.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Demo/DemoOpenGLView.m:
	Disabled shadows on buttons to improve performance.

	* Demo/GradientLayer.m:
	Attempted fixing gradient painting by using a different way to
	construct a gradient in Opal. Unfortunately, it did not help.

	Fixed indentation.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Demo/TextLayer.m:
	Using Core Text the recommended way doesn't seem to work with Opal.
	For the time being, we'll paint the text via non-recommended methods
	in Core Graphics (limiting ourselves to MacRoman encoding), at least
	when on GNUstep.

	* Source/CALayer.m:
	Disabled block of code for synthesizing @dynamic properties.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Demo/DemoOpenGLView.m:
	Added title. Added 3d animation of logo. Added menu buttons.
	
	* Demo/GNUmakefile:
	* Demo/QuartzCoreDemo.xcodeproj/project.pbxproj:
	* Demo/GradientLayer.h:
	* Demo/GradientLayer.m:
	* Demo/TextLayer.h
	* Demo/TextLayer.m:
	Wrote basic gradient and text layer. Text layer uses CoreText
	for painting.

	* README.markdown:
	Noted that scaling transform does not animate correctly,  and that 
	the frame property of CALayer is unsupported.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Demo/DemoOpenGLView.h:
	* Demo/DemoOpenGLView.m:
	Added support for running under OS X, but with GNUstep implementation.

	* Headers/QuartzCore/CoreAnimation.h:
	Added missing include.

	* Source/CARenderer.m:
	Indentation fix. Moved setting transforms to correct position.
	Mistakenly, [layer transform] was not applied when offscreen-rendering,
	breaking the perspective-transformed layers - eliminating this code
	duplication by moving transform calculation fixes this problem.

	* Tests/hello_animation.m:
	Added test for perspective transform.
	
	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Demo/Mac/InfoPlist.strings:
	* Demo/Mac/MainMenu.xib:
	* Demo/QuartzCoreDemo-Info.plist:
	* Demo/QuartzCoreDemo.xcodeproj/project.pbxproj:
	Added project for building the demo under OS X.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CoreAnimation.h:
	Added a missing include.

	* README.markdown:
	Additional notes. Fixes for typos.

	* Source/CABackingStore.h:
	GL-related define.
	
	* Headers/QuartzCore/CARenderer.h:
	* Source/CARenderer.m:
	Fixed code style, some warnings and ensured that one additional
	frame is rendered in full after animations end.

	* Source/GLHelpers/CAGLTexture.m:
	Clearing of bitmap context.

	* GNUmakefile:
	* Demo/AppController.h:
	* Demo/AppController.m:
	* Demo/DemoOpenGLView.h:
	* Demo/DemoOpenGLView.m:
	* Demo/GNUmakefile:
	* Demo/GNUstep.png:
	* Demo/GNUstep.tiff:
	* Demo/QuartzCoreDemoInfo.plist:
	* Demo/main.m:
	Began work on a demo.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	GCC doesn't like that we declare a property as NSMutableArray
	in public header and then override that with a NSArray in
	class extension.

	Added missing method declaration.

	* Source/CAImplicitAnimationObserver.m:
	Making a call to -isEqual: instead of -isEqualTo:.
	Fixed a possible problem if actionForKey: returns nil or NSNull.

	* Source/CALayer+DynamicProperties.h:
	* Source/CARenderer.m:
	Added missing method declarations.

	* Source/CALayer+DynamicProperties.m:
	Style fixes.

	* Source/CALayer.m:
	* Source/GLHelpers/CAGLTexture.m:
	Resolved warnings.
	
	* Source/Shaders/simple.fsh:
	Commented out textureSize() function which broke compiling on
	some GPUs.

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* INSTALL:
	* README:
	* INSTALL.markdown:
	* README.markdown:
	Wrote documentation on requirements, installation and a mini
	tutorial on using the current GNUstep QuartzCore.

	Moved documents from (doc) to (doc).markdown and added symlinks,
	so the documents can more easily be recognized as styled using
	markdown.	

2012-08-20  Ivan Vučica  <ivan@vucica.net>

	* Source/CAAnimation.m:
	Since July 20th, -base transforms CGPoint into a NSPoint and
	CGRect into a NSRect when stored into NSValue. Added a workaround.
	
	Handling Opal sometimes serving a 3-component color. In this case,
	we set alpha to be 1.

	* Source/CABackingStore.h:
	Silenced a warning by adding (assign).

	* Source/CARenderer.m:
	Added include of glext.h along with defining GL_GLEXT_PROTOTYPES,
	so methods from extensions get defined.

	Handling Opal sometimes serving a 3-component color. In this case,
	we set alpha to be 1.

	* Source/GLHelpers/CAGLProgram.h:
	* Source/GLHelpers/CAGLShader.h:
	* Source/GLHelpers/CAGLSimpleFramebuffer.h:
	* Source/GLHelpers/CAGLTexture.h:
	Added include of glext.h along with defining GL_GLEXT_PROTOTYPES,
	so methods from extensions get defined.

	* Source/GLHelpers/CAGLShader.m:
	Silenced a clang warning by passing NULL instead of nil.

	* Source/GLHelpers/CAGLSimpleFramebuffer.m:
	Various calls to GL functions with EXT appended to the end of the
	name replaced with calls without EXT.

	* Source/GLHelpers/CAGLTexture.m:
	Fixed support for loading CGImageRefs using Opal. Fixed indentation.

	* Source/GNUmakefile:
	Added shaders to distribution.

	* Source/GNUmakefile.postamble:
	Removing correct framework.

	* Source/Shaders/blurhoriz.fsh:
	* Source/Shaders/blurvert.fsh:
	* Source/Shaders/simple.fsh:
	Added declaration which GLSL extension is required in case we use
	rectangle textures.

	* Tests/GNUmakefile:
	offscreen_render is now compiled as an app, because it comes with
	a resource (PoweredByGNUstep.tiff).

	* Tests/offscreen_render.m:
	Handling of opal's broken tiff loading. Avoiding linking with
	corebase by calling -release in place of CFRelease() under GNUstep.

2012-08-19  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CARenderer.h:
	* Source/CARenderer.m:
	Very, very elementary support for -nextFrameTime and -updateBounds.
	If backing store doesn't exist at the time when offscreen render
	is performed, it's constructed so it can store the offscreen
	render texture.

	Most important change is that if no change is scheduled	(i.e.,
	-nextFrameTime returns infinity) -updateBounds will return either
	a zero-sized rectangle with origin in (infinity,infinity), or
	whatever was manually added via -addUpdateRect:. Then, if we
	see that -updateBounds returns a rectangle with origin in
	the (infinity, infinity) point, we'll skip rendering.

	This should bring down the impact of rendering to a minimum, even
	if we cannot actually make use of -nextFrameTime. This is because
	any change to layers and animations in the layer tree cannot result
	in a notification to CARenderer's host -- there is no public API for
	that.

	* Source/CAAnimation.m:
	Fixed incorrect data type being used for a variable.

	* Source/CALayer+FrameworkPrivate.h:
	Corrected return value type for -applyAnimationsAtTime:.

	* Source/CALayer.m:
	Calculation of nextFrameTime in applyAnimationsAtTime:. Skipping
	applying an animation that did not start yet.

	* Tests/QCTestOpenGLView.h:
	* Tests/QCTestOpenGLView.m:
	Animation timer is no longer autorepeating (because there was hope
	-nextFrameTime could be leveraged to determine when next render should
	occur). Added -clearBounds: which renders a black quad in the passed
	rect. This is used to clear background behind the area that the
	renderer says updated content will be rendered into.

	* Tests/hello.m:
	Updated to schedule timer manually.

	* Tests/hello_animation.m:
	* Tests/hello_carenderer.m:
	* Tests/offscreen_render.m:
	In hello_animation and offscreen_render, ensuring that 
	-viewDidMoveToSuperview:'s initialization code runs only once (if
	in future the demo starts supporting moving the view into new
	superviews, this'll be important).

	In all demos, clearing context is done only once, at initialization,
	and any future clears are done solely by painting a black quad over the
	areas that will be updated by CARenderer.

2012-08-19  Ivan Vučica  <ivan@vucica.net>

	* Source/CALayer+FrameworkPrivate.h:
	Began work on making use of applyAnimationsAtTime: to determine the
	time for next frame.

	* Source/CALayer.m:
	Indentation fix.

	* Source/CARenderer.m:
	Minor updates to comments.

2012-08-19  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	* Source/CALayer+FrameworkPrivate.h:
	* Source/CALayer.m:
	Removed unused ivar for offscreen framebuffer. Removed now unused
	opalContext -- management of context has been moved to the backing
	store.
	Added backingStore as a standalone ivar, so we can handle contents
	containing images instead of being dynamically painted.

	Moved createCGBitmapContext() to backing store.
	
	Coding style fixes.

	* Source/CABackingStore.h:
	* Source/CABackingStore.m:
	Backing store now manages its own context instead of being passed
	layer's context.

	* Source/CARenderer.m:
	In several places, removed check whether layer contents is a backing
	store, replacing use of contents property with backingStore property
	which is supposed to always contain a backing store (or nil).

	* Source/GLHelpers/CAGLTexture.h:
	* Source/GLHelpers/CAGLTexture.m:
	Added loading of CGImageRef into a texture.

	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	* Tests/offscreen_render.m:
	* Tests/PoweredByGNUstep.tiff:
	Added test of image painting. PoweredByGNUstep.tiff is taken from
	GNUstep core.

2012-08-18  Ivan Vučica  <ivan@vucica.net>

	* Source/CARenderer.m:
	Added a missing unbind for a framebuffer.

	* Source/GLHelpers/CAGLSimpleFramebuffer.m:
	Added the concept of a framebuffer stack, in order to make sure that
	when we're done using a framebuffer, we restore the previous
	framebuffer to the active state. This is important during offscreen
	rendering, since during shadow rendering we switch away from the
	framebuffer intended for offscreen rendering. As a result, shadowed
	sublayers and all sublayers after them ended up being rendered
	on-screen instead of the offscreen framebuffer.

	* Source/GLHelpers/CAGLTexture.m:
	Fixed non-power-of-two textures by forcing GL_NEAREST filter.
	
	* Tests/hello_carenderer.m:
	Fixed building of the demo under Cocoa.

	* Tests/main.m:
	Increased demo window size to 800x600.

	* Tests/offscreen_render.m:
	Released colors in a few more places. Added animation tests for
	anchor point. Added additional layers and moved layers to new
	positions.

2012-08-15  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CATransaction.h:
	* Source/CARenderer.m:
	* Source/CATransaction+FrameworkPrivate.h:
	* Source/CATransaction.m:
	Hacked around the lack of CFRunLoopObservers in GNUstep by
	creating an implicit transaction on-demand, and committing it
	in +[CARenderer beginFrame...].

	Fixed a crash caused by transaction not retaining the 
	animationTimingFunction instantiated in -init.

	* Tests/hello_animation.m:
	* Tests/offscreen_render.m:
	Removed hacks creating implicit transactions manually in demo
	code.

2012-08-15  Ivan Vučica  <ivan@vucica.net>

	* Source/CARenderer.m:
	Shadow rendering can now accept non-rectangular textures.
	For example, 2d textures or non-power-of-two 2d textures.

	Added support for passing shadow color onward into the shadow
	shader.

	* Source/GLHelpers/CAGLTexture.m:
	Added support for non-power-of-two 2d textures (although it
	doesn't seem to work). Switched to gluBuild2DMipmaps()-built
	2d textures. Fixed a bug with attempting to load a dummy
	texture for use with FBO failing due to gluBuild2DMipmaps()
	not handling NULL as the last argument correctly.

	* Source/Shaders/blurhoriz.fsh:
	* Source/Shaders/blurvert.fsh:
	Fixed an incorrect value which resulted in sum not adding up to
	1.0 but to 0.98. Added support for shadow color. Switched to
	2d textures.

	* Source/Shaders/simple.fsh:
	Switched to 2d textures.
	
	* Tests/offscreen_render.m:
	Test of switching of shadow color.

2012-08-12  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Source/Shaders/blurbase.vsh:
	* Source/Shaders/blurhoriz.fsh:
	* Source/Shaders/blurvert.fsh:
	* Headers/QuartzCore/CARenderer.h:
	New shaders for blurring horizontally and vertically.

	* Headers/QuartzCore/CALayer.h:
	Added shadow-related properties. Explicitly defined 'assign'
	properties.

	* Source/CAAnimation.m:
	Support for animating CGColorRef.

	* Source/CALayer.m:
	Added shadow-related properties. Added handling for Core Graphics
	types, which apparently do not produce KVC-compliant setters
	and getters under Cocoa.

	* Source/CARenderer.m:
	Better setting and restoring of GL defaults. Separated rasterization
	of all layers into a separate method. Rasterization is now performed
	as part of -render, and not during the update. Rasterization is also
	performed in case a layer has a shadowOpacity > 0.0. 

	Semi-complete shadow rendering. Currently, we just paint a quad that
	is poorly-blurred, without actually applying color, and also without
	making use of shadowOpacity and shadowColor.

	It's also somewhat buggy: we get strange offsets in case a layer has
	a shadow and is also being rasterized as part of another layer.

	* Source/GLHelpers/CAGLProgram.m:
	Error checking for invalid uniform location.

	* Source/GLHelpers/CAGLTexture.h:
	Texture width and height are now GLint, to avoid "minus-width"
	unexpectedly resulting in a large unsigned integer.

	* Source/GLHelpers/CAGLTexture.m:
	Added debug method for writing a texture into a PNG.

	* Source/Shaders/simple.fsh:
	Switched to variant of shader without a side effect.

	* Tests/hello_animation.m:
	* Tests/hello_carenderer.m:
	Properly releasing colors.
	
	* Tests/offscreen_render.m:
	Added a layer with shadow. Added test of background color animation.
	Proper release of colors.

2012-08-11  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	Apart from adding files for shaders, also turned on additional
	warnings.

	* Source/GLHelpers/CAGLProgram.h:
	* Source/GLHelpers/CAGLProgram.m:
	* Source/GLHelpers/CAGLShader.h:
	* Source/GLHelpers/CAGLShader.m:
	Wrote wrappers around OpenGL shader objects and OpenGL program
	objects.
	
	* Source/Shaders/simple.fsh:
	* Source/Shaders/simple.vsh:
	Simple, almost-passthrough vertex+fragment shader. For testing
	purposes, fragment shader is flipping the input texture.

	* Source/GLHelpers/CAGLTexture.m:
	Removed incorrect comment.

	* Source/CALayer.m:
	Moved CGColorSpaceRelease() based on clang analyzer warning.
	
	* Headers/QuartzCore/CARenderer.h:
	* Source/CARenderer.m:
	Made use of shaders; for testing purposes, every layer that
	requested -shouldRasterize is being rendered using a shader.

	Removed an extraneous glPopMatrix().

	* Source/CATransaction.m:
	Released newTransaction based on warning from clang analyzer.

2012-08-06  Ivan Vučica  <ivan@vucica.net>

	* Source/CALayer+DynamicProperties.m:
	Fixed a compile problem.

	* Source/CALayer.m:
	No longer crashing in case there is a problem fetching attributes
	of a property during +initialize. Fixed indentation.

2012-08-05  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	Added UsingGNUstepImpl target to framework project, too, so its
	setting for disabling code optimization is respected.

	* Headers/QuartzCore/CAAnimation.h:
	* Headers/QuartzCore/CATransaction.h:
	Added TODO notes for value functions in animations and for
	setValue:forKey: in transactions.
	
	* Source/CAAnimation.m:
	Implemented -dealloc methods. Some changes supporting changes
	in other places.

	* Source/CALayer.m:
	Duration is now read from transaction in addAnimation:forKey:.
	fromValue is also set there in case it wasn't already set.

	* Source/CATransaction.m:
	Timing function and duration are applied to actions that support
	them when the actions are committed.

	* Tests/hello_animation.m:
	Tests for custom animations. Transaction wrapers for GNUstep
	implementation are added even to methods with explicit animation
	tests, so side effects from applying default values can be tested.

2012-08-05  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	Added 'actions' and 'style' properties. 'style' is currently only
	a stub.
	
	* Headers/QuartzCore/CATransaction.h:
	* Source/CAImplicitAnimationObserver.m:
	* Source/CATransaction+FrameworkPrivate.h:
	* Source/CATransaction.m:
	Switched to actions-based implementation of implicit animations.

	* Source/CAAnimation.m:
	Added implementations of NSCopying methods. Added support for
	toValue == nil. Removed some dead code.
	
	* Source/CALayer.m:
	Added support for action-based implementation of implicit animations.

	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	Optimization settings moved from target level to project level.

	* Tests/offscreen_render.m:
	Small code style change.

2012-08-05  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Source/CALayer.m:
	* Source/CALayer+DynamicProperties.h:
	* Source/CALayer+DynamicProperties.m:
	Incomplete work on dynamic property synthesis at runtime. Properties
	are examined, finding if they are supposed to be synthesized at
	runtime. Accessor names are taken into account.

	However, properties don't yet actually get synthesized nor stored.

2012-08-05  Ivan Vučica  <ivan@vucica.net>

	* Tests/CAMediaTimingFunction/Makefile.gs.mac:
	Fixed a compiling error.

	* Tests/CAMediaTimingFunction/camediatimingfunction.m:
	Increased tolerance for error, so the value of linear function at
	x=0.67 passes. Our implementation seems to get less error than under
	Cocoa, so let's tolerate our more correct number. (We get y=0.67.)

2012-08-05  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	Automatic changes to project, caused by addition of offscreen_render
	test.

	* Headers/QuartzCore/CAMediaTimingFunction.h:
	* Source/CAMediaTimingFunction.m:
	Removed graph debug function. Added getControlPointAtIndex:values:.

	* Tests/CATransform3D/catransform3d.m:
	Small change to header.
	
	* Tests/CAMediaTimingFunction/GNUmakefile:
	* Tests/CAMediaTimingFunction/Makefile.gs.mac:
	* Tests/CAMediaTimingFunction/Makefile.mac:
	* Tests/CAMediaTimingFunction/camediatimingfunction.m:
	* Tests/CAMediaTimingFunction/run_tests.sh:
	Added media timing tests.

2012-08-02  Ivan Vučica  <ivan@vucica.net>

	* Source/CARenderer.m:
	Fixed a compile problem under GNUstep.

2012-07-29  Ivan Vučica  <ivan@vucica.net>

	* Source/CABackingStore.h:
	* Source/CABackingStore.m:
	Added _offscreenRenderTexture, for storing the texture of a render
	of a layer that's performed offscreen. Renamed _texture into
	_contentsTexture.

	* Source/CARenderer.m:
	Added offscreen rendering. Currently renders only into 512x512
	texture, since we need to figure out the actual required dimenstions.
	This needs to be done using currently-unimplemented 'frame' property
	and transformations from individual layer's coordinate system to
	the layer that needs to be rasterized, figuring out coordinates of
	individual sides of the rectangle (left, top, bottom, right) and
	getting the required size of the rendering texture.

	* Source/GLHelpers/CAGLSimpleFramebuffer.h:
	Added -bind and -unbind methods to the header.

	* Source/GLHelpers/CAGLSimpleFramebuffer.m:
	Corrected bugs with creation of framebuffers: nVidia cards seem to
	require setting of several parameters for textures before framebuffers
	work, and the code did not refer to texture's textureTarget, instead
	always referring to GL_TEXTURE_2D.

	Cleaned up a massive memory leak concerning depth buffer's
	renderbuffer storage not getting cleaned up.

	Fixed a bug with depth buffer's renderbuffer storage never getting
	created.

	* Source/GLHelpers/CAGLTexture.m:
	Fixed a memory leak with the GL texture never getting deleted.

	* Tests/GNUmakefile:
	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	* Tests/offscreen_render-Info.plist:
	* Tests/offscreen_render.m:
	Added a new example specialized in testing offscreen rendering.

2012-07-23  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	* Source/CALayer.m:
	Added shouldRasterize property.
	
	* Headers/QuartzCore/CARenderer.h:
	* Source/CARenderer.m:
	Added code for determining if a layer needs to be rasterized,
	scheduling rasterization, and going through the schedule. Actual
	rasterization code is still to be written.

	Memory leak cleanup.

2012-07-22  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	Added _offscreenFramebuffer ivar in preparation for adding
	offscreen rendering.

	* Source/CAAnimation.m:
	Added NSCoding functions.

	* Source/CABackingStore.h:
	* Source/CABackingStore.m:
	Using Apple's client storage extension while under Cocoa, to
	avoid memory copy. Alternatives probably exist for other platforms,
	too, and need to be explored.
	
	* Source/CALayer.m:
	Added support for contentsRect. Added code section markers.

	* Source/CARenderer.m:
	Added support for contentsRect. Added support for rectangular
	textures.
	

	* Source/GLHelpers/CAGLTexture.m:
	Rectangular textures. Small OS X-specific optimizations that may
	be applicable elsewhere too.

2012-07-22  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	* Source/CALayer.m:
	Animations must be applied in exact order, so we no longer use
	the [_animations allKeys] to supply our need for animation keys
	list. Now we maintain a NSArray, in order to preserve order in
	which animations were added using -addAnimation:forKey:.

	In -display:, upon update of contents, we update contents of
	backing store's texture.
	
	* Source/CARenderer.m:
	Refreshing is no longer done in each frame; instead, it's done
	in -display: in CALayer, meaning less traffic between main system
	and GPU.

	* Source/CATransation.m:
	Reference implementation does not prefix implicitly created
	animations' keys, so we no longer do that either.

	* Source/CAImplicitAnimationObserver.m:
	No animation should be implicitly generated if model tree value
	for a given keypath is the same as the new value, even if it visually
	makes sense.

2012-07-22  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Source/GLHelpers/CAGLSimpleFramebuffer.h:
	* Source/GLHelpers/CAGLSimpleFramebuffer.m:
	* Source/GLHelpers/CAGLTexture.h:
	* Source/GLHelpers/CAGLTexture.m:
	* Source/GNUmakefile:
	Added new wrappers for OpenGL objects: textures and framebuffers.

	This allows proper retaining of texture and framebuffer objects on
	Objecitve-C level. It'll also be useful in working with OpenGL
	features at slightly higher level, or at least via Objective-C
	syntax. At the very least, we'll also have wrappers for various
	shader objects (vertex and fragment programs, as well as linked
	programs).

	Current framebuffer class is intended for simple use of framebuffers
	in render-to-texture scenarios, but intentionally does not expose
	majority of what framebuffers can do.
	
	Modification to GNUmakefile in this commit is untested.

	* Headers/QuartzCore/CAMediaTimingFunction.h:
	Changed type of _coefficients[] to match how we use them.

	* Source/CABackingStore.h:
	* Source/CABackingStore.m:
	Making use of CAGLTexture. Style fixes.

	* Source/CARenderer.m:
	Switched to use of CAGLTexture in backing store. Transferred some
	responsibility to CABackingStore, making it easier to, in the future,
	cache texture contents instead of refilling it in GPU with layer
	contents in every frame.

2012-07-19  Ivan Vučica  <ivan@vucica.net>
	
	* Source/CAMediaTimingFunction+FrameworkPrivate.h:
	* Source/CAMediaTimingFunction.m:
	Replaced Bezier-math-related Objective-C methods with C functions.

2012-07-19  Ivan Vučica  <ivan@vucica.net>

	* Source/CALayer.m:
	Opal context is cleared under GNUstep since it isn't served
	already cleared - a bug in Opal.

	To support KVO under GNUstep, we need custom setters for
	struct types of properties. This has been added as a macro
	GSCA_OBSERVABLE_SETTER() which 'synthesizes' such KVO-compliant
	setters. This shouldn't be needed and fixes a bug in gnustep-base.

	* Headers/QuartzCore/CALayer.h:
	To support KVO, we need to generate custom setters as described
	above. To be able to do so, under GNUstep we need nonatomic
	properties. Under Cocoa, we can leave the properties as atomic.

	* Headers/QuartzCore/QuartzCore.h:
	Cosmetic change: deletion of an empty line.

	* Source/CATransaction.m:
	Reordered includes since BOOL didn't get defined without
	inclusion of Foundation/Foundation.h

	* Source/CARenderer.m:
	Removed enabling GL_ALPHA_TEST incorrectly.

	* Tests/hello_animation.m:
	Added test for implicit animation of non-struct type, i.e.
	opacity.

2012-07-15  Ivan Vučica  <ivan@vucica.net>
	
	* Source/CAAnimation.m:
	Making use of media timing functions.

	* Source/CAMediaTimingFunction+FrameworkPrivate.h:
	Added methods for calculating derivations, parameter,
	parameter via Newton-Raphson, and finally, 'y' using
	'x'.

	* Source/CAMediaTimingFunction.m:
	Fixed a misspelling in calculating coefficients that
	used 'x' instead of 'y' when calculating coefficients
	for 'y'. Added calculation of derivation from 'y', for
	completeness sake. Added calculation of 't' parameter
	via Newton-Raphson from 'x'. Added calculation of 'y'
	from 'x' by first calculating 't'. Added small debug
	function for graphing the media timing func into stdout.

	* Tests/hello_animation.m:
	In animation4, we now test timing functions on explicit
	animations that repeat and autoreverse.
	
2012-07-12  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Source/CAMediaTimingFunction+FrameworkPrivate.h:
	Added framework-private category for CAMediaTimingFunction.

	* Headers/QuartzCore/CAMediaTimingFunction.h:
	* Source/CAMediaTimingFunction.m:
	Added initialization methods. Added basic calculation of
	coordinates of cubic Bezier curve, based on parametric form
	of the equation. Still not calculating exact value since we
	need to take "x" as input, solve it into the parameter, and
	then use this to feed the parametric form of equation, with
	"y" as the result. This is not done yet.

2012-07-09  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CATransaction.h:
	* Source/CATransaction.m:
	* Source/CATransaction+FrameworkPrivate.h:
	* Source/CAImplicitAnimationObserver.m:
	Added support for implicit animations. Implicit animation
	observer class gets notified by KVO that a value has changed.
	It then registers animations into the transaction that is on
	top of the transaction stack. Once these animations are
	registered, they are actually processed and added to objects
	only when the transaction they belong to is committed. 

	* Source/CAAnimation.m:
	Added support for interpolating CGRect and transforming NSRect
	into CGRect. Removed dead code in interpolation of CATransform3D.
	Gracefully handling of interpolated value that's nil by simply
	not applying it. Temporarily handling activeTime that's less
	than 0 by setting it to 0; in fact, it should never come to
	this situation.
	
	* GSQuartzCore.xcodeproj/project.pbxproj:
	Added implicit animation observer to the project.
	Added header for framework-private methods for CATransaction to 
	the project.

	* Headers/QuartzCore/AppleSupport.h:
	* Headers/QuartzCore/AppleSupportRevert.h:
	Added implicit animation observer and default media timing
	function string constant.

	* Headers/QuartzCore/CAMediaTimingFunction.h:
	* Source/CAMediaTimingFunction.m:
	Added default media timing function string constant. Made
	use of extern and actually defined values for the constants.

	* Mac/GSQuartzCore-Prefix.pch:
	Added <Foundation/Foundation.h> since it's used in 
	QuartzCore/QuartzCore.h (e.g. BOOL).

	* Source/CALayer+FrameworkPrivate.h:
	* Source/CALayer.m:
	Moved -isPresentationLayer from private to framework-private
	methods. 
	
	* Tests/hello_animation.m:
	Temporarily added manual creation of implicit transaction.

2012-07-08  Ivan Vučica  <ivan@vucica.net>
	
	* Source/CALayer.m:
	Support for +defaultValueForKey:.

	* Headers/QuartzCore/CALayer.h:
	* Source/CALayer.m:
	* Source/CAImplicitAnimationObserver.h:
	* Source/CAImplicitAnimationObserver.m:
	Initial work on using KVO to support implicit animations.

2012-07-08  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/AppleSupport.h:
	* Headers/QuartzCore/AppleSupportRevert.h:
	Added a bit of documentation on purpose of these files.
	Moved CAAction into a separate file.
		
	* Headers/QuartzCore/CAAction.h:
	* Source/GNUmakefile:
	Moved CAAction into a separate file.

	* Headers/QuartzCore/CAAnimation.h:
	Added specification about which protocols CAAnimation should
	implement. Removed dead code.
	
	* Headers/QuartzCore/CABase.h:
	Removed inclusion of Foundation/Foundation.h.

	* Headers/QuartzCore/CALayer.h:
	Moved CAAction into a separate file. Split up the informal protocols
	for the layer delegate and the layout manager.

	* Source/CAAnimation.m:
	* Source/CALayer.m:
	* Source/CAMediaTiming.m:
	Added inclusion of Foundation/Foundation.h

2012-07-08  Ivan Vučica  <ivan@vucica.net>
	
	* Source/CALayer+FrameworkPrivate.h:
	* Source/CAAnimation+FrameworkPrivate.h:
	* Source/CALayer.m
	* Source/GNUmakefile:
	* Tests/GNUmakefile:
	Changes from Fred Kiefer to fix compiling with GCC under GNUstep.
	Some additional small fixes.

2012-07-01  Ivan Vučica  <ivan@vucica.net>

	* Source/CAAnimation.m:
	Slerp for interpolating quaternions gained from decomposing of
	transform matrix. This works in at least elementary case added
	into hello_animation.

	* Source/CALayer.m:
	Opacity set to 1.0 by default.

	* Source/CARenderer.m:
	Support for opacity when rendering.

	* Tests/hello_animation.m:
	Improved test involving transform interpolation, and added opacity
	pulse animation to the same test. This test now also translates
	in addition to rotating.


2012-07-01  Ivan Vučica  <ivan@vucica.net>

	* Source/CAAnimation.m:
	Linear interpolation moved into separate function. Added functions
	for conversion between rotation matrices and quaternions. 

	Work on interpolating CATransform3D values. Matrix is decomposed into
	translation, scale and rotation components, and each is interpolated
	separately. Rotation is interpolated by conversion into quaternion
	and then interpolating quaternion's components.

	Unfortunately, some part of the process (possibly the entire concept)
	still doesn't work.

	* Tests/hello_animation.m:
	Added a test for CATransform3D which involves rotation.

2012-07-01  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/AppleSupport.h:
	* Headers/QuartzCore/AppleSupportRevert.h:
	* Headers/QuartzCore/CATransform3D.h:
	* Source/CATransform3D.m:
	Added CATransform3DInvert(). Added CATransform3D category on
	NSValue.

	* Tests/CATransform3D/catransform3d.m:
	* Tests/CATransform3D/Makefile.gs.mac:
	Added some tests for CATransform3DInvert().

2012-07-01  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Headers/QuartzCore/CAAnimation.h:
	* Headers/QuartzCore/CALayer.h:
	* Source/CAAnimation+FrameworkPrivate.h:
	* Source/CALayer+FrameworkPrivate.h:
	* Source/CAAnimation.m:
	* Source/CARenderer.m:
	Moved framework-private method declarations into separate headers.

	* Source/CALayer.m:
	Content now preserved upon resize. Context created when required
	and in appropriate place: -[CALayer display].
	Moved framework-private method declarations into separate headers.

	* Tests/hello_animation.m:
	Test code for bounds resize.

2012-07-01  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	Replaced references to NSLayoutManager with id.

	* Source/CAAnimation.m:
	* Source/CABackingStore.m:
	* Source/CARenderer.m:
	* Source/CATransaction.m:
	* Source/CATransform3D.m:
	* Tests/QCTestOpenGLView.m:
	* Tests/hello_animation.m:
	Code style corrections.

	* Source/CALayer.m:
	Code style corrections. Now we always let Core Graphics allocate
	date for the bitmap context.

2012-06-25  Ivan Vučica  <ivan@vucica.net>

	* Tests/GLES/GLESContext.h:
	* Tests/GLES/GLESContext.m:
	Experimental GLESContext class which uses EGL and a small bit
	of misuse of a class in -back in order to provide an OpenGL ES
	context. Once finished, probably needs to find a home elsewhere
	and not in QuartzCore tests.

	In the future, it can provide an ES context for AppKit, an ES
	context for UIKit, and an ES context for CAEAGLLayer.

	Class temporarily includes a definition for gluBuild2DMipmaps()
	which is missing in ES, but is currently referenced to in a
	few places.

	* Tests/GNUmakefile:
	Added commented-out lines that enable compiling for OpenGL ES.

	* Tests/hello.m:
	Example adapted for ES by switching away from glBegin()/glEnd().

	* Tests/QCTestOpenGLView.h:
	* Tests/QCTestOpenGLView.m:
	Added a compile time option which makes this view inherit from
	NSView, but implement equivalent methods for using GLESContext
	in place of a regular NSOpenGLContext.

2012-06-25  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	* Source/CALayer.m:
	* Source/CARenderer.m:
	* Tests/CATransform3D/GNUmakefile:
	* Tests/GNUmakefile:
	Removed direct uses of Cairo, as well as related Opal hacks.

2012-06-24  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CAAnimation.h:
	* Source/CALayer.m:
	* Tests/hello_opal.m:
	Fixed compiling.

	* Source/CAAnimation.m:
	Autoreverses now defaults to correct value of 'NO'. Fixed 
	compiling.
	
	* Tests/hello_animation.m:
	Fixed label on 'Tests' menu under GNUstep.

	* Tests/main.m:
	Added main menu under GNUstep, so that hello_animation test
	gets its menu.

2012-06-24  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CALayer.h:
	Added sublayerTransform property.

	* Source/CAAnimation.m:
	Added default value for repeatCount property.

	* Source/CALayer.m:
	Added sublayerTransform property and support for animation's
	repeatCount property (preventing removal if animation is
	repeating). Property 'autoreverses' doubles the time needed
	for the animation.

	* Source/CARenderer.m:
	Added support for sublayers.

	* Tests/hello_animation.m:
	Testing of the sublayerTransform property. Changed some
	positions and angles to make things more visible.

2012-06-24  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CAAnimation.h:
	* Headers/QuartzCore/CAMediaTiming.h:
	* Source/CAAnimation.m:
	* Source/CALayer.m:
	* Source/CARenderer.m:
	* Tests/hello_animation.m:
	Rework of timing model, introducing frame begin time, and
	approximating behavior when frame begin time doesn't match
	CACurrentMediaTime(). It's not highly important to match
	it exactly, as it doesn't seem like it should be used with
	Cocoa implementation either (if one passes, e.g.,
	CACurrentMediaTime()-1, animations are delayed, but time
	conversion methods are unaffected).
	
	Some methods have been moved to CAMediaTiming protocol which
	ordinarily don't belong there.

	Time conversion functions, for converting between layers,
	have been implemented.

	* Headers/QuartzCore/CALayer.h:
	Added some private methods for traversing the layer tree.

2012-06-23  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Headers/QuartzCore/AppleSupport.h:
	* Headers/QuartzCore/AppleSupportRevert.h:
	* Source/CAMediaTiming.m:
	Added CAMediaTiming.m, containing definitions for fillmode
	constants. Under Cocoa, turned on building of 32-bit code,
	in order to approach feature-set of older GNU runtimes and
	compilers, making writing non-portable code easier to spot.

	* Headers/QuartzCore/CAAnimation.h:
	* Headers/QuartzCore/CALayer.h:
	* Headers/QuartzCore/CAMediaTiming.h:
	* Headers/QuartzCore/CARenderer.h:
	* Source/CAAnimation.m:
	* Source/CALayer.m:
	* Source/CARenderer.m:
	Added support for presentation layers and animations.
	Added some missing -dealloc methods. Corrected CAMediaTiming
	protocol by adding missing properties.

	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	Under Cocoa, turned on building of 32-bit code, in order
	to approach feature-set of older GNU runtimes and compilers,
	making writing non-portable code easier to spot.

	* Tests/hello_animation.m:
	Added testing of sublayers. Some code for figuring out
	correct behavior of time conversion. Some new animation
	tests.

	* Source/CABackingStore.m:
	Added implementation of -dealloc.
	
	* Source/CABase.m:
	Added mach-based implementation of CACurrentMediaTime() in
	order to get the same results as under Cocoa. Regular UNIX
	implementation still used under non-Mach platforms.
	
	* Source/CAValueFunction.m:
	* Headers/QuartzCore/CAValueFunction.h:
	Added stub of CAValueFunction class.

2012-06-22  Ivan Vučica  <ivan@vucica.net>

	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	* Tests/hello_animation-Info.plist:
	* Tests/hello_animation.m:
	* Tests/GNUmakefile:
	Added a new test, hello_animation, demonstrating and testing 
	use of animations.
	
	* Headers/QuartzCore/CALayer.h:
	* Source/CALayer.m:
	Added support for presentation and model layers. Began adding
	animation functions.

2012-06-22  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Source/CABackingStore.h:
	* Source/CABackingStore.m:
	* Headers/QuartzCore/AppleSupport.h:
	* Headers/QuartzCore/AppleSupportRevert.h:
	* Source/CALayer.m:
	* Source/GNUmakefile:
	Added CABackingStore as a wrapper around CGContextRef. Although
	apparently toll-free bridged under Cocoa just as under Opal, this
	eliminates a compiler warning when setting a context as contents
	of a layer.

	* Source/CARenderer.m:
	GSQuartzCore under Cocoa can now display contents of a layer.

2012-06-22  Ivan Vučica  <ivan@vucica.net>

	* GSQuartzCore.xcodeproj/project.pbxproj:
	* Headers/QuartzCore/AppleSupport.h:
	* Headers/QuartzCore/AppleSupportRevert.h:
	* Mac/GSQuartzCore-Info.plist:
	* Mac/GSQuartzCore-Prefix.pch:
	* Mac/en.lproj/InfoPlist.strings:
	Added a hack for getting GNUstep's QuartzCore to run under Cocoa
	without conflicting with Cocoa's implementation. Important for
	quickly comparing differences between implementations.

	* Headers/QuartzCore/CAAnimation.h:
	* Headers/QuartzCore/CABase.h:
	* Headers/QuartzCore/CALayer.h:
	* Headers/QuartzCore/CAMediaTiming.h:
	* Headers/QuartzCore/CARenderer.h:
	* Headers/QuartzCore/CATransform3D.h:
	* Headers/QuartzCore/CoreAnimation.h:
	* Headers/QuartzCore/QuartzCore.h:
	* Source/CAAnimation.m:
	* Source/CALayer.m:
	* Source/CATransaction.m:
	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	* Tests/QCTestOpenGLView.h:
	* Tests/hello.m:
	* Tests/hello_carenderer.m:
	* Tests/main.m:
	Reworked a lot of dependencies to support the GSQuartzCore hack.
	Tests can now run using GSQuartzCore under Cocoa, too. GSQuartzCore
	running under Cocoa currently doesn't read the bitmap data from
	CGContextRef, so layers are empty.

	* Source/CARenderer.m:
	Fixed an incorrect presumption that CGFloat is the same as
	GLfloat.

2012-06-18  Ivan Vučica  <ivan@vucica.net>

	* Headers/QuartzCore/CATransaction.h:
	* Source/CATransaction.m:
	Began implementing transactions. This will allow work on animations.

2012-06-18  Ivan Vučica  <ivan@vucica.net>

	* Source/CATransform3D.m:
	Fix of bugs detected by tests: identity matrix was not correctly
	identified, matrix multiplication arguments were not given in correct
	order, rotation matrix was not correctly constructed.
	Fixed order of transform operations when rendering.

	* Tests/CATransform3D/Makefile.mac:
	Renamed previous file which is used for testing on OS X.

	* Tests/Testing.h:
	* Tests/CATransform3D/GNUmakefile:
	* Tests/CATransform3D/run_tests.sh:
	Added support for running the tests under GNUstep.
	
	* .hgignore:
	Added to facilitate easier use with HgSubversion.

2012-06-16  Ivan Vučica  <ivan@vucica.net>

	* Tests/CATransform3D/GNUmakefile:
	* Tests/CATransform3D/TestInfo:
	* Tests/CATransform3D/catransform3d.m:
	* Tests/Testing.h:
	Added some basic tests for CATransform3D.

2012-06-15  Ivan Vučica  <ivan@vucica.net>

	* Tests/hello.m:
	* Tests/hello_carenderer.m:
	Added glFlush() before swapping buffers via -[NSOpenGLContext
	flushBuffer], fixing OS X.

2012-06-13  Ivan Vučica  <ivan@vucica.net>

	* Tests/GNUstepQuartzCoreTests.xcodeproj/project.pbxproj:
	* Tests/data/MainMenu.xib:
	* Tests/data/hello_carenderer-Info.plist:
	* Tests/hello-Info.plist:
	Xcode project for building Cocoa versions of the demos.

	* Tests/QCTestOpenGLView.m:
	* Tests/hello.m:
	* Tests/hello_carenderer.m:
	Patches for the demos to get them as close to running as
	possible. They're still not rendering anything into the OpenGL
	context, though.

