setFrameLoop causing performance issue?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
cww
Posts: 27
Joined: Sun Jul 28, 2013 1:29 pm

Re: setFrameLoop causing performance issue?

Post by cww »

My knowledge with OpenGL is quite basic and a little rusty, hence will prefer to stick with v1 which already works on most aspects, and try to fill in the last piece that I need (skeleton anim in hw). I also have a feeling much of the custom code is also reusable if I decide to go v2 later, so will defer on making the switch. Hopefully let then there already is v2 shaders that works out of box that I can start to hack on... 8)
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: setFrameLoop causing performance issue?

Post by Nadro »

Built-in shaders will never offer good performance compare to custom shaders dedicated for a game. Why? Because in built-in shaders we have to handle all Irrlicht SMaterial variables, lighting etc, but you don't need much of them in your game mostly, thats why you should write simplified and faster shader. If you need the best performance don't use built-in shaders (you should remove unnecessary for your game stuff from them). Built-in shaders whose emulate fixed pipeline have simple roles:
1. Good base for a custom shaders.
2. Enough performance for a simple games.
3. Built-in examples require support of them.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
cww
Posts: 27
Joined: Sun Jul 28, 2013 1:29 pm

Re: setFrameLoop causing performance issue?

Post by cww »

Hi Nadro,

Thanks for the well thought out reply.

Originally, I am trying to delay going to ogles v2 later instead of sooner. There are several 'issues' that I need to overcome to bring v2 on par with v1.

Though most of these 'issues' could just be a matter of configuring customer shaders like you said, I foresee I need to spend quite some time picking up the knowledge before I can be productive.

But I just found a show stopper on v1: some of my models uses >20 bones in 1 mesh buffer, and v1 + matrix palette is insufficient (an extended version matrix palette exists but doesn't look well supported).

So looks like v2 is going to be the path of least resistance and I am definitely heading in that direction. It will be an uphill battle for me initially but hopefully it goes downhill quickly :wink:

Among my various issues with v2. One of it is Irrlicht currently doesn't compile under iOS. I hot-fixed it to trick it to compile so that I can continue to use v1. If i try to use v2 all it shows is a blank white screen. If by any chance the irrlicht team can help to this, it will be great for me.

Thanks!
cww
Posts: 27
Joined: Sun Jul 28, 2013 1:29 pm

Re: setFrameLoop causing performance issue?

Post by cww »

I managed to get ogles2 running on iOS simulator again by doing the following. Not sure if I am doing all the right things but it seems to render most things (as opposed to a white screen with my previous hack). Some stuff still not rendered correctly, but may be due to lack of shaders. Please feel free to let me know if I made any errors with these fixes. Will be good if they can be fixed in the ogles branch. Thanks!

COGLES2Driver.cpp

Code: Select all

 
extGlDeleteFramebuffers(1, ...)
//change to
glDeleteFramebuffers(1, ...)
 
glBindRenderbufferOES(GL_RENDERBUFFER_OES, ViewRenderbuffer);
//change to
glBindRenderbuffer(GL_RENDERBUFFER, ViewRenderbuffer);
 
CIrrDeviceiOS.mm

Code: Select all

 
// remove 'video::SExposedVideoData& data' from functions below
createOGLES1Driver(...) & createOGLES2Driver(...)
 
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: setFrameLoop causing performance issue?

Post by Nadro »

Hi, those changes are fine. Today I finished my dev platform upgrade and I can back to irr development :) Anyway I will be not able to touch iOS related parts before next week. I have to finish existing tasks.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
cww
Posts: 27
Joined: Sun Jul 28, 2013 1:29 pm

Re: setFrameLoop causing performance issue?

Post by cww »

Thanks for all the awesome works :wink:
Post Reply