Git Product home page Git Product logo

ork's Introduction

About

Fork of Ork library with SCons build support.

Build

Following lines describes how to build Ork under Ubuntu 22.04 LTS.

  • download glew library from glew page where 1.5.6 version can be downloaded here

  • unpack with

tar -xaf glew-1.5.6.tgz	

command.

  • install glew dependencies with
sudo apt install libxmu-dev libglu1-mesa-dev libglut-dev

command

  • build with
cd glew-1.5.6
make -j8

command

note: works only with tarball (not zip glew library file)

  • install with to /usr directory with
sudo make install

command. Where glew library in installed to /usr directory.

  • create linker configuration for /usr/lib64 where glew was installed. Go to configuration directory with
cd /etc/ld.so.conf.d

and create usr_lib64.conf with following

$ cat usr_lib64.conf 
# linker configuration for /usr/lib64
/usr/lib64

content

  • update linker cache with
sudo ldconfig

Be aware that (/usr/lib64/pkgconfig) pkg-config install directory is not searched by pkg-config command and as a result pkg-config is not aware of locally installed glew library e.g.

$ pkg-config --modversion glew
2.2.0

can return 2.2.0 (verson of glew library installed by package manager) instead of 1.5.6 version installed manually.

This can be solved by setting PKG_CONFIG_PATH environment variable from build script with

env.AppendENVPath('PKG_CONFIG_PATH', '/usr/lib64/pkgconfig')

line (see SConstruct file).

Now finally we can run

scons -j8

command to build Ork library.

Issues

  1. undefined reference to glEnable
/bin/ld: libork.a(FrameBuffer.o): undefined reference to symbol 'glEnable'
/bin/ld: /lib/x86_64-linux-gnu/libGL.so.1: error adding symbols: DSO missing from command line

There are missing -lGL -lX11 -lGLU dependencies for glew library in a pkg-config configuration.

Run

After succesfull building examples can be found in examples directory.

$ cd examples
$ ./examples minimal

other examples are render, resource, scenegraph, scenegraphresource and tessellation.

Run

./examples render .

commnad for render example or

./examples resource .

command for resource or

./examples scenegraph .

command for scenegraph or

./example scenegraphresource . cubesScene|exampleScene|postprocessScene|skyboxScene

command for scene graph from resource file sample or

./examples tessellation

command for a tessellation sample (GLSL 4.0).

TODO: how to run tests to find errors?

Issues

  1. Unable to loading shared library libGLEW.so.1.5
$ ./examples
./examples: error while loading shared libraries: libGLEW.so.1.5: c/etc/ld.so.conf.dannot open shared object file: No such file or directory

The root cause is that the library in not in a linker cache.

$ ldconfig -p|grep -i glew
        libGLEW.so.2.2 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGLEW.so.2.2
        libGLEW.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libGLEW.so

There is missig linker configuration for /usr/lib64 in /etc/ld.so.conf.d directory.

  1. OpenGL error 1282 complain for exampes
$ ./examples minimal
ERROR [RENDER] OpenGL error 1282, returned string 'invalid operation'
invalid operation
examples: ork/render/Program.cpp:660: void ork::Program::initUniforms(): Assertion `FrameBuffer::getError() == 0' failed.
Aborted (core dumped)
  1. unknown sequence resource type for scenegraph example
$ ./examples scenegraph .
...
ERROR [RESOURCE] Unknown resource type 'sequence' at line 1 in sequence>

this is because implicit resource type registration mechanism is optimized out by linker in case sequence resource part of the code is not called by an application (which is the case or runtime configuration). No idea how to force linker to not optimized out local static variables so therefore we've introduced explicit initialization as ork::InitResourceTypes() in resources/InitResources.h header.

Install

To install Ork library run

sudo scons install

command and to update linker database, run

sudo ldconfig

TODO: is linker searching in /usr/local/lib by default?

command.

The library is installed to /usr/local/lib directory.

ork's People

Contributors

sansajn avatar

Watchers

 avatar

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.