Giter Site home page Giter Site logo

jwwalker / quesa Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 9.0 17.21 MB

This is a 3D rendering and scene graph library for macOS and Windows. Written in C++, BSD license.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.59% Shell 2.71% M4 0.05% C 22.06% Perl 3.53% Batchfile 0.01% Rich Text Format 0.01% HTML 0.18% C++ 59.41% Objective-C 2.81% Objective-C++ 2.11% Roff 2.58% POV-Ray SDL 0.01% Rez 3.94%
3d-graphics macos windows

quesa's People

Contributors

jwwalker avatar maddthesane avatar seanm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

quesa's Issues

nullability annotation missing on TQ3MacOSDialogEventHandler & TQ3DialogAnchor

I've rebuilt Quesa and now building my own app gives 2 nullability warnings from Quesa headers:

QuesaRenderer.h:1272:49: Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
QuesaRenderer.h:1287:5: Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

I can make a PR but @jwwalker you'd know better than me if this should be nullable or nonnull.

Plugin loading/unloading console logs...

@jwwalker another difference I'm seeing vs the circa 2016 Quesa I was using previously, is a bunch of logs like:

2021-04-07 16:54:32.061559-0400 xctest[31510:4581175] ScanAllPluginsInLibrary: load Library [/System/Library/Filesystems/NetFSPlugins]
2021-04-07 16:54:32.061976-0400 xctest[31510:4581175] ScanAllPluginsInLibrary: load Library [/System/Library/Filesystems/NetFSPlugins]
2021-04-07 16:54:32.249993-0400 xctest[31510:4581175] ScanAllPluginsInLibrary: load Library [/System/Library/Filesystems/NetFSPlugins]
2021-04-07 16:54:33.364189-0400 xctest[31510:4581175] ScanAllPluginsInLibrary: load Library [/System/Library/Filesystems/NetFSPlugins]
2021-04-07 16:54:39.200780-0400 xctest[31510:4581175] E3MacSystem_UnloadPlugins 1

The E3MacSystem_UnloadPlugins one looks like maybe leftover debugging code?

Integration with SDL1/2?

Hi there,

Glad to see this is still getting maintained! A long-time "someday" project for me has been to take the Nanosaur source code and write some glue code to get it running natively on modern computers, and since Nanosaur is heavily based on the QD3D API, any attempt at a port is going to need to be based around Quesa. I'm finally getting to the point where I have enough C experience from other projects that I might actually be able to tackle this.

My question is: is it possible for me to create an OpenGL context with a different library (SDL1 or 2) and then pass that GL context on to Quesa so it knows to render to it? I'd imagine it's probably possible, but reading through the code examples and API docs I'm not seeing an easy way to do this. If it's possible, could you please point me to the right place in the code or docs to look? If I can get a minimal example up and running, I'd be happy to contribute it via a PR.

Thanks in advance!

___isPlatformVersionAtLeast link error with old Xcode due to @available

If I build Quesa, then use the result with older Xcodes, I get a link error:

  "___isPlatformVersionAtLeast", referenced from:
      -[QuesaViewWatcher refreshCachedBounds] in libQuesa.a(E3CocoaDrawContext.o)
      e3drawcontext_cocoa_get_dimensions(OpaqueTQ3Object*, TQ3Area*) in libQuesa.a(E3CocoaDrawContext.o)
ld: symbol(s) not found for architecture x86_64

This seems to be a well-known limitation/bug of Xcode.

Easy solution: replace the 4 uses of if (@available( macOS 10.15, * )) with if (floor(NSAppKitVersionNumber) >= 1894.0)

All 4 guard the use of convertRectToBacking:, but that API was added in 10.7. Is the 10.15 check wrong, should it be 10.7?

Building the 3DMF Model Preview App

Hello,

I am attempting to build the 3DMF previewer app, however I seem to be missing something and am unsure how to build the application as there are no solution/project files... Would someone be able to offer up a tip as to how to proceed in building the previewer app? Additionally, what versions of the 3DMF format will this support and to what degree are they supported?

(Quesa-master\SDK\Extras\Quesa Model Viewer)

-Elijah

UBSan `-fsanitize=function` reports issue with `E3ClassInfo` vs `E3Root`

@jwwalker so I have master building warning-free now (thanks!) and have even built with UBSan, which I've never done with Quesa before, by setting:

QUESA_EXTRA_DEBUG_C = -fsanitize=undefined,nullability -fsanitize-trap=undefined,nullability

Running my own unit tests reports one error from the function check ("Indirect call of a function through a function pointer of the wrong type") here:

return ( (E3Root*) inClass )->newMethod ( (TQ3Object) this,

Indeed inClass seems to be an E3ClassInfo not an E3Root.

(lldb) p *inClass
(E3ClassInfo) $0 = {
  classType = 1936224868
  className = 0x00000001072e7230 "SharedObject"
  classMetaHandler = 0x000000012776b300 (UnitTests`e3shared_metahandler(unsigned int) at E3Main.cpp:372)
  methodTable = 0x00000001072e9920
  abstract = kQ3False
  numInstances = 0
  instanceSize = 72
  deltaInstanceSize = 12
  deltaInstanceOffset = 56
  numChildren = 16
  theParent = 0x00000001072e92d0
  theChildren = 0x0000000132131530
  ownAndParentTypes = ([0] = 1366454127, [1] = 1936224868, [2] = 0, [3] = 0, [4] = 0, [5] = 0)
  registerMethod = 0x000000012776b580 (UnitTests`e3shared_new_class_info(void (* (*)(unsigned int))(), E3ClassInfo*) at E3Main.cpp:218)
}

Building on GNU/Linux, a work in progress

I was trying to compile this library on GNU/Linux and would like to share my current progress here so that others might continue from here.

Distribution: Debian 12 'Bookworm'

apt update
apt -y upgrade

apt install -y git # git
apt install -y automake autoconf libtool make gcc g++ # build tools
apt install -y libxt-dev libxmu-dev libxi-dev # x-related stuff
apt install -y libgl1-mesa-dev libglu1-mesa-dev # opengl-related stuff
apt install -y gawk # things ./configure misses

git clone https://github.com/jwwalker/Quesa
cd Quesa/Development/Projects/Unix/Scripts/
bash prepareUnixTree.sh
cd ..
sed --in-place 's/\(^AM_INIT_AUTOMAKE(\[\)\(.*\)/\1subdir-objects\])/' configure.in
sed --in-place 's/\.cpp/\.c/' Makefile.am
sed --in-place 's/\.c/\.cpp/' Makefile.am
aclocal
automake --add-missing
automake
autoconf
touch Source/Core/Glue/QD3DCamera.c # because this does not exist but is required.
./configure

The next step, make, currently fails with the following error:

/bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME="Quesa" -DPACKAGE_TARNAME="quesa" -DPACKAGE_VERSION="1.8" -DPACKAGE_STRING="Quesa\ 1.8" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="quesa" -DVERSION="1.8" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -DQUESA_OS_UNIX=1 -Wall -Wpointer-arith -Wno-cast-qual -Waggregate-return -Wredundant-decls -Wno-multichar -Wno-conversion -Wno-unknown-pragmas -Wno-unused -I./APIincludes -I./Source/Core/Glue -I./Source/Core/System -I./Source/Core/Support -I./Source/Core/Geometry -I./Source/FileFormats -I./Source/FileFormats/Readers/3DMF -I./Source/FileFormats/Writers/3DMF -I./Source/Renderers/Cartoon -I./Source/Renderers/Common -I./Source/Renderers/Generic -I./Source/Renderers/HiddenLine -I./Source/Renderers/Interactive -I./Source/Renderers/MakeStrip -I./Source/Renderers/OpenGL -I./Source/Renderers/Wireframe -I./Source/Unix -x c++ -DQUESA_OS_UNIX=1 -Wall -Wpointer-arith -Wno-cast-qual -Waggregate-return -Wredundant-decls -Wno-multichar -Wno-conversion -Wno-unknown-pragmas -Wno-unused -I./APIincludes -I./Source/Core/Glue -I./Source/Core/System -I./Source/Core/Support -I./Source/Core/Geometry -I./Source/FileFormats -I./Source/FileFormats/Readers/3DMF -I./Source/FileFormats/Writers/3DMF -I./Source/Renderers/Cartoon -I./Source/Renderers/Common -I./Source/Renderers/Generic -I./Source/Renderers/HiddenLine -I./Source/Renderers/Interactive -I./Source/Renderers/MakeStrip -I./Source/Renderers/OpenGL -I./Source/Renderers/Wireframe -I./Source/Unix -DQUESA_HOST_IS_BIG_ENDIAN=0 -g -O2 -MT ./Source/Core/Glue/libquesa_la-QD3DCamera.lo -MD -MP -MF ./Source/Core/Glue/.deps/libquesa_la-QD3DCamera.Tpo -c -o ./Source/Core/Glue/libquesa_la-QD3DCamera.lo test -f './Source/Core/Glue/QD3DCamera.c' || echo './'./Source/Core/Glue/QD3DCamera.c
./libtool: line 879: X--tag=CC: command not found
./libtool: line 912: libtool: ignoring unknown tag : command not found
./libtool: line 879: X--mode=compile: command not found
./libtool: line 1029: *** Warning: inferring the mode of operation is deprecated.: command not found
./libtool: line 1030: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
./libtool: line 1173: Xgcc: command not found
./libtool: line 1173: X-DPACKAGE_NAME="Quesa": command not found
./libtool: line 1173: X-DPACKAGE_TARNAME="quesa": command not found
./libtool: line 1173: X-DPACKAGE_VERSION="1.8": command not found
./libtool: line 1173: X-DPACKAGE_STRING="Quesa 1.8": command not found
./libtool: line 1173: X-DPACKAGE_BUGREPORT="[email protected]": command not found
./libtool: line 1173: X-DPACKAGE_URL="": command not found
./libtool: line 1173: X-DPACKAGE="quesa": command not found
./libtool: line 1173: X-DVERSION="1.8": command not found
./libtool: line 1173: X-DHAVE_STDIO_H=1: command not found
./libtool: line 1173: X-DHAVE_STDLIB_H=1: command not found
./libtool: line 1173: X-DHAVE_STRING_H=1: command not found
./libtool: line 1173: X-DHAVE_INTTYPES_H=1: command not found
./libtool: line 1173: X-DHAVE_STDINT_H=1: command not found
./libtool: line 1173: X-DHAVE_STRINGS_H=1: command not found
./libtool: line 1173: X-DHAVE_SYS_STAT_H=1: command not found
./libtool: line 1173: X-DHAVE_SYS_TYPES_H=1: command not found
./libtool: line 1173: X-DHAVE_UNISTD_H=1: command not found
./libtool: line 1173: X-DSTDC_HEADERS=1: command not found
./libtool: line 1173: X-DHAVE_DLFCN_H=1: command not found
./libtool: line 1173: X-DLT_OBJDIR=".libs/": No such file or directory
./libtool: line 1173: X-I.: command not found
./libtool: line 1173: X-DQUESA_OS_UNIX=1: command not found
./libtool: line 1173: X-Wall: command not found
./libtool: line 1173: X-Wpointer-arith: command not found
./libtool: line 1173: X-Wno-cast-qual: command not found
./libtool: line 1173: X-Waggregate-return: command not found
./libtool: line 1173: X-Wredundant-decls: command not found
./libtool: line 1173: X-Wno-multichar: command not found
./libtool: line 1173: X-Wno-conversion: command not found
./libtool: line 1173: X-Wno-unknown-pragmas: command not found
./libtool: line 1173: X-Wno-unused: command not found
./libtool: line 1173: X-I./APIincludes: No such file or directory
./libtool: line 1173: X-I./Source/Core/Glue: No such file or directory
./libtool: line 1173: X-I./Source/Core/System: No such file or directory
./libtool: line 1173: X-I./Source/Core/Support: No such file or directory
./libtool: line 1173: X-I./Source/Core/Geometry: No such file or directory
./libtool: line 1173: X-I./Source/FileFormats: No such file or directory
./libtool: line 1173: X-I./Source/FileFormats/Readers/3DMF: No such file or directory
./libtool: line 1173: X-I./Source/FileFormats/Writers/3DMF: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Cartoon: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Common: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Generic: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/HiddenLine: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Interactive: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/MakeStrip: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/OpenGL: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Wireframe: No such file or directory
./libtool: line 1173: X-I./Source/Unix: No such file or directory
./libtool: line 1173: X-x: command not found
./libtool: line 1173: Xc++: command not found
./libtool: line 1173: X-DQUESA_OS_UNIX=1: command not found
./libtool: line 1173: X-Wall: command not found
./libtool: line 1173: X-Wpointer-arith: command not found
./libtool: line 1173: X-Wno-cast-qual: command not found
./libtool: line 1173: X-Waggregate-return: command not found
./libtool: line 1173: X-Wredundant-decls: command not found
./libtool: line 1173: X-Wno-multichar: command not found
./libtool: line 1173: X-Wno-conversion: command not found
./libtool: line 1173: X-Wno-unknown-pragmas: command not found
./libtool: line 1173: X-Wno-unused: command not found
./libtool: line 1173: X-I./APIincludes: No such file or directory
./libtool: line 1173: X-I./Source/Core/Glue: No such file or directory
./libtool: line 1173: X-I./Source/Core/System: No such file or directory
./libtool: line 1173: X-I./Source/Core/Support: No such file or directory
./libtool: line 1173: X-I./Source/Core/Geometry: No such file or directory
./libtool: line 1173: X-I./Source/FileFormats: No such file or directory
./libtool: line 1173: X-I./Source/FileFormats/Readers/3DMF: No such file or directory
./libtool: line 1173: X-I./Source/FileFormats/Writers/3DMF: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Cartoon: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Common: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Generic: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/HiddenLine: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Interactive: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/MakeStrip: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/OpenGL: No such file or directory
./libtool: line 1173: X-I./Source/Renderers/Wireframe: No such file or directory
./libtool: line 1173: X-I./Source/Unix: No such file or directory
./libtool: line 1173: X-DQUESA_HOST_IS_BIG_ENDIAN=0: command not found
./libtool: line 1173: X-g: command not found
./libtool: line 1173: X-O2: command not found
./libtool: line 1173: X-MT: command not found
./libtool: line 1173: X./Source/Core/Glue/libquesa_la-QD3DCamera.lo: No such file or directory
./libtool: line 1173: X-MD: command not found
./libtool: line 1173: X-MP: command not found
./libtool: line 1173: X-MF: command not found
./libtool: line 1173: X./Source/Core/Glue/.deps/libquesa_la-QD3DCamera.Tpo: No such file or directory
./libtool: line 1173: X-c: command not found
./libtool: line 1224: X./Source/Core/Glue/libquesa_la-QD3DCamera.lo: No such file or directory
./libtool: line 1229: libtool: compile: cannot determine name of library object from `': command not found
make: *** [Makefile:1732: Source/Core/Glue/libquesa_la-QD3DCamera.lo] Error 1

It seems like someone with some autotools expertise ought to take a look at this, as it seems that is where the problem lies.

Reading through Autotools Mythbuster might prove useful to an autotools novice who might want to muddle through to a solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.