Commit Graph

299 Commits

Author SHA1 Message Date
Lynix 68c6aa664a Replaced OpenGL namespace with static class
Fixed OpenGL functions not being exported
It is also more consistent


Former-commit-id: 3eddcb6f72412443eb56580180d0b9544ae4a9df
2012-12-13 15:47:29 +01:00
Lynix 73fdb9baaf Added TextureWrap enum<->OpenGL association
Also made array syntax consistent


Former-commit-id: 65794e3eec2ea326da0ee71bcd7b8c31632ab71c
2012-12-13 11:39:15 +01:00
Lynix 8376fb38cf Module can now initialize optionnal classes
Former-commit-id: 899007b7879451d15d0808a03b8dfea0cd3413a4
2012-12-08 22:21:20 +01:00
Lynix eb585116b1 Shader::SendTexture can now return texture unit
Former-commit-id: 38d5e5dedf94113933bb2090040feec602a4716c
2012-12-08 11:49:07 +01:00
Lynix e699969b64 Added OpenGL support for sampler objects
Also prevented an exception launch by the SeparateShaderObjects code to
escape.


Former-commit-id: ae594e16a85c02f0c649ef573189b4b722f713c3
2012-12-04 13:50:08 +01:00
Lynix 82d6438ec3 Removed unused file
Former-commit-id: c52361f0ae454048e62507996beff70cf857210e
2012-12-03 01:34:16 +01:00
Lynix ef567bd223 Added Task Scheduler
Former-commit-id: ac37f749ae78f364db3d3edfabc8221802579989
2012-12-03 01:30:04 +01:00
Lynix 780da2cfa5 Resolved conflicts
Former-commit-id: 4bd4e4f8435d701d16d3864dd030a6c1cff48c47
2012-12-02 21:49:14 +01:00
Lynix a2eb55e74a Fixed repo
Former-commit-id: 5992da5ec759f05dabf82009e660ec58eed96365
2012-11-29 10:15:10 +01:00
Lynix 0a2e19fa22 Merge remote-tracking branch 'origin/3D-Engine'
Former-commit-id: 1781615fc780accbe6c11d55fd896038d97ffec9
2012-11-29 10:11:30 +01:00
Lynix f48b9ba370 (Material) Added methods to loads and get default
Former-commit-id: 9169e84208b0cddbe698daa9286c8b7eb6a8244c
2012-11-27 21:37:14 +01:00
Lynix 18baa6b8c1 Fixed typo
Former-commit-id: 4254892b447457b57cf9657f87ecf32a1ec899fe
2012-11-25 16:12:57 +01:00
Lynix b662bca33d Added Material class
Former-commit-id: db16249b1ecbfdc59ecdca709cb75f4bf1b6d10b
2012-11-25 14:32:19 +01:00
Lynix f1d87484a6 Fixed spaces
Former-commit-id: dde1253c93db44ba0d418c290e1e1f963b97eb0a
2012-11-24 10:15:39 +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
Jérôme Leclercq 94bb765a77 Added Shader::SendColor(Color)
Former-commit-id: e3af0e2cb75a437304ee274a6123114b41dd7d94
2012-11-08 14:25:48 +01:00
Lynix 6b9c88221a Added Shader::IsValid()
Former-commit-id: 829320e4fd92dafb829019d875135ca9b75a3db2
2012-11-02 23:47:09 +01:00
Lynix 1b3129868f Added NzRenderer::[Get/Set]LineWidth
Former-commit-id: 827f762294bb67debb2a7faed07b595df2b9d20d
2012-11-01 18:28:49 +01:00
Lynix 5c2f94f953 You can now change the point size
Former-commit-id: b0018b14973d36f822524e8e5b94ba940a63897f
2012-11-01 18:20:15 +01:00
Lynix 2831f596d2 Added missing include
Former-commit-id: c8cdcb907f85b064e5cf3a7faa23740131af9283
2012-10-29 09:56:21 +01:00
Lynix 737f2a70bd Fixed compilation error
Former-commit-id: f6be1fa1b43082fa295c7dd95337475365f0c453
2012-10-05 20:14:01 +02:00
Lynix 7bab3d9443 Cleaned code
Former-commit-id: 65b235b0c8326e060ec7032bb2a153e22518a25a
2012-10-04 09:32:55 +02:00
Lynix 8d057fb3b1 Renamed GetBPP to GetBytesPerPixel
Also added GetBitsPerPixel


Former-commit-id: 9cc1df58133c538b1dc74215a9022d13dfd9d7f6
2012-09-30 23:11:00 +02:00
Lynix a73cd1374a Normalized line ending
Former-commit-id: bd061c48bdc8f0d26159dac3b41017defef5ae1e
2012-09-21 14:24:48 +02:00
Jérôme Leclercq cd5a1b7a5e Added RenderTextures (And many others things)
-Added Forward, left and up vector (Vector3)
-Added Matrix4::ConcatenateAffine shortcut
-Added Quaternion::GetInverse() and Quaternion::Inverse()
-Added Resource listeners
-Added Depth and stencil pixel formats
-All enums now have an ending "max" entry
-Animation/Mesh::Add[Sequence/Skin/SubMesh] now returns a boolean
-Contexts are now resources
-Enhanced AnimatedMesh demo
-Fixed MD2 facing
-Fixed Vector3::CrossProduct
-Made Resource thread-safe
-Made OpenGL translation table global
-Many bugfixes
-MLT will now write malloc failure to the log
-Most of the strcpy were replaced with faster memcpy
-Occlusion queries availability is now always tested
-OpenGL-related includes now requires NAZARA_RENDERER_OPENGL to be
defined to have any effect
-Pixel formats now have a type
-Renamed RenderTarget::IsValid to IsRenderable
-Renamed Quaternion::GetNormalized() to GetNormal()
-Renamed Texture::Bind() to Prepare()
-Renamed VectorX::Make[Ceil|Floor] to Maximize/Minimize
-Removed MATH_MATRIX_COLUMN_MAJOR option (all matrices are column-major)
-Removed RENDERER_ACTIVATE_RENDERWINDOW_ON_CREATION option (Render
windows are active upon their creation)


Former-commit-id: 0d1da1e32c156a958221edf04a5315c75b354450
2012-09-20 22:07:30 +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 f8a0cdad39 Added Windows shortcut to generate CodeLite project
Changed two submesh's error message
Fixed OpenGL.hpp/.cpp spaces for some displayers
OpenGL loads GL_kdr_debug if possible instead of GL_ARB_debug_output
Refactored external includes
2012-08-10 02:03:25 +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 d851e35a56 Added NzWindow::SetCursor
Moved window flags to global scope (nzWindowStyle)
Removed NzWindow::ShowMouseCursor (superseded by SetCursor)
2012-06-23 15:02:17 +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 ddd2a2f310 Added CopyTo(Image/Texture) to NzRenderWindow
Added several methods to NzRenderer
Optimized NzRenderer::GetMax*();
Nz(Render)Window::GetSize now returns an unsigned vector
Fixed textures being flipped
2012-06-05 23:06:47 +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 dd4cb97a37 Added support for OpenGL debug mode
When NzContextParameters.debugMode is true, Nazara will receive OpenGL's
debug message and send them to Nazara's log
NzString::Pointer now have the "0x" prefix
Added support for ARB_texture_storage extension
Nazara now try to load core texture 3D before trying to load
EXT_texture3D
Added NazaraNotice macro, writing raw text into Nazara's log
Added NzContext::Destroy (called in Create)
2012-05-31 23:33:47 +02:00
Lynix f4b194f6fe Fixed rendering with OpenGL core profile
Added (automatic) support of Vertex Arrays Objects (VAO) to fix
rendering with an OpenGL core profile (OpenGL 3.2 require the use of
VAOs)
Added level check to NzImage::GetDepth/Height/Size/Width
Fixed occlussion query support not correctly setted
2012-05-31 18:18:28 +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 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 570e0a8070 Updated OpenGL header files
Moved OpenGL ext header files into GL3 directory
2012-05-22 12:10:04 +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
Lynix 8c420b48c3 Fixed compilation in debug mode 2012-05-04 16:06:18 +02:00
Lynix a215920818 It is now possible to send uniforms to shader when they are not mounted; Added shader locking 2012-05-04 08:56:35 +02:00
Lynix a4cbe46e15 Restablished core context creation, removed debug messages 2012-05-04 07:34:43 +02:00
Lynix 63a220a349 Added occlusion queries 2012-05-03 00:07:58 +02:00
Lynix 7d117ce97c Laid the basis for rendering 2012-05-02 16:45:44 +02:00
Lynix e8ef4b59da Fixed collaborator's name 2012-05-01 17:44:14 +02:00
Lynix 71b4262c51 First commit 2012-05-01 16:43:48 +02:00