Jump to content

  • Log In with Google      Sign In   
  • Create Account

Alundra

Member Since 19 Jul 2011
Offline Last Active Today, 07:32 PM

Posts I've Made

In Topic: OpenGL 4.5 DSA and Dummy Window

17 October 2014 - 07:05 PM

One check and log message can be added surely if no one render window is set and init function of renderer is called surely, it's true.


In Topic: OpenGL 4.5 DSA and Dummy Window

17 October 2014 - 09:54 AM

Yea, it's more accurate, I was talking about the fact that Direct3D 11 split window and device/device context I was not clear how I said it.

I hope a day OpenGL will works like that to avoid a dummy context.


In Topic: OpenGL 4.5 DSA and Dummy Window

16 October 2014 - 06:33 PM

I initialize common engine data : box buffer for decal rendering, SSAO random texture, loading of shaders (converted from HLSL) and other stuff.

Then the user (or the editor) creates the RenderWindow which is the real context, the dummy is just there to init common data.

For the Direct3D 11 renderer the problem is not there because the device and device context is independent.


In Topic: OpenGL 4.5 DSA and Dummy Window

16 October 2014 - 03:51 PM

I do that actually :

// Dummy window/gl-context.
SDL_Window* DummyWindow = SDL_CreateWindow( "DummyWindow", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 240, 320, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL );
SDL_GLContext DummyGLContext = SDL_GL_CreateContext( DummyWindow );

...
INITIALIZATION OF RENDERER COMMON DATA
...

// Destroy the dummy window/gl-context.
SDL_GL_DeleteContext( DummyGLContext );
SDL_DestroyWindow( DummyWindow );

In Topic: OpenGL 4.5 DSA and Dummy Window

16 October 2014 - 03:02 PM

Ok, dummy context still be created to init an OpenGL Renderer.

I hope a day OpenGL will update that do be like Direct3D11.


PARTNERS