Shaders, 2D Rendering and OpenGL Rendering

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
sigvatr
Posts: 9
Joined: Sat Aug 10, 2013 8:54 pm
Location: Brisbane, Australia
Contact:

Shaders, 2D Rendering and OpenGL Rendering

Post by sigvatr »

Hi, I asked this question in the IRC channel but no one had any helpful advice:

Code: Select all

[21:18:54] <sigvatr> hi there
[21:18:56] <sigvatr> i need a bit of help
[21:19:04] <sigvatr> i'm trying to apply a shader to 2d drawing operations
[21:19:06] <sigvatr> but i can't figure it out
[21:19:15] <sigvatr> i can apply a shader with a material to regular 3d rendering
[21:19:30] <sigvatr> but i need to figure out a way to apply shaders to 2d drawing operations
[21:19:38] <sigvatr> ie, full screen frame buffer shaders
[21:19:39] <sigvatr> and
[21:20:01] <sigvatr> a custom bitmap font renderer i wrote, where individual characters can have different shader parameters applied to them
[21:20:04] <sigvatr> anyone able to help?
So basically, I want to make use of 2d rendering with GLSL shaders, specifically for tilesheets, sprite animations and my own custom bitmap font renderer. I have a lot of experience with straight forward OpenGL and can do this without Irrlicht, but I can't figure out a way to "turn off" Irrlicht rendering temporarily to do my straight forward OpenGL rendering without Irrlicht calls and functionality.

Is there a way for me to "suspend" Irrlicht rendering temporarily and use plain old-fashioned OpenGL? That would be the best way for me to do this. I want to use Irrlicht for the 3D functionality, but I have written plenty of my own 2D OpenGL code that I want to use too.

Cheers.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Shaders, 2D Rendering and OpenGL Rendering

Post by Nadro »

Hi,

You should create own fullsreen quad scene node, assign a shader for them and next render this node.

Cheers,
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply