guaxiao / renderer.gua Goto Github PK
View Code? Open in Web Editor NEWSoftware 3D Renderer in C++ on Windows, OSX and Linux or other popular flavors of Unix that SDL supports
License: Apache License 2.0
Software 3D Renderer in C++ on Windows, OSX and Linux or other popular flavors of Unix that SDL supports
License: Apache License 2.0
project file
单独放到一个文件夹中。对应的lib
的dll
也要放过去吗?VS2015
的话,就要重新编译源代码。所以就会有不同的 lib 和 dll。build
是可以在VS2015
下面用的。sdl1
而不是sdl2
吗?因为最新的build
用的是sdl2
。windows.h
做了些修改,你看看?https://github.com/happlebao/renderer.gua/blob/sdl2/src/window.hnull
的检查需不需要单独抽成一个函数?src/texture.cpp:21:20: error: use of undeclared identifier 'nullptr'
if (_pixels != nullptr) {
^
1 error generated.
g++ -Wall -Isrc -o gua3d src/window.cpp src/canvas.cpp src/color.cpp src/vector.cpp src/vertex.cpp src/mesh.cpp src/texture.cpp src/guaimage.cpp platform/osx/main.mm platform/osx/SDLMain.m -framework Cocoa -framework SDL
//C++ 11相关的warnings
In file included from platform/osx/main.mm:1:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error:
expected ';' after @Class
@Class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot
find protocol declaration for 'ObjectType'
@Class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot
find protocol declaration for 'ObjectType'
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error:
expected unqualified-id
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:13: error:
expected ')'
我尝试用你的脚本安装SDL,失败了,于是用brew安装,以上是结果。
问题源头是g++吗?
g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin15.2.0
Thread model: posix
BTW,我之前装过LLVM
lli --version
LLVM (http://llvm.org/):
LLVM version 3.8.0svn
DEBUG build with assertions.
Built Nov 11 2015 (23:25:56).
Default target: x86_64-apple-darwin15.2.0
Host CPU: has well
是否因为LLVM版本不匹配(llvm3.6.0 and llvm 3.8.0)?
split函数里 l.push_back(str.substr(start)) 没有判断为空的情况,有可能会加入一个空字符串
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.