Author Topic: Combine Bonzai Engine Model Loader with existing Render Class  (Read 9092 times)

refuzee

  • Jr. Member
  • **
  • Posts: 4
Hi there,

thank you very much for your help so far (I'm teamed with Jan)! Here is another problem we would like to find an easy way for:
We have an existing stereoscopic render class and would like to include the model loader of the Bonzai engine.
What would be the fastest and best practice way to do that ? Here's a a snippet (I know its very dirty and probably full of stuff to do other ways..)
One Image gets rendered in one viewport, after the right image the left image gets rendered as well so this code basically repeats with some changed values.


We would appreciate some help with this as we all are not very experienced with Bonzai or OpenGL. Thanks in advance! And thank you for your help so far Jerome.

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Combine Bonzai Engine Model Loader with existing Render Class
« Reply #1 on: July 09, 2013, 10:14:38 AM »
The best thing would be to start cleaning up your code by avoiding clearing the framebuffer twice, moving the OpenGL init states outside the render loop, ...

Also, I'll highly recommend to stop using GL11 fixed pipeline / deprecated stuff (matrix stack, light/material properties). We provide everything in Bonzai engine to replace all your deprecated GL11 calls, just look at the tutorials (MatrickStack, Lights).

Pseudo code:

If you don't use Bonzai engine framework to create init your app, look at ModelLoadingNoFramework tutorial to create and initialize a valide glApi object.
« Last Edit: July 09, 2013, 10:16:50 AM by jerome_j »

refuzee

  • Jr. Member
  • **
  • Posts: 4
Re: Combine Bonzai Engine Model Loader with existing Render Class
« Reply #2 on: July 17, 2013, 10:37:14 AM »
hi jerome,

thanks for your help. i'll try your advice and see what we can do..