Commit Graph

43 Commits

Author SHA1 Message Date
Lynix d6ff7d065e Utility/Image: Add saver (allowing to save images)
Former-commit-id: df78d657256f8a6b7dad5ab11877aae7402608b3
2016-03-08 13:11:09 +01:00
Lynix ed961f5ba8 Core: Merge InputStream and OutputStream to Stream
Remove serialization support from Stream


Former-commit-id: 7a761e4fcd07cab561f13e4709c4492ed18da88a
2015-11-20 13:52:49 +01:00
Lynix df8da275c4 Switch from Nz prefix to namespace Nz
What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
2015-09-25 19:20:05 +02:00
Lynix 03ee0a12ed Make signals arguments clearer
Former-commit-id: c329f1fc5b8d8ffcf8e38ec4e4804454b31f685f
2015-09-14 22:40:38 +02:00
Lynix 1fc17c8b53 Separate NAZARA_API into multiple defines (one per module)
To fix inter-module dependency


Former-commit-id: 64704f020e0af22e529d38527323ba977187d4d0
2015-06-13 22:31:29 +02:00
Lynix 310dcf40b1 Utility/Image: Clean memory managing
Former-commit-id: 15312493a66ea26266029a45cc3aa22cc83386eb
2015-06-13 00:45:21 +02:00
Lynix a069b105e6 Fully replace listener system by signals
Former-commit-id: 032dfddd12cc3a792c71426148c758ffac3621f9
2015-06-07 20:42:41 +02:00
Lynix 7a73314ef5 Added resource managers
Former-commit-id: 9c071230c1e325ec672c9dfe30ee7e498baa1d08
2015-01-28 20:53:40 +01:00
Lynix 53162c1722 Added a Library to most reference-counted classes
Former-commit-id: 3ed409a71dcd5ce4eec7672ac26f8fff00e3b136
2015-01-28 18:06:05 +01:00
Lynix 0db92e671d Added a static New method to RefCounted-derived classes
Former-commit-id: efd9e68e050fb6cc7e0df7a7c222ca759c502dc5
2015-01-25 23:41:09 +01:00
Lynix 5f5be93992 Merge remote-tracking branch 'origin/master' into Resource-Update
Conflicts:
	include/Nazara/Audio/Music.hpp
	include/Nazara/Audio/SoundBuffer.hpp
	include/Nazara/Core/Resource.hpp
	include/Nazara/Core/ResourceListener.hpp
	include/Nazara/Graphics/Material.hpp
	include/Nazara/Renderer/Context.hpp
	include/Nazara/Renderer/RenderBuffer.hpp
	include/Nazara/Renderer/Shader.hpp
	include/Nazara/Renderer/Texture.hpp
	include/Nazara/Renderer/UberShader.hpp
	include/Nazara/Utility/Animation.hpp
	include/Nazara/Utility/Buffer.hpp
	include/Nazara/Utility/Image.hpp
	include/Nazara/Utility/IndexBuffer.hpp
	include/Nazara/Utility/Mesh.hpp
	include/Nazara/Utility/SkeletalMesh.hpp
	include/Nazara/Utility/Skeleton.hpp
	include/Nazara/Utility/StaticMesh.hpp
	include/Nazara/Utility/SubMesh.hpp
	include/Nazara/Utility/VertexBuffer.hpp
	include/Nazara/Utility/VertexDeclaration.hpp
	src/Nazara/Core/Resource.cpp
	src/Nazara/Core/ResourceListener.cpp
	src/Nazara/Graphics/DeferredRenderQueue.cpp
	src/Nazara/Graphics/ForwardRenderQueue.cpp
	src/Nazara/Graphics/SkinningManager.cpp
	src/Nazara/Renderer/RenderTexture.cpp
	src/Nazara/Renderer/Renderer.cpp
	src/Nazara/Utility/Mesh.cpp

Former-commit-id: 99b5ad26a19fe9c9f8118da7b5920bffe89f60f8
2015-01-25 19:29:55 +01:00
Lynix ea8d683624 Updated copyright year
(532 files, wow)


Former-commit-id: cbb31f1124a86720bd3a54fe589a0f849a87b434
2015-01-21 20:53:01 +01:00
Lynix 8f9ea9db17 Added ResourceListenerWrapper
This class wraps the call to
Resource::AddResourceListener/RemoveResourceListener using RAII and help
a lot with some of the dependencies.
Thanks to this, the render queues now handle their resources listening
properly.

Former-commit-id: 7f215ffa4ccadcc4f44f777656970e92ce01087a
2015-01-18 23:59:01 +01:00
Lynix cd5399459d Made Resource copying/moving impossible
It is still possible to copy some Resource-based classes though


Former-commit-id: bbb6066f736c210015ff9fdfded7d95eb9695359
2015-01-16 16:28:38 +01:00
Lynix e3f7644831 Added class AbstractImage, inherited by Image and Texture
Former-commit-id: 16e5db4937a145ac244d6c70e4c74662622f86d9
2015-01-05 15:08:29 +01:00
Lynix b2b18a9f51 Added Image::GetSize (returning the image's dimensions)
Renamed original Image::GetSize to GetMemoryImage


Former-commit-id: a2b54f171353b8197639b5f2b3911e4b3f2a8db2
2015-01-05 13:41:56 +01:00
Lynix 0d69267992 Added Image::LoadArrayFrom* (convert an atlas to an array)
Also added Texture::LoadArrayFrom* shortcuts


Former-commit-id: f3cde12d5b634c75de8745fa800c30749e0fe662
2014-08-18 18:13:30 +02:00
Lynix e76b57e120 Fixed Image level computation
Array depth will no longer be taked in consideration when computing
level count


Former-commit-id: 93bf114127b5e252c3f8a8cbf938fcd09534a9ca
2014-08-18 17:19:09 +02:00
Lynix 9e04e8a0e4 Separated reference counting from Resources
Former-commit-id: 7380818cfee9e249c11fd15da9ff7883a6e76565
2014-07-15 00:59:02 +02:00
Lynix c096756dab Happy thousandth commit Nazara
Updated copyright year (Yay, 515 file updated)
Regenerated global headers
Fixed some typo
Improved some shaders
-Blah blah blah-

Thank you all for supporting my project !
-Lynix


Former-commit-id: e4e741b318ba4f203da5ffd265bd5e516e7ffd7d
2014-01-12 20:16:21 +01:00
Lynix fb839de33e Renamed (Oriented)Cube to (Oriented)Box
Also renamed BoundingBox to BoundingVolume


Former-commit-id: 795c70c265ba17f6b96fc30799e89f140c52852b
2013-06-03 14:18:31 +02:00
Lynix 459c7a4d07 Made use of atomic variables
In order to replace mutex-protected integer values (Performance
improvement)


Former-commit-id: d40ed2444111f00dab372f2371fe91cfd9cd2472
2013-05-03 23:12:58 +02:00
Lynix 4afe078e9d Added cubemap helpers for Image/Texture
Former-commit-id: 3c0dfb9e9b78369b8a552a55f2c70b978e626ce9
2013-04-07 02:08:08 +02:00
Lynix 8d8a47da4c Infallible Image methods no longer return a bool
Former-commit-id: 10af51caf639d010b36829bdb82afbcfc908582c
2013-04-06 17:32:55 +02:00
Lynix aa6d4c5b52 Reworked Image/Texture
Improved performances
Fixed some bugs
It is now possible to use non-contiguous buffer


Former-commit-id: 0fa7d13a740f62dae511a1549b267e2f2011d5a6
2013-04-06 13:53:45 +02:00
Lynix 6c2fb1eb89 Added ResourceRef (Automatic resource reference)
Former-commit-id: 97a0b2732f4dc443b8e1676e68b33b1b53ddf4fb
2013-03-15 03:09:58 +01:00
Lynix 32b1d02cec Updated copyright texts
Former-commit-id: 81483f7a94935c925e53b7f450e42635b1357833
2013-03-13 23:23:41 +01:00
Lynix b1da998d24 Updated Utility
Former-commit-id: 6da80ae53e6965e1fb8a74e656434f514aac8c62
2013-03-02 00:24:34 +01:00
Lynix 70ef422950 Big skeletal animation update
Added MeshInfos demo
Added MD5Mesh/MD5Anim loader support
Added Node class
Fixed ResourceParams not being exported
Added support for skeletal animation
(Animation/Mesh/Joint/SkeletalMesh/Skeleton)
Meshes are now only stored with VertexStruct_XYZ_Normal_UV_Tangent type
Moved Sequence declaration to Sequence.hpp

-Animation:
Renamed Create to Create[Keyframe|Skeletal]

-AxisAlignedBox:
Added Contains method
Added GetCorner method
Added GetCube method
Added Transform method

-Cube/Rect:
Added GetPosition method
Added GetSize method
(Almost) Fixed ExtendTo method
Fixed GetCenter method

-File:
Added GetDirectory static function
Added GetPath method
Renamed GetDirectoryPath method to GetDirectory

-Math module:
Fixed constructor/methods taking a non-const array
GetNormal/Normalize methods now takes an optionnal integer pointer
(returning length)
Made all classes default constructor trivial
Inverse, MakeIdentity, MakeZero, Normalize, Set methods now returns
reference to object

-Matrix4:
Modified methods to avoid copies
Removed COW (Too much overhead)
Removed Concatenate[Affine] static function

-Mesh:
Renamed Create to Create[Keyframe|Skeletal|Static]
Renamed Skin to Material

-MeshParams:
No longer takes declaration argument
Renamed loadAnimations to animated
Storage default to BufferStorage_Hardware if supported and
BufferStorage_Software otherwise

-OpenGL:
Added glGetBooleanv function
Added glIsEnabled function

-Quaternion:
Added ComputeW method
Added Conjugate method

-Renderer:
Added IsEnabled static function
Fixed GetLineWidth function not being static
Removed SetVertexDeclaration

-RenderWindow:
Made CopyTo[Image|Texture] method constant

-Resource
Fixed RemoveResourceListener crash

-ResourceLoader:
Loaders are now used in a LIFO context

-Stream:
Renamed GetLine method to ReadLine

-String:
Fixed Simplified

-Utility module
Added configuration define for strict resource parsing

-VertexBuffer
Now takes a VertexDeclaration pointer

-VertexDeclaration
No longer throw an error when getting a non-existing element


Former-commit-id: f7358c1231d6af48b799d2f24f077a001e16785b
2012-11-21 19:20:32 +01:00
Lynix 8d057fb3b1 Renamed GetBPP to GetBytesPerPixel
Also added GetBitsPerPixel


Former-commit-id: 9cc1df58133c538b1dc74215a9022d13dfd9d7f6
2012-09-30 23:11:00 +02:00
Lynix 15afde86c8 Rewritted ResourceLoader and moved it to core
Added creation constructor to NzImage
Added member function functor
Added option to build Nazara as one library (instead of many)
Fixed some 2011 copyrights
Made use of "using def = T" C++11 feature instead of some illigible
typedefs
Removed unused premake file
2012-08-18 01:46:01 +02:00
Lynix 5619ddb0b1 Changed all the files encoding to UTF-8
Named modules in licence informations
2012-08-10 03:21:37 +02:00
Lynix b442ab0bd2 Refactored mathematics module
Added AABBs
Added code examples
Added experimental support for texture arrays (1D/2D)
Added initialisers (new way of initialising modules)
Added global headers (Plus a global header generator script)
Added pattern support for directory
Added support for spinlocks critical section on Windows
Added NzRenderWindow::SetFramerateLimit
Core project now includes Mathematics files
Fixed color implementation using double
Fixed declaration needing renderer include
Fixed MLT not clearing nextFree(File/Line) after Free
Fixed move operators not being noexcept
Fixed thread-safety (Now working correctly - If I'm lucky)
Moved Resource to core
New interface for modules
New interface for the renderer
Put some global functions to anonymous namespace
Removed empty modules
Renamed ThreadCondition to ConditionVariable
Replaced redirect to cerr log option by duplicate to cout
Setting mouse position relative to a window will make this window ignore
the event
Shaders sending methods no longer takes the uniform variable name (it's
using ID instead)
Using new OpenGL 4.3 header
2012-08-08 04:44:17 +02:00
Lynix 06eda4eba9 Added Meshes and Animations (And many more)
Added NzTexture::IsMipmappingSupported
Color::(FromTo)HSV now takes hue and saturation in degrees
Fixed Context::EnsureContext
Fixed COW thread-safety (String, Image, Matrix4)
Fixed Quatenion<T>::operator*(const Vector3<T>&)
Fixed ResourceLoader
Fixed String::Resize with a size of 0
Fixed Texture mipmapping crash
Fixed per-class thread-safety
IndexBuffer and VertexBuffer are now resources
It is now possible to use more than 8 texcoords per shader
Moved all enumerations into separate files (Core/Enums.hpp,
Utility/Enums.hpp, ..)
Removed NzContextParameters::defaultWindow
VertexDeclaration has been rewritten (New interface/COW)
2012-07-13 15:22:14 +02:00
Lynix ec9470ceb6 Moved buffers to Utility
Fixed NzVector4::operator/
Replaced enumName_Count by enumName_Max
Renamed (Index/Vertex)Buffer::GetBufferPtr by GetPointer
2012-06-21 09:49:47 +02:00
Lynix be0a5d2819 Fixed many bugs
Added NzOpenGL::GetEntry
Activated preprocessor error if not compiling with a C++11 compliant
compiler
Cube can now be constructed with a Rect
Desactived utility option "threaded window" (bugged)
Epured Image interface (No more UpdateFace, use Update with z = the face
you are targetting)
Fixed compilation errors (Thanks to RafBill)
Fixed predefined colors not exported
Fixed uplading pixels not aligned by 4 bytes
Fixed Thumbs.db files not ignored by git
NzImage now supports Filling and Flipping (Horizontally and vertically)
NzImage::Get(Const)Pixels now support pixel location
NzVector(2/3) can now return floatting distance/length with all types
NzVector(2/3/4) can now be constructed by a vector of smaller dimension
Premake now set "-std=c++11" build option for GCC
Renamed NzImage::(Get/Set)Pixel to (Get/Set)PixelColor
Updated new([])/delete([]) in the leaks tracker to the new C++11
signatures
2012-06-15 11:03:43 +02:00
Lynix e2a38b3790 First part of render texture commit
Added NzContext::EnsureContext and NzContext::GetThreadContext
Added NzCube
Added NzRect::GetCenter
Added methods to send vectors to shaders
Added NzRenderer::SetViewport
Fixed NzRect::ExtendTo calculations
Fixed NzImage::Update checks with level > 0
No longer use glTexStorage when creating a texture to prevent a bug
NzBuffer's Lock and Unlock operations renamed to Map and Unmap
NzVector2/3/4 can now cast implicitly to a pointer
Optimized compilation time of String.hpp
Optimized normalisaton of quaternions
Optimized passing uniforms to shaders
Quaternion now automaticaly Normalize h
Removed macro definition of NAZARA_RENDERER_OPENGL from Renderer
Removed implicit cast from NzVector2/3/4 to NzString
Renamed nzBufferLock to nzBufferAccess
Renamed NzRenderTarget::CanActivate to IsValid
2012-06-13 07:40:31 +02:00
Lynix a176648265 Added NzTexture
Added levelCount parameter to NzImageParams
Added NzPixelFormat::HasAlpha
Reformatted OpenGL debug messages
2012-06-05 10:54:06 +02:00
Lynix 3720967802 Fixed compilation error from last commit
Fixed NzImage::GetWidth/Height/Depth returning 0 when level > image's
max level
2012-05-30 19:21:20 +02:00
Lynix b220e00c88 NzImage now handles mipmaps
Added NzRenderer::SetClearColor(const Color&)
Added describe comment for pixel formats
Fixed NzPixelFormat conversion for RGBA4 and RGB5A1 types
Fixed NzRenderer::Clear prototype
Renamed NzLock to NzLockGuard
ResourceLoader's loaders are now tested from newest to oldest
2012-05-30 18:10:17 +02:00
Lynix 96ea5fdaa7 Added NzImage::Get/SetPixel(Face)
NzImage::Update(const nzUInt8* pixels, const NzRectui& rect) now takes a
third argument to specify the layer of the 3D image (if a 3D image),
default to 0
Optimized NzPixelFormat conversion from RGBA4
Added NzColor
2012-05-27 11:57:34 +02:00
Lynix b243d15c74 Added formats conversion
Functor, NonCopyable, Tuple are now parts of NazaraCore (NazaraCore no
longer needs NazaraUtility)
Added loadFormat image parameter (ask loader to load image in specific
format)
Fixed utility project building
It is now possible to convert, get validity or get name of pixel formats
Changed endianness macros' name
Removed useless NazaraEndianness macro
Removed unused files
2012-05-24 18:55:48 +02:00
Lynix 9b3f4e794a Added Image
Added pixel format support
Added MemoryStream
Added Rect
Added ResourceLoader
Added generic loader (bmp, gif, hdr, jpg, jpeg, pic, png, psd, tga)
Added PCX loader
Added utility module initializer
Fixed Config.hpp include
Prerequesites.hpp now overwrites _WIN32_WINNT when defined
version is less than requiered version
Renderer's initialisation will implicitly initialize utility module
Removed RENDERER_SINGLETON option
Shaders are now resources
2012-05-21 21:54:13 +02:00