Page 1 of 2

OpenGL 4?

Posted: Mon Sep 23, 2013 12:11 am
by cat.exe
Here's a noob question:

How could I get Irrlicht to run using OGL 4.3 (which I believe is the current version?)

Would it just be a matter of modifying and recompiling the DLLs?


Thanks.

Re: OpenGL 4?

Posted: Mon Sep 23, 2013 12:40 am
by Cube_
Oh, it's quite simple, you have to rewrite the Irrlicht OpenGL "driver" as it currently does not support OpenGL 4.x

Re: OpenGL 4?

Posted: Mon Sep 23, 2013 8:08 am
by roxaz
aaammmsterdddam wrote:Oh, it's quite simple, you have to rewrite the Irrlicht OpenGL "driver" as it currently does not support OpenGL 4.x
i believe you have made a mistake in this statement, you should have said:
aaammmsterdddam wrote:Oh, it's quite "simple", you have to rewrite the Irrlicht OpenGL "driver" as it currently does not support OpenGL 4.x
:D

Re: OpenGL 4?

Posted: Mon Sep 23, 2013 9:40 am
by Cube_
roxaz wrote:
aaammmsterdddam wrote:Oh, it's quite simple, you have to rewrite the Irrlicht OpenGL "driver" as it currently does not support OpenGL 4.x
i believe you have made a mistake in this statement, you should have said:
aaammmsterdddam wrote:Oh, it's quite "simple", you have to rewrite the Irrlicht OpenGL "driver" as it currently does not support OpenGL 4.x
:D
Ah yes, I really should have emphasized the sarcasm, shouldn't I.... ah well, you did it for me, saved me a "bunch" of work

Re: OpenGL 4?

Posted: Mon Sep 23, 2013 8:45 pm
by cat.exe
Cool. Shouldn't take more than a few minutes.

But really, thanks. I'll just stick with what I have ;)

Re: OpenGL 4?

Posted: Tue Sep 24, 2013 6:53 am
by xt_hydra

Code: Select all

#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
//! SDL constructor and init code
COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params,
        io::IFileSystem* io, CIrrDeviceSDL* device)
: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(),
    CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
    Transformation3DChanged(true), AntiAlias(params.AntiAlias),
    RenderTargetTexture(0), CurrentRendertargetSize(0,0),
    ColorFormat(ECF_R8G8B8), CurrentTarget(ERT_FRAME_BUFFER), Params(params),
    BridgeCalls(0), SDLDevice(device), DeviceType(EIDT_SDL)
{
    #ifdef _DEBUG
    setDebugName("COpenGLDriver");
    #endif
 
    #ifdef _IRR_COMPILE_WITH_CG_
    CgContext = 0;
    #endif
    glewInit();
    genericDriverInit();
}
 

Code: Select all

 
#include "CIrrDeviceSDL.h"
 
    irr::SIrrlichtCreationParameters param;
    param.DriverType = video::EDT_OPENGL;
    param.WindowSize = core::dimension2di(1280,720);
    param.Fullscreen = false;
    param.Vsync = false;
    param.Bits = 16;
    param.AntiAlias = false;
    irr::IrrlichtDevice * device = new CIrrDeviceSDL(param);
 

Re: OpenGL 4?

Posted: Wed Sep 25, 2013 2:03 am
by Cube_
And that code serves what purpose? Just from the length of code I can tell it isn't an adequate replacement.

Re: OpenGL 4?

Posted: Wed Sep 25, 2013 5:44 am
by JannoT
Why not? It creates a SDL "device" and SDL is not tied to any OpenGL version, it only creates the context so it could probably give you OGL4.

Re: OpenGL 4?

Posted: Wed Sep 25, 2013 11:57 am
by hybrid
Irrlicht will with any OpenGL driver your system provides. At least chances are really high that it will. You need a compatibility mode, though, but that is provided by any driver out there. So Irrlicht in its current form will be compatible with OpenGL 1.1 up to 4.x. 1.0 would also work but has some texture problems. Versions starting from 3.x up lack certain feature support. But all features that Irrlicht supports are also rendered by those OpenGL versions.

Re: OpenGL 4?

Posted: Thu Sep 26, 2013 3:01 am
by Cube_
Yeah but what he wanted was full OpenGL 4.3 support, or that is what I presume he wanted, and afaik irr doesn't support all those

JannoT, I don't *think* it'll work but who knows, you might know the irlicht engine better than me, I honestly don't know it well enough to be a trustworthy source, I think the best way, aside from asking one of the really good Irrlicht users, is to test it.
So I ask, is it as I think that xt_hydra's code snippet won't work as a replacement for the irrlicht OpenGL implementation?

Re: OpenGL 4?

Posted: Thu Sep 26, 2013 1:50 pm
by xt_hydra
aaammmsterdddam wrote:So I ask, is it as I think that xt_hydra's code snippet won't work as a replacement for the irrlicht OpenGL implementation?
well yes cause thats how i use GLEW in irrlicht
my irrlicht project is containing GLEW.C and im building GLEW within irrlicht

do you want me to upload it on github?

Re: OpenGL 4?

Posted: Thu Sep 26, 2013 7:40 pm
by cat.exe
It's fine, thanks. I'll tweak and test with it myself (and maybe use 4.3.)

Re: OpenGL 4?

Posted: Fri Sep 27, 2013 12:50 am
by Cube_
xt_hydra wrote:
aaammmsterdddam wrote:So I ask, is it as I think that xt_hydra's code snippet won't work as a replacement for the irrlicht OpenGL implementation?
well yes cause thats how i use GLEW in irrlicht
my irrlicht project is containing GLEW.C and im building GLEW within irrlicht

do you want me to upload it on github?
your implementation is surely interesting, if you'd like to share it then that's great :D (So, if I got it right that actually manages to implement the full OpenGL 4.x implementation?), I already have GLEW so I don't think compiling it would be much of a problem tbh

Re: OpenGL 4?

Posted: Fri Sep 27, 2013 7:44 am
by xt_hydra
aaammmsterdddam wrote:
xt_hydra wrote:
aaammmsterdddam wrote:So I ask, is it as I think that xt_hydra's code snippet won't work as a replacement for the irrlicht OpenGL implementation?
well yes cause thats how i use GLEW in irrlicht
my irrlicht project is containing GLEW.C and im building GLEW within irrlicht

do you want me to upload it on github?
your implementation is surely interesting, if you'd like to share it then that's great :D (So, if I got it right that actually manages to implement the full OpenGL 4.x implementation?), I already have GLEW so I don't think compiling it would be much of a problem tbh
WELL...my first guess is if you replace "GL/gl.h" with "GL/glew.h" .......you imminently have access to the new extensions.... if thats what you are asking?

https://github.com/xthydra/irrlicht/com ... 04481872d7

**EDIT

oops i forgot those files too

https://github.com/xthydra/irrlicht/com ... dcbae238c4

**EDIT2

also for anyone that would come here to bash me for compiling their projects files within irrlicht is a bad idea

you can just ignore "irrlicht.cpp" change and "irrxml.cpp"
pragma link glew.lib and use preproccessor "GLEW_STATIC" instead of "GLEW_BUILD"...i believe.......lol
Image

Re: OpenGL 4?

Posted: Fri Sep 27, 2013 8:16 am
by Cube_
sweet, will play with that in the morning ^^ thanks for sharing.