diff --git a/.idea/libraries/lwjgl.xml b/.idea/libraries/lwjgl.xml new file mode 100644 index 0000000..f4accbb --- /dev/null +++ b/.idea/libraries/lwjgl.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lwjgl/build.txt b/lwjgl/build.txt new file mode 100755 index 0000000..8f18054 --- /dev/null +++ b/lwjgl/build.txt @@ -0,0 +1 @@ +LWJGL 3.0.0b build 64 \ No newline at end of file diff --git a/lwjgl/doc/3rdparty/glfw_license.txt b/lwjgl/doc/3rdparty/glfw_license.txt new file mode 100755 index 0000000..8a60e1d --- /dev/null +++ b/lwjgl/doc/3rdparty/glfw_license.txt @@ -0,0 +1,21 @@ +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2010 Camilla Berglund + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. diff --git a/lwjgl/doc/3rdparty/jemalloc_license.txt b/lwjgl/doc/3rdparty/jemalloc_license.txt new file mode 100755 index 0000000..bda397d --- /dev/null +++ b/lwjgl/doc/3rdparty/jemalloc_license.txt @@ -0,0 +1,23 @@ +Copyright (C) 2002-2014 Jason Evans . +All rights reserved. +Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. +Copyright (C) 2009-2014 Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice(s), + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice(s), + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/lwjgl/doc/3rdparty/khronos_license.txt b/lwjgl/doc/3rdparty/khronos_license.txt new file mode 100755 index 0000000..d7e6e9d --- /dev/null +++ b/lwjgl/doc/3rdparty/khronos_license.txt @@ -0,0 +1,22 @@ +/* +** Copyright (c) 2013-2014 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ \ No newline at end of file diff --git a/lwjgl/doc/3rdparty/libffi_license.txt b/lwjgl/doc/3rdparty/libffi_license.txt new file mode 100755 index 0000000..a66fab4 --- /dev/null +++ b/lwjgl/doc/3rdparty/libffi_license.txt @@ -0,0 +1,21 @@ +libffi - Copyright (c) 1996-2014 Anthony Green, Red Hat, Inc and others. +See source files for details. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +``Software''), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lwjgl/doc/3rdparty/oculus_license.txt b/lwjgl/doc/3rdparty/oculus_license.txt new file mode 100755 index 0000000..b819ea0 --- /dev/null +++ b/lwjgl/doc/3rdparty/oculus_license.txt @@ -0,0 +1,264 @@ +Oculus VR, LLC Software Development Kit License Agreement + +Copyright © 2014 Oculus VR, LLC All rights reserved. + +The text of this may be found at: http://www.oculusvr.com/licenses/LICENSE-3.2 + +Human-Readable Summary*: + +You are Free to: + +Use, modify, and distribute the Oculus VR Rift SDK in source and binary +form with your applications/software. + +With the Following Restrictions: + +You can only distribute or re-distribute the source code to LibOVR in +whole, not in part. + +Modifications to the Oculus VR Rift SDK in source or binary form must +be shared with Oculus VR. + +If your applications cause health and safety issues, you may lose your +right to use the Oculus VR Rift SDK, including LibOVR. + +The Oculus VR Rift SDK may not be used to interface with unapproved commercial +virtual reality mobile or non-mobile products or hardware. + +* - This human-readable Summary is not a license. It is simply a convenient +reference for understanding the full Oculus VR Rift SDK License Agreement. +The Summary is written as a user-friendly interface to the full Oculus VR Rift +SDK License below. This Summary itself has no legal value, and its contents do +not appear in the actual license. + +Full-length Legal Copy: + +1. Subject to the terms and conditions of this License Agreement (the "License"), +Oculus VR, LLC ("Oculus VR") hereby grants to you a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, sublicenseable copyright license to use, +reproduce, redistribute (subject to restrictions below), modify, and improve the +software contained in this Oculus VR Rift Software Development Kit ("RIFT SDK"), +including, but not limited to, the samples, headers, LibOVR headers, and LibOVR +source. This license is subject to the following terms and conditions: + +1.1. This license includes the non-exclusive license and right to use (i) the RIFT +SDK to make applications, content, games and demos (collectively and generally +referred to as "Developer Content") that run on the Oculus VR approved mobile hardware +and software products ("Oculus Approved Rift Products") and which may incorporate +the RIFT SDK in whole or in part in binary or object code; and (ii) to use the +RIFT SDK to create derivative works of the RIFT SDK itself ("RIFT SDK Derivatives"), +whether in source, binary, or object form, in whole or in part, including third +party software unless otherwise noted. + +1.2. RIFT SDK Derivatives are further defined as source, binary or object code +derived exclusively from the RIFT SDK by you; provided, however, that RIFT SDK +Derivatives do not include the Developer Content (engines, utilities, applications, +content, games or demos) which may be developed using the RIFT SDK. By way of example +a mobile application or game or demo that is developed using the RIFT SDK would not +be a RIFT SDK Derivative , nor would a utility or tool set in a pre-existing game +engine that is adapted to work with the RIFT SDK be a RIFT SDK Derivative. +By way of example, but not limitation, a RIFT SDK Derivative is or would be: either (i) +an adaptation of a utility or piece of code from the RIFT SDK to improve efficiency; +or (ii) an addition of code or improvement to the RIFT SDK that adds functionality. + +1.3 For the sake of clarification when you use the RIFT SDK (including RIFT SDK +Derivatives) in or with Developer Content, you retain all rights to your Developer +Content, and you have no obligations to share or license Developer Content (including +your source and object code) to Oculus VR or any third parties; provided, however, +Oculus VR retains all rights to the RIFT SDK and the RIFT SDK Derivatives that may +be incorporated into your Developer Content. + +1.4 You agree to and you will use the Flash Screen Warning and the Health and +Safety Warnings (collectively the "Oculus Warnings") and the Oculus VR health and +safety protocols found in the Oculus Best Practices Guide ("Oculus H&S Protocols"), +and your use of the Oculus Warnings and the Oculus end user license agreement +("Oculus EULA") with your Developer Content as provided for in the Oculus Developer +Center, all of which can be found at the following link: +https://developer.oculusvr.com/?action=doc. + +2. You, the recipient and user of the RIFT SDK, hereby agree and accept that that +Oculus VR shall own all right, title and interest to the intellectual property +rights, including, but limited to copyright, trademark and patent rights, to any +RIFT SDK Derivatives that you may create, and you hereby assign any and all such +rights to such RIFT SDK Derivatives to Oculus VR, subject to the following. + +2.1 We hereby grant to you the a fully paid up, no-charge, royalty-free, +world-wide, in perpetuity, non-exclusive right and license back to use these RIFT +SDK Derivatives solely in conjunction with the RIFT SDK (or any components of the +RIFT SDK) and/or Developer Content on Oculus Rift Products as set forth herein. + +2.2 Furthermore, for the sake of clarification, Oculus VR and its assignees and +licensees shall be free to use such RIFT SDK Derivatives without any approval +from you and without compensation or attribution to you. + +2.3 You also agree upon Oculus VR's request to provide the source and binary code +of any RIFT SDK Derivatives to Oculus VR. FAILURE TO COMPLY WITH THIS REQUEST +IS THE BASIS FOR AUTOMATIC TERMINATION OF THIS LICENSE BY OCULUS VR. + +3. Subject to the terms and conditions of this License, your license to redistribute +and sublicense the RIFT SDK and RIFT SDK Derivatives is also expressly made +subject to the following conditions: + +3.1. You may sublicense and redistribute the source, binary, or object code of +the RIFT SDK in whole or in part by itself for no charge or as part of a for charge +piece of Developer Content; provided, however, you may only license, sublicense +or redistribute the source, binary or object code of LibOVR in whole, and you may +not license, sublicense or redistribute any portion or element of LibOVR separately +or in part (in either source, binary or object form). If you license, sublicense +or redistribute RIFT SDK Derivatives in and of themselves (not as a part of a +piece of Developer Content) then you may only do that solely with and in conjunction +with either the RIFT SDK or LibOVR. The RIFT SDK (including, but not limited to +LibOVR), any RIFT SDK Derivatives, and any Developer Content may only be used +with Oculus Approved Rift Products and may not be used, licensed, or sublicensed +to interface with mobile software or hardware or other commercial headsets, +mobile tablets or phones that are not authorized and approved by Oculus VR; + +3.2. You must include with all such redistributed or sublicensed RIFT SDK +or RIFT SDK Derivatives code the following copyright notice: +"Copyright © 2014 Oculus VR, LLC. All rights reserved," and include the +list of conditions contained in this Section 3, including the full text of +the disclaimer in Section 3.6 below; + +3.3. Neither the name of Oculus VR, LLC nor the names of Oculus VR, LLC's +contributors, licensors, employees, or contractors, may be used to endorse or promote +products derived from this RIFT SDK without specific prior written permission +of Oculus VR, LLC; + +3.4. You must give any other recipients of the RIFT SDK or any elements thereof, +including LibOVR or RIFT SDK Derivatives, a copy of this License as such recipients, +licensees or sublicensees may only use the RIFT SDK or any RIFT SDK Derivatives +or any elements thereof subject to the terms of this Licence and such recipients, +licensees or sublicensees agreement and acceptance of this License with Oculus VR +(which will convey all rights to the recipients’ or licensees’ or sublicensees’ +RIFT SDK Derivatives to Oculus VR), and you must cause any modified files to +carry prominent notices stating that you changed the files; + +3.5. If the RIFT SDK or a specific element thereof such as LibOVR includes a +"LICENSE" text file as part of its distribution (the "License Notice"), then +any RIFT SDK Derivatives that you distribute with the RIFT SDK in whole or in +part must include a readable copy of such attribution notices as are contained +within the applicable License Notice file (excluding those notices that do not +pertain to any part of the RIFT SDK Derivatives), in at least one of the following +places: within a License Notice text file distributed as part of the RIFT SDK +Derivatives; within the source form or documentation, if provided along with +the RIFT SDK Derivatives; or, within a display generated by the RIFT SDK Derivatives, +if and wherever such third-party notices normally appear. You must also include +in the License Notice file for all RIFT SDK Derivatives a copy of all notices +(including any product liability or health and safety notices). The contents +of the License Notice file are for informational purposes only and do not modify +the License. You may add your own attribution notices within RIFT SDK Derivatives +that you distribute, alongside or as an addendum to the License Notice text from +the RIFT SDK or any part thereof, provided that such additional attribution notices +cannot be construed as modifying the License. + +3.6. THIS RIFT SDK AND ANY COMPONENT THEREOF IS PROVIDED BY OCULUS VR AND +ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OCULUS VR AS THE +COPYRIGHT OWNER OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS RIFT +SDK OR THE RIFT SDK DERIVATIVES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +4. This License does not grant permission to use the trade names, trademarks, +service marks, or product names of Oculus VR, except as required for reasonable +and customary use in describing the origin of the RIFT SDK, LibOVR, or any +element thereof, and reproducing the content of the License Notice file. +Oculus VR reserves all rights not expressly granted to you under this License. + +5. In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as +deliberate and grossly negligent acts) or agreed to in writing, shall Oculus VR +or any contributor be liable to you or your licensees or sublicensees for +damages, including any direct, indirect, special, incidental, or consequential +damages of any character arising as a result of this License or out of the use +or inability to use the RIFT SDK, LibOVR, any element thereof or any RIFT SDK +Derivatives (including but not limited to damages for loss of goodwill, work +stoppage, computer failure or malfunction, or any and all other commercial +damages or losses), even if you or such contributor has been advised of the +possibility of such damages. + +6. Your acceptance of the terms and conditions of this License in and of +itself and for all Developer Content created as of March 1, 2014, may be +evidenced by any of the following: your usage of the RIFT SDK or any element +thereof, acceptance of the click-through agreement, or opening the packaging +of the CD-ROM containing the RIFT SDK or any element thereof, including LibOVR. +As this License is updated for future releases of the RIFT SDK and/or LibOVR, +you agree to abide by and meet all requirements of future updates of this +License for those future RIFT SDK releases as evidenced by the same usage of +the RIFT SDK or any element thereof and the future updates of this License +will apply for that future Developer Content that may developed for or with +that future RIFT SDK or any element thereof (i.e., you cannot sidestep out +of the requirements of future updates of the License by developing against +an older release of the RIFT SDK or License). + +7. Oculus VR reserves the right to terminate this License and all your +rights hereunder in the event you materially breach this License and fail +to cure such breach within ten (10) business days after notice of breach +from Oculus VR. + +8. Furthermore, Oculus VR also reserves the right to cancel or terminate +this License for any of the following reasons upon notice to you, subject +to the appeal process set forth in Section 14 for a wrongful termination: + + a) Intellectual property infringement by you with Developer Content + or RIFT SDK Derivatives created by you that is used with or by the + RIFT SDK or any part thereof, or any of the RIFT SDK Derivatives; + + b) Developer Content that violates or infringes upon applicable law; + + c) Health and safety issues associated with your Developer Content; + + d) Failure to comply with or use properly the Oculus Warnings, + Oculus H&S Protocols, or Oculus EULA; + + e) Use of the RIFT SDK, RIFT SDK Derivatives or LibOVR with a + commercial product other than an Oculus Approved Product; and + + f) Failure to provide required notices or deliver source code + and/or binary of RIFT SDK Derivatives as set forth above. + +If you believe that you have been wrongfully terminated under this Section 8 +with respect to material breach or with respect to these above conditions, +you have the right to appeal the termination of this License under Section 14. + +9. This License may be amended by Oculus VR on a prospective basis, and your +usage of the License after such amendments or changes signifies your consent +to and acceptance of any such amendments or changes on a going forward basis. + +10. In the event any provision of this License is determined to be invalid, +prohibited or unenforceable by a court or other body of competent jurisdiction, +this License shall be construed as if such invalid, prohibited or unenforceable +provision has been more narrowly drawn so as not to be invalid, prohibited or +unenforceable. + +11. You may not assign any rights or obligations under this License without +the advance written consent of Oculus VR, which may be withheld in its sole +discretion. Oculus VR may assign its rights or obligations under this License +in its sole discretion. + +12. Failure of either party at any time to enforce any of the provisions of +this License will not be construed as a waiver of such provisions or in any way +affect the validity of this License or parts thereof. + +13. Your remedies under this License shall be limited to the right to collect +money damages, if any, and you hereby waive your right to injunctive or other +equitable relief. + +14. This License shall be governed by the laws of the State of California, +without giving effect to choice of law principles. All disputes relating to +this License shall be resolved by binding non-appearance-based arbitration +before a neutral arbitrator in Orange County, California. If your License +has been terminated hereunder by Oculus, you may appeal your termination +through this arbitration process on an expedited basis with an arbitration +within thirty days of your giving Oculus VR notice of the appeal. The +arbitration shall be conducted in accordance with the rules and procedures +of JAMS then in effect, and the judgment of the arbitrator shall be final +and capable of entry in any court of competent jurisdiction. You agree +to submit to the personal jurisdiction of the courts located within Orange +County, California in connection with any entrance of an arbitrator’s judgment +or decision or any dispute with respect to the arbitration process or procedure +or Oculus VR’s exercise of its equitable rights or remedies. \ No newline at end of file diff --git a/lwjgl/doc/LICENSE.txt b/lwjgl/doc/LICENSE.txt new file mode 100755 index 0000000..622654b --- /dev/null +++ b/lwjgl/doc/LICENSE.txt @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2012-2014 Lightweight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ \ No newline at end of file diff --git a/lwjgl/doc/javadoc.zip b/lwjgl/doc/javadoc.zip new file mode 100755 index 0000000..696a014 Binary files /dev/null and b/lwjgl/doc/javadoc.zip differ diff --git a/lwjgl/native/OpenAL.dll b/lwjgl/native/OpenAL.dll new file mode 100755 index 0000000..66e7426 Binary files /dev/null and b/lwjgl/native/OpenAL.dll differ diff --git a/lwjgl/native/OpenAL32.dll b/lwjgl/native/OpenAL32.dll new file mode 100755 index 0000000..e5ce1b8 Binary files /dev/null and b/lwjgl/native/OpenAL32.dll differ diff --git a/lwjgl/native/glfw.dll b/lwjgl/native/glfw.dll new file mode 100755 index 0000000..22eb25d Binary files /dev/null and b/lwjgl/native/glfw.dll differ diff --git a/lwjgl/native/glfw32.dll b/lwjgl/native/glfw32.dll new file mode 100755 index 0000000..4a87870 Binary files /dev/null and b/lwjgl/native/glfw32.dll differ diff --git a/lwjgl/native/jemalloc.dll b/lwjgl/native/jemalloc.dll new file mode 100755 index 0000000..06d05e9 Binary files /dev/null and b/lwjgl/native/jemalloc.dll differ diff --git a/lwjgl/native/jemalloc32.dll b/lwjgl/native/jemalloc32.dll new file mode 100755 index 0000000..af40c41 Binary files /dev/null and b/lwjgl/native/jemalloc32.dll differ diff --git a/lwjgl/native/libglfw.dylib b/lwjgl/native/libglfw.dylib new file mode 100755 index 0000000..f0e7de3 Binary files /dev/null and b/lwjgl/native/libglfw.dylib differ diff --git a/lwjgl/native/libglfw.so b/lwjgl/native/libglfw.so new file mode 100755 index 0000000..aa293a9 Binary files /dev/null and b/lwjgl/native/libglfw.so differ diff --git a/lwjgl/native/libglfw32.so b/lwjgl/native/libglfw32.so new file mode 100755 index 0000000..6854b3b Binary files /dev/null and b/lwjgl/native/libglfw32.so differ diff --git a/lwjgl/native/libjemalloc.dylib b/lwjgl/native/libjemalloc.dylib new file mode 100755 index 0000000..95546ad Binary files /dev/null and b/lwjgl/native/libjemalloc.dylib differ diff --git a/lwjgl/native/libjemalloc.so b/lwjgl/native/libjemalloc.so new file mode 100755 index 0000000..978bfeb Binary files /dev/null and b/lwjgl/native/libjemalloc.so differ diff --git a/lwjgl/native/libjemalloc32.so b/lwjgl/native/libjemalloc32.so new file mode 100755 index 0000000..5013da6 Binary files /dev/null and b/lwjgl/native/libjemalloc32.so differ diff --git a/lwjgl/native/liblwjgl.dylib b/lwjgl/native/liblwjgl.dylib new file mode 100755 index 0000000..8c742f1 Binary files /dev/null and b/lwjgl/native/liblwjgl.dylib differ diff --git a/lwjgl/native/liblwjgl.so b/lwjgl/native/liblwjgl.so new file mode 100755 index 0000000..369a0ac Binary files /dev/null and b/lwjgl/native/liblwjgl.so differ diff --git a/lwjgl/native/liblwjgl32.so b/lwjgl/native/liblwjgl32.so new file mode 100755 index 0000000..867bcdc Binary files /dev/null and b/lwjgl/native/liblwjgl32.so differ diff --git a/lwjgl/native/libopenal.dylib b/lwjgl/native/libopenal.dylib new file mode 100755 index 0000000..ad0200d Binary files /dev/null and b/lwjgl/native/libopenal.dylib differ diff --git a/lwjgl/native/libopenal.so b/lwjgl/native/libopenal.so new file mode 100755 index 0000000..af7f325 Binary files /dev/null and b/lwjgl/native/libopenal.so differ diff --git a/lwjgl/native/libopenal32.so b/lwjgl/native/libopenal32.so new file mode 100755 index 0000000..569ba77 Binary files /dev/null and b/lwjgl/native/libopenal32.so differ diff --git a/lwjgl/native/lwjgl.dll b/lwjgl/native/lwjgl.dll new file mode 100755 index 0000000..f1b3e18 Binary files /dev/null and b/lwjgl/native/lwjgl.dll differ diff --git a/lwjgl/native/lwjgl32.dll b/lwjgl/native/lwjgl32.dll new file mode 100755 index 0000000..c5e0437 Binary files /dev/null and b/lwjgl/native/lwjgl32.dll differ diff --git a/lwjgl/src.zip b/lwjgl/src.zip new file mode 100755 index 0000000..72061fb Binary files /dev/null and b/lwjgl/src.zip differ diff --git a/src/HelloWorld.java b/src/HelloWorld.java new file mode 100644 index 0000000..fc879eb --- /dev/null +++ b/src/HelloWorld.java @@ -0,0 +1,96 @@ +import org.lwjgl.*; +import org.lwjgl.glfw.*; +import org.lwjgl.opengl.*; + +import static org.lwjgl.glfw.GLFW.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.system.MemoryUtil.*; + +public class HelloWorld { + + // The window handle + private long window; + + public void run() { + System.out.println("Hello LWJGL " + Version.getVersion() + "!"); + + try { + init(); + loop(); + + // Destroy window and window callbacks + glfwDestroyWindow(window); + } finally { + // Terminate GLFW and free the GLFWErrorCallback + glfwTerminate(); + } + } + + private void init() { + // Setup an error callback. The default implementation + // will print the error message in System.err. + + // Initialize GLFW. Most GLFW functions will not work before doing this. + if ( glfwInit() != GLFW_TRUE ) + throw new IllegalStateException("Unable to initialize GLFW"); + + // Configure our window + glfwDefaultWindowHints(); // optional, the current window hints are already the default + glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation + glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable + + int WIDTH = 300; + int HEIGHT = 300; + + // Create the window + window = glfwCreateWindow(WIDTH, HEIGHT, "Hello World!", NULL, NULL); + if ( window == NULL ) + throw new RuntimeException("Failed to create the GLFW window"); + + // Get the resolution of the primary monitor + GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor()); + // Center our window + glfwSetWindowPos( + window, + (vidmode.width() - WIDTH) / 2, + (vidmode.height() - HEIGHT) / 2 + ); + + // Make the OpenGL context current + glfwMakeContextCurrent(window); + // Enable v-sync + glfwSwapInterval(1); + + // Make the window visible + glfwShowWindow(window); + } + + private void loop() { + // This line is critical for LWJGL's interoperation with GLFW's + // OpenGL context, or any context that is managed externally. + // LWJGL detects the context that is current in the current thread, + // creates the GLCapabilities instance and makes the OpenGL + // bindings available for use. + GL.createCapabilities(); + + // Set the clear color + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + + // Run the rendering loop until the user has attempted to close + // the window or has pressed the ESCAPE key. + while ( glfwWindowShouldClose(window) == GLFW_FALSE ) { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer + + glfwSwapBuffers(window); // swap the color buffers + + // Poll for window events. The key callback above will only be + // invoked during this call. + glfwPollEvents(); + } + } + + public static void main(String[] args) { + new HelloWorld().run(); + } + +} diff --git a/src/diveengine2d/DebugSettings.java b/src/diveengine2d/DebugSettings.java index 78a3b52..6e2cff5 100644 --- a/src/diveengine2d/DebugSettings.java +++ b/src/diveengine2d/DebugSettings.java @@ -21,7 +21,7 @@ public class DebugSettings { x += 10; y += 20; int yOff = 20; - g.drawString("" + Time.FPS, x, y); + g.drawString("" + Time.renderTime, x, y); y += yOff; g.drawString("" + Time.timedFramesCurrent, x, y); y += yOff; diff --git a/src/diveengine2d/Engine.java b/src/diveengine2d/Engine.java index 00d4290..b479215 100644 --- a/src/diveengine2d/Engine.java +++ b/src/diveengine2d/Engine.java @@ -1,26 +1,32 @@ package diveengine2d; -import java.awt.Canvas; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics2D; -import java.awt.RenderingHints; -import java.awt.image.BufferStrategy; +import org.lwjgl.glfw.GLFWErrorCallback; +import org.lwjgl.glfw.GLFWKeyCallback; +import org.lwjgl.glfw.GLFWVidMode; +import org.lwjgl.opengl.GL; + import java.io.File; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; -import javax.swing.*; +import static org.lwjgl.glfw.GLFW.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.system.MemoryUtil.*; -public class Engine extends Canvas { +public class Engine { public static String gameFolder = null; public static int WIDTH, HEIGHT; public static String startScene = null; public static String name = null; - public static BufferStrategy bs = null; - public static boolean running = true; + + // no fucking clue. + private GLFWErrorCallback errorCallback; + private GLFWKeyCallback keyCallback; + + //literally a byte address + private long window; public Engine(String gameFolder) { @@ -53,49 +59,21 @@ public class Engine extends Canvas { SceneManager.entityDump(); - JFrame frame = new JFrame(name); - frame.add(this); - this.setPreferredSize(new Dimension(WIDTH, HEIGHT)); - frame.pack(); - frame.setVisible(true); - frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); - this.requestFocus(); - this.addKeyListener(new Input()); - this.addMouseMotionListener(new Input()); - this.addMouseListener(new Input()); - - createBufferStrategy(2); - bs = getBufferStrategy(); - - Time.nanos = System.nanoTime(); + try { + init(); + loop(); - while(running) { - - Time.startTime = System.currentTimeMillis(); - if (System.currentTimeMillis() > Time.nextSecond) { - Time.nextSecond += 1000; - Time.FPS = Time.framesInCurrentSecond; - Time.framesInCurrentSecond = 0; - System.out.println("Timed Frames: " + Time.timedFramesCurrent); - System.out.println("Calculated Frames: " + Time.FPS); - Time.timedFramesCurrent = 0; - } - Time.framesInCurrentSecond++; - - render(); - updateScene(); - Time.tickTime = (System.nanoTime() - Time.nanos)/16640000d; - Time.deltaTime = Time.tickTime * Time.timeScale; - Time.nanos = System.nanoTime(); -// System.out.println("dTime: " + Time.deltaTime); - - Time.timedFramesCurrent += Time.deltaTime; - + // Destroy window and window callbacks + glfwDestroyWindow(window); + } finally { + // Terminate GLFW and free the GLFWErrorCallback + glfwTerminate(); } } public void render() { + /* Graphics2D g = (Graphics2D)bs.getDrawGraphics(); g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); @@ -103,6 +81,7 @@ public class Engine extends Canvas { DebugSettings.render(g); Tests.run(g); bs.show(); + */ } private void updateScene() { @@ -167,8 +146,90 @@ public class Engine extends Canvas { System.out.println("Loaded Config File..."); } - private void render(Graphics2D g) { - SceneManager.render(g); - g.setColor(Color.BLACK); + + private void init() { + // Setup an error callback. The default implementation + // will print the error message in System.err. + + // Initialize GLFW. Most GLFW functions will not work before doing this. + if ( glfwInit() != GLFW_TRUE ) + throw new IllegalStateException("Unable to initialize GLFW"); + + // Configure our window + glfwDefaultWindowHints(); // optional, the current window hints are already the default + glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation + glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable + + int WIDTH = 300; + int HEIGHT = 300; + + // Create the window + window = glfwCreateWindow(WIDTH, HEIGHT, "Hello World!", NULL, NULL); + if ( window == NULL ) + throw new RuntimeException("Failed to create the GLFW window"); + + // Get the resolution of the primary monitor + GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor()); + // Center our window + glfwSetWindowPos( + window, + (vidmode.width() - WIDTH) / 2, + (vidmode.height() - HEIGHT) / 2 + ); + + // Make the OpenGL context current + glfwMakeContextCurrent(window); + // Enable v-sync + glfwSwapInterval(1); + + // Make the window visible + glfwShowWindow(window); + } + + private void loop() { + // This line is critical for LWJGL's interoperation with GLFW's + // OpenGL context, or any context that is managed externally. + // LWJGL detects the context that is current in the current thread, + // creates the GLCapabilities instance and makes the OpenGL + // bindings available for use. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, WIDTH, HEIGHT, 0, 1, -1); + glMatrixMode(GL_MODELVIEW); + + GL.createCapabilities(); + + // Set the clear color + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + + // Run the rendering loop until the user has attempted to close + // the window or has pressed the ESCAPE key. + while ( glfwWindowShouldClose(window) == GLFW_FALSE ) { + //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer + + float ratio; + //glfwGetFramebufferSize(window, &width, &height); + + + ratio = WIDTH / (float) HEIGHT; + glViewport(0, 0, WIDTH, HEIGHT); + glClear(GL_COLOR_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-ratio, ratio, -1.f, 1.f, 1.f, -1.f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glRotatef((float) glfwGetTime() * 50.f, 0.f, 0.f, 1.f); + glBegin(GL_TRIANGLES); + glColor3f(1.f, 0.f, 0.f); + glVertex3f(-0.6f, -0.4f, 0.f); + glColor3f(0.f, 1.f, 0.f); + glVertex3f(0.6f, -0.4f, 0.f); + glColor3f(0.f, 0.f, 1.f); + glVertex3f(0.f, 0.6f, 0.f); + glEnd(); + glfwSwapBuffers(window); + glfwPollEvents(); + } } } diff --git a/src/diveengine2d/Input.java b/src/diveengine2d/Input.java index b172dab..809e8d3 100644 --- a/src/diveengine2d/Input.java +++ b/src/diveengine2d/Input.java @@ -14,7 +14,7 @@ public class Input implements KeyListener, MouseListener, MouseMotionListener{ private static List listeners = new ArrayList(); public static int mouseX, mouseY; public static boolean mouse = false; - + public static void addKeyListener(KeyListener listener) { listeners.add(listener); } diff --git a/src/diveengine2d/Time.java b/src/diveengine2d/Time.java index 4dfabe1..da14d1b 100644 --- a/src/diveengine2d/Time.java +++ b/src/diveengine2d/Time.java @@ -10,5 +10,6 @@ public class Time { public static double deltaTime = 0; public static long nextSecond = System.currentTimeMillis() + 1000, startTime = 0; public static double timedFramesCurrent; - + + public static long renderTime; }