void FGLRenderer::Initialize() { // Only needed for the core profile, because someone decided it was a good idea to remove the default VAO. if (gl.version >= 4.0) { glGenVertexArrays(1, &mVAOID); glBindVertexArray(mVAOID); } else mVAOID = 0; gllight = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/gllight.png"), FTexture::TEX_MiscPatch); glpart2 = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart2.png"), FTexture::TEX_MiscPatch); glpart = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart.png"), FTexture::TEX_MiscPatch); mirrortexture = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/mirror.png"), FTexture::TEX_MiscPatch); mVBO = new FFlatVertexBuffer; mSkyVBO = new FSkyVertexBuffer; if (gl.lightmethod != LM_SOFTWARE) mLights = new FLightBuffer(); else mLights = NULL; gl_RenderState.SetVertexBuffer(mVBO); mFBID = 0; mOldFBID = 0; SetupLevel(); mShaderManager = new FShaderManager; mSamplerManager = new FSamplerManager; gl_LoadModels(); }
void FGLRenderer::Initialize() { glpart2 = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart2.png"), FTexture::TEX_MiscPatch); glpart = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart.png"), FTexture::TEX_MiscPatch); mirrortexture = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/mirror.png"), FTexture::TEX_MiscPatch); mVBO = new FFlatVertexBuffer; mSkyVBO = new FSkyVertexBuffer; mLights = new FLightBuffer(); gl_RenderState.SetVertexBuffer(mVBO); mFBID = 0; SetupLevel(); mShaderManager = new FShaderManager; mSamplerManager = new FSamplerManager; gl_LoadModels(); }