This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2011-2015 Attila Kocsis, Branimir Karadzic. All rights reserved. | |
| * License: http://www.opensource.org/licenses/BSD-2-Clause | |
| */ | |
| #include "bgfx_p.h" | |
| #if BGFX_CONFIG_RENDERER_METAL | |
| #import <QuartzCore/CAMetalLayer.h> | |
| #import <UIKit/UiView.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: renderer_gl.cpp | |
| =================================================================== | |
| --- renderer_gl.cpp (revision 972) | |
| +++ renderer_gl.cpp (revision 973) | |
| @@ -2756,6 +2756,16 @@ | |
| , name | |
| , glGetAttribLocation(m_id, name) | |
| ); | |
| + | |
| + bool found = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2011-2016 Attila Kocsis. All rights reserved. | |
| * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause | |
| */ | |
| #include "bgfx_p.h" | |
| #if BGFX_CONFIG_RENDERER_METAL | |
| #include "renderer_mtl.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From metal documentation: | |
| "Command buffer and command encoder objects are transient and designed for a single use. | |
| They are very inexpensive to allocate and deallocate, so their creation methods return autoreleased objects." | |
| https://developer.apple.com/library/content/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Cmd-Submiss/Cmd-Submiss.html | |
| Autorelease example: | |
| NSAutoreleasePool* autoreleasePool = [[NSAutoreleasePool alloc] init]; | |
| //c is an autoreleased object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| in examples like hdr.cpp: | |
| #ifndef SKIP_ENTRY_IMPLEMENT_MAIN | |
| ENTRY_IMPLEMENT_MAIN(ExampleHDR); | |
| #endif | |
| ---------------------------------------------------------------------- | |
| in mega.cpp: | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FileReaderAndroidImpl : public bx::FileReaderI | |
| { | |
| public: | |
| FileReaderAndroidImpl(AAssetManager *assetManager, AAsset* _file) | |
| : m_assetManager(assetManager) | |
| , m_file(_file) | |
| , m_open(false) | |
| { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I have tested two large obj file with geometryc. | |
| ApCity uncompressed zip lzma | |
| No Index compress 1,366,519 486,989 337,053 | |
| Index compress 1,244,034 432,734 296,368 | |
| Index+Vertex DWORD 1,244,034 388,990 300,717 | |
| Salle | |
| No Index compress 28,663,702 17,863,876 11,664,913 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define BUTTON_ID 1 | |
| cButton* btn = new cButton(LOC"PLAY", "images/foo.png"); | |
| btn->setPosition(sGuiVec2(100,200)); | |
| btn->setScale(2.0f); | |
| btn->setAnchorPoint(sGuiVec2(0,0)); | |
| btn->onPressed().addHandler(this, &onButtonPressed); | |
| addChild(btn, 1, BUTTON_ID); | |
| void onButtonPressed(cButton* btn) |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #line 1 "..\\..\\..\\tools\\shaderc\\shaderc_spirv.cpp" | |
| #line 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\string" | |
| #pragma once | |
| #line 1 "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.10.25017\\include\\istream" | |
| #pragma once |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Storage for materials: | |
| Version A. compact/hardcoded for certain shading types | |
| type: 1 byte (phong=0, pbrMetallicRoughnes=1, pbrSpecularGlossiness=2, ...) | |
| if ( type == 0 ) | |
| 4 floats diffuseColor | |
| string diffuseTexture | |
| 1 byte diffuseTexture texcoord channel | |
| 4 bytes diffuseTexture sampler parameters | |
| ..... |