OpenGL 4?

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.
cat.exe
Posts: 34
Joined: Sat Sep 14, 2013 11:52 pm

OpenGL 4?

Post 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.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: OpenGL 4?

Post by Cube_ »

Oh, it's quite simple, you have to rewrite the Irrlicht OpenGL "driver" as it currently does not support OpenGL 4.x
"this is not the bottleneck you are looking for"
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Re: OpenGL 4?

Post 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
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: OpenGL 4?

Post 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
"this is not the bottleneck you are looking for"
cat.exe
Posts: 34
Joined: Sat Sep 14, 2013 11:52 pm

Re: OpenGL 4?

Post by cat.exe »

Cool. Shouldn't take more than a few minutes.

But really, thanks. I'll just stick with what I have ;)
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: OpenGL 4?

Post 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);
 
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: OpenGL 4?

Post by Cube_ »

And that code serves what purpose? Just from the length of code I can tell it isn't an adequate replacement.
"this is not the bottleneck you are looking for"
JannoT
Posts: 1
Joined: Sat Jan 03, 2009 8:12 am

Re: OpenGL 4?

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: OpenGL 4?

Post 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.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: OpenGL 4?

Post 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?
"this is not the bottleneck you are looking for"
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: OpenGL 4?

Post 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?
cat.exe
Posts: 34
Joined: Sat Sep 14, 2013 11:52 pm

Re: OpenGL 4?

Post by cat.exe »

It's fine, thanks. I'll tweak and test with it myself (and maybe use 4.3.)
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: OpenGL 4?

Post 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
"this is not the bottleneck you are looking for"
xt_hydra
Posts: 12
Joined: Sun Jul 08, 2012 2:39 pm

Re: OpenGL 4?

Post 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
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: OpenGL 4?

Post by Cube_ »

sweet, will play with that in the morning ^^ thanks for sharing.
"this is not the bottleneck you are looking for"
Post Reply