SpiderPig Posted November 17, 2012 Share Posted November 17, 2012 I use OpenGL to render my sprites which work fine with the framework commands except for Godrays and DOF. The process is first initiated by the following code; void Begin(void) { int vPort[4]; glGetIntegerv(GL_VIEWPORT, vPort); // Set the projection glOrtho(0, vPort[2], vPort[3], 0, 1.0, 1000.0);/ // Reset transformation glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glEnableClientState(GL_VERTEX_ARRAY); //glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_CULL_FACE); glCullFace(GL_BACK); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); } void End(void) { glMatrixMode(GL_MODELVIEW); glPopMatrix(); //glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); glDisable(GL_CULL_FACE); glColor4f(1.0, 1.0, 1.0, 1.0); } I've had this problem for some time time now and I have worked around it by simply not using Godrays or DOF. Can anyone please confirm that the code above is all there? Oh, and I call Begin() right after RenderFramework() too. Thanks Quote Link to comment Share on other sites More sharing options...
ChrisMAN Posted November 17, 2012 Share Posted November 17, 2012 I don't really know opengl but this is the canonical leadwerks article. http://www.leadwerks.com/werkspace/page/tutorials/_/programming/using-opengl-for-drawing-r19 You might have to use a custom buffer and draw that onto the back buffer. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted November 17, 2012 Author Share Posted November 17, 2012 Thanks for that. When looking through the comments I found this link: http://www.leadwerks.com/werkspace/topic/1332-renderframework-in-2-parts/#entry12297 Seems that it's a problem within the actual framework. I wonder if Josh has had any thoughts on the Idea..... Quote Link to comment Share on other sites More sharing options...
Josh Posted November 17, 2012 Share Posted November 17, 2012 Rendering all those effects is extremely complicated. It's not something I can just separate into two parts. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted November 18, 2012 Author Share Posted November 18, 2012 Do you know of a workaround solution then? Or is it simply "don't use openGL with framework"? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.