Commit Graph

41 Commits

Author SHA1 Message Date
Lynix 72a57fbf4c Fixed crash when resources in use by the Renderer are released
Former-commit-id: 98eedb556f0387f0a5c1cafde2fc74645d1d0457
2013-08-26 00:40:45 +02:00
Lynix fe6816b089 Fixed buffer corruption bugs ! (Yeah !)
Former-commit-id: 3e2c82a786810a160d324f8ccf284f8e505613a0
2013-08-23 12:52:52 +02:00
Lynix d751718a16 Added methods to retrieve shader binary
Added support for GL_ARB_get_program_binary


Former-commit-id: 3c23cfd237680f7832d15279af9e4248f9fa4678
2013-08-01 23:22:48 +02:00
Lynix 405e14d9ae Added OpenGL::GetGLSLVersion and ImageLoadStore shader extension
Former-commit-id: 97afadc93465132e6a698c5bf88e4ec070aff3db
2013-07-13 17:07:16 +02:00
Lynix 4abefc3e93 Reworked IndexBuffer, Vertex[Buffer|Declaration|Structs]
Former-commit-id: e3f637f2680afda57a444f73b8f7ad681bb1b8a5
2013-07-01 16:14:29 +02:00
Lynix 44fdb48384 OpenGL's VAOs are now used the right way
Former-commit-id: 04a944b55d7406bc6028a2d90a5550b0d5e888f0
2013-06-24 00:24:22 +02:00
Lynix 00c2e824d1 The OpenGL wrapper now handles context change
Fixed some bugs
Thanks to Raakz


Former-commit-id: f156ba7aa3307cccd83c9c02987dadad02cd8185
2013-06-21 01:28:11 +02:00
Lynix 3e8ed9b1e4 Fixed conflict between VAO and OpenGL::BindBuffer
Former-commit-id: b1182e3b0327a73431a8e81106df9109e9a80cc2
2013-06-18 02:29:31 +02:00
Lynix 7a45ff4884 Added RenderStates
Former-commit-id: c742cf2fc1cac807b9e2bcbd88c2b3d77327c106
2013-06-17 23:58:45 +02:00
Lynix cf6e2be0b0 Renamed PrimitiveType to PrimitiveMode
Also renamed RENDERER_INSTANCING_MAX to RENDERER_MAX_INSTANCES
Added RENDERER_SHADER_MAX_LIGHTCOUNT


Former-commit-id: bc26e087dd1b55c424836e6e2fa6e1dc0f17effa
2013-05-24 20:12:40 +02:00
Lynix c484bd38c9 Added OpenGL::BindTexture(unit, type, id)
+ Fixed OpenGL::DeleteTexture


Former-commit-id: 124ac3316f604e436378aed8d663f0d2b5889cd3
2013-05-11 14:04:41 +02:00
Lynix 4f3060a40d Greatly improved Renderer
Separated Viewport from Scissor rect
Improved performances
Removed Lock/Unlock system from Shader/Texture class


Former-commit-id: f54bca6de58fe9d495d9192dc0d761f92594ee86
2013-05-03 02:58:35 +02:00
Lynix 929c0db82d Added glDrawTexture (NVidia extension)
Former-commit-id: 51d43d7423adeef0f0f0c0de5c633ee3d3b6ce2a
2013-03-20 15:41:06 +01:00
Lynix 32b1d02cec Updated copyright texts
Former-commit-id: 81483f7a94935c925e53b7f450e42635b1357833
2013-03-13 23:23:41 +01:00
Lynix aa67a52e9c Added glInvalidateBufferData loading
Former-commit-id: faf3a0848548107302ab64f15808212da71d3e64
2013-03-06 22:39:39 +01:00
Lynix 3b0751fb88 Added support for Instancing
Former-commit-id: 62f5f3186423b01f7a0ac2762969dca12bea1327
2013-02-26 01:40:57 +01:00
Lynix f2271a6f87 Deleted NzOpenGL constructor/destructor
Former-commit-id: 699f03b7da155dd741a3bbb1f9f3603adfe38293
2012-12-24 18:30:27 +01:00
Lynix 8b67d17e38 Added texture samplers
I hate Git branchs


Former-commit-id: 6978f1489cdc841d36fbcd6f1a8e01a4adbfcb8a
2012-12-17 14:56:29 +01:00
Lynix 025ed1cfd0 Renderer update
-Added Renderer::GetRendererName()
-Added Renderer::GetVendorName()
-Renamed VertexArrayObject to VertexArrayObjects


Former-commit-id: 93489d5f93f8258dec0c4d8bcf72185abd7f75a8
2012-12-13 20:16:09 +01:00
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 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 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 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 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 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 570e0a8070 Updated OpenGL header files
Moved OpenGL ext header files into GL3 directory
2012-05-22 12:10:04 +02:00
Lynix 63a220a349 Added occlusion queries 2012-05-03 00:07:58 +02:00
Lynix 71b4262c51 First commit 2012-05-01 16:43:48 +02:00