Direct OpenGL usage

If you have a nice feature idea: here is the place to discuss it.

Direct OpenGL usage

Postby Michael » February 24th, 2012, 9:07 am

I have seen that it is possible to use LGL3 structure to call OpenGL functions directly during rendering, however this breaks something in the rendering. If you add a possibility to use OpenGL in such way it could prove to be very effective at allowing things such as debug rendering and other debug information. I am actually a bit confused why such feature was not implemented from the beginning.
Michael
 
Posts: 2
Joined: February 16th, 2012, 4:11 pm

Re: Direct OpenGL usage

Postby SergeyK » February 24th, 2012, 4:40 pm

Actually it is possible to use OpenGL rendering directly, however the renderer doesn't know itself how to track the GL API renderstate. You should tell the renderer to reset the tracked state via call:

Code: Select all
Env->Renderer->SetState( Env->Renderer->GetEmptyShader() );


This will reset the tracked OpenGL state do the "empty" one. Hereafter the engine will now the current state and will continue the rendering appropriately.
SergeyK
Site Admin
 
Posts: 11
Joined: November 3rd, 2011, 8:14 am
Location: SPB


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron