public void Init() { m_graphicsContext = RigelEngineApp.App.ContextGFX.CreateGraphicsContext(null); Console.WriteLine(m_graphicsContext); m_graphicsContext.CreateRenderTarget(RigelEngineApp.App.MainWindow.GetWindowHandler(), RigelEngineApp.App.WindowWidth, RigelEngineApp.App.WindowHeight); }
internal void LoadEntryPoints(GraphicsContextBase context) { this.context = context; Debug.Print("Loading OpenGL function pointers... "); AlphaFuncAddress = GetAddress("glAlphaFunc"); BindBufferAddress = GetAddress("glBindBuffer"); BindBufferARBAddress = GetAddress("glBindBufferARB"); BindTextureAddress = GetAddress("glBindTexture"); BlendFuncAddress = GetAddress("glBlendFunc"); BufferDataAddress = GetAddress("glBufferData"); BufferDataARBAddress = GetAddress("glBufferDataARB"); BufferSubDataAddress = GetAddress("glBufferSubData"); BufferSubDataARBAddress = GetAddress("glBufferSubDataARB"); ClearAddress = GetAddress("glClear"); ClearColorAddress = GetAddress("glClearColor"); ColorMaskAddress = GetAddress("glColorMask"); ColorPointerAddress = GetAddress("glColorPointer"); CullFaceAddress = GetAddress("glCullFace"); DeleteBuffersAddress = GetAddress("glDeleteBuffers"); DeleteBuffersARBAddress = GetAddress("glDeleteBuffersARB"); DeleteTexturesAddress = GetAddress("glDeleteTextures"); DepthFuncAddress = GetAddress("glDepthFunc"); DepthMaskAddress = GetAddress("glDepthMask"); DisableAddress = GetAddress("glDisable"); DisableClientStateAddress = GetAddress("glDisableClientState"); DrawArraysAddress = GetAddress("glDrawArrays"); DrawElementsAddress = GetAddress("glDrawElements"); EnableAddress = GetAddress("glEnable"); EnableClientStateAddress = GetAddress("glEnableClientState"); FogfAddress = GetAddress("glFogf"); FogfvAddress = GetAddress("glFogfv"); FogiAddress = GetAddress("glFogi"); GenBuffersAddress = GetAddress("glGenBuffers"); GenBuffersARBAddress = GetAddress("glGenBuffersARB"); GenTexturesAddress = GetAddress("glGenTextures"); GetErrorAddress = GetAddress("glGetError"); GetFloatvAddress = GetAddress("glGetFloatv"); GetIntegervAddress = GetAddress("glGetIntegerv"); GetStringAddress = GetAddress("glGetString"); GetTexImageAddress = GetAddress("glGetTexImage"); HintAddress = GetAddress("glHint"); LoadIdentityAddress = GetAddress("glLoadIdentity"); LoadMatrixfAddress = GetAddress("glLoadMatrixf"); MatrixModeAddress = GetAddress("glMatrixMode"); MultMatrixfAddress = GetAddress("glMultMatrixf"); PopMatrixAddress = GetAddress("glPopMatrix"); PushMatrixAddress = GetAddress("glPushMatrix"); ReadPixelsAddress = GetAddress("glReadPixels"); ShadeModelAddress = GetAddress("glShadeModel"); TexCoordPointerAddress = GetAddress("glTexCoordPointer"); TexImage2DAddress = GetAddress("glTexImage2D"); TexParameteriAddress = GetAddress("glTexParameteri"); TexSubImage2DAddress = GetAddress("glTexSubImage2D"); VertexPointerAddress = GetAddress("glVertexPointer"); ViewportAddress = GetAddress("glViewport"); }
internal void LoadEntryPoints( GraphicsContextBase context ) { this.context = context; Debug.Print("Loading OpenGL function pointers... "); AlphaFuncAddress = GetAddress( "glAlphaFunc" ); BindBufferAddress = GetAddress( "glBindBuffer" ); BindBufferARBAddress = GetAddress( "glBindBufferARB" ); BindTextureAddress = GetAddress( "glBindTexture" ); BlendFuncAddress = GetAddress( "glBlendFunc" ); BufferDataAddress = GetAddress( "glBufferData" ); BufferDataARBAddress = GetAddress( "glBufferDataARB" ); BufferSubDataAddress = GetAddress( "glBufferSubData" ); BufferSubDataARBAddress = GetAddress( "glBufferSubDataARB" ); ClearAddress = GetAddress( "glClear" ); ClearColorAddress = GetAddress( "glClearColor" ); ColorMaskAddress = GetAddress( "glColorMask" ); ColorPointerAddress = GetAddress( "glColorPointer" ); CullFaceAddress = GetAddress( "glCullFace" ); DeleteBuffersAddress = GetAddress( "glDeleteBuffers" ); DeleteBuffersARBAddress = GetAddress( "glDeleteBuffersARB" ); DeleteTexturesAddress = GetAddress( "glDeleteTextures" ); DepthFuncAddress = GetAddress( "glDepthFunc" ); DepthMaskAddress = GetAddress( "glDepthMask" ); DisableAddress = GetAddress( "glDisable" ); DisableClientStateAddress = GetAddress( "glDisableClientState" ); DrawArraysAddress = GetAddress( "glDrawArrays" ); DrawElementsAddress = GetAddress( "glDrawElements" ); EnableAddress = GetAddress( "glEnable" ); EnableClientStateAddress = GetAddress( "glEnableClientState" ); FogfAddress = GetAddress( "glFogf" ); FogfvAddress = GetAddress( "glFogfv" ); FogiAddress = GetAddress( "glFogi" ); GenBuffersAddress = GetAddress( "glGenBuffers" ); GenBuffersARBAddress = GetAddress( "glGenBuffersARB" ); GenTexturesAddress = GetAddress( "glGenTextures" ); GetErrorAddress = GetAddress( "glGetError" ); GetFloatvAddress = GetAddress( "glGetFloatv" ); GetIntegervAddress = GetAddress( "glGetIntegerv" ); GetStringAddress = GetAddress( "glGetString" ); HintAddress = GetAddress( "glHint" ); LoadIdentityAddress = GetAddress( "glLoadIdentity" ); LoadMatrixfAddress = GetAddress( "glLoadMatrixf" ); MatrixModeAddress = GetAddress( "glMatrixMode" ); MultMatrixfAddress = GetAddress( "glMultMatrixf" ); PopMatrixAddress = GetAddress( "glPopMatrix" ); PushMatrixAddress = GetAddress( "glPushMatrix" ); ReadPixelsAddress = GetAddress( "glReadPixels" ); ShadeModelAddress = GetAddress( "glShadeModel" ); TexCoordPointerAddress = GetAddress( "glTexCoordPointer" ); TexImage2DAddress = GetAddress( "glTexImage2D" ); TexParameteriAddress = GetAddress( "glTexParameteri" ); TexSubImage2DAddress = GetAddress( "glTexSubImage2D" ); VertexPointerAddress = GetAddress( "glVertexPointer" ); ViewportAddress = GetAddress( "glViewport" ); PolygonModeAddress = GetAddress( "glPolygonMode" ); }
internal void LoadEntryPoints(GraphicsContextBase context) { this.context = context; Debug.Print("Loading OpenGL function pointers... "); AlphaFuncAddress = GetAddress("glAlphaFunc"); BeginAddress = GetAddress("glBegin"); BindBufferAddress = GetAddress("glBindBuffer"); BindBufferARBAddress = GetAddress("glBindBufferARB"); BindTextureAddress = GetAddress("glBindTexture"); BlendColorAddress = GetAddress("glBlendColor"); BlendEquationAddress = GetAddress("glBlendEquation"); BlendEquationSeparateAddress = GetAddress("glBlendEquationSeparate"); BlendFuncAddress = GetAddress("glBlendFunc"); BlendFuncSeparateAddress = GetAddress("glBlendFuncSeparate"); BufferDataAddress = GetAddress("glBufferData"); BufferDataARBAddress = GetAddress("glBufferDataARB"); BufferSubDataAddress = GetAddress("glBufferSubData"); BufferSubDataARBAddress = GetAddress("glBufferSubDataARB"); CallListAddress = GetAddress("glCallList"); ClearAddress = GetAddress("glClear"); ClearColorAddress = GetAddress("glClearColor"); Color4ubAddress = GetAddress("glColor4ub"); ColorMaskAddress = GetAddress("glColorMask"); ColorPointerAddress = GetAddress("glColorPointer"); CullFaceAddress = GetAddress("glCullFace"); DeleteBuffersAddress = GetAddress("glDeleteBuffers"); DeleteBuffersARBAddress = GetAddress("glDeleteBuffersARB"); DeleteListsAddress = GetAddress("glDeleteLists"); DeleteTexturesAddress = GetAddress("glDeleteTextures"); DepthFuncAddress = GetAddress("glDepthFunc"); DepthMaskAddress = GetAddress("glDepthMask"); DisableAddress = GetAddress("glDisable"); DisableClientStateAddress = GetAddress("glDisableClientState"); DrawArraysAddress = GetAddress("glDrawArrays"); DrawElementsAddress = GetAddress("glDrawElements"); EnableAddress = GetAddress("glEnable"); EnableClientStateAddress = GetAddress("glEnableClientState"); EndAddress = GetAddress("glEnd"); EndListAddress = GetAddress("glEndList"); FogfAddress = GetAddress("glFogf"); FogfvAddress = GetAddress("glFogfv"); FogiAddress = GetAddress("glFogi"); GenBuffersAddress = GetAddress("glGenBuffers"); GenBuffersARBAddress = GetAddress("glGenBuffersARB"); GenListsAddress = GetAddress("glGenLists"); GenTexturesAddress = GetAddress("glGenTextures"); GetErrorAddress = GetAddress("glGetError"); GetFloatvAddress = GetAddress("glGetFloatv"); GetIntegervAddress = GetAddress("glGetIntegerv"); GetStringAddress = GetAddress("glGetString"); GetTexImageAddress = GetAddress("glGetTexImage"); HintAddress = GetAddress("glHint"); LightfAddress = GetAddress("glLightf"); LightfvAddress = GetAddress("glLightfv"); LightiAddress = GetAddress("glLighti"); LightivAddress = GetAddress("glLightiv"); LightModelfAddress = GetAddress("glLightModelf"); LightModelfvAddress = GetAddress("glLightModelfv"); LightModeliAddress = GetAddress("glLightModeli"); LightModelivAddress = GetAddress("glLightModeliv"); //LineStippleAddress = GetAddress( "glLineStipple" ); LineWidthAddress = GetAddress("glLineWidth"); LoadIdentityAddress = GetAddress("glLoadIdentity"); LoadMatrixfAddress = GetAddress("glLoadMatrixf"); MatrixModeAddress = GetAddress("glMatrixMode"); MultMatrixfAddress = GetAddress("glMultMatrixf"); NewListAddress = GetAddress("glNewList"); Normal3fAddress = GetAddress("glNormal3f"); Normal3iAddress = GetAddress("glNormal3i"); NormalPointerAddress = GetAddress("glNormalPointer"); PopMatrixAddress = GetAddress("glPopMatrix"); PushMatrixAddress = GetAddress("glPushMatrix"); ReadPixelsAddress = GetAddress("glReadPixels"); ShadeModelAddress = GetAddress("glShadeModel"); TexCoord2fAddress = GetAddress("glTexCoord2f"); TexCoordPointerAddress = GetAddress("glTexCoordPointer"); TexEnvfAddress = GetAddress("glTexEnvf"); TexEnvfvAddress = GetAddress("glTexEnvfv"); TexEnviAddress = GetAddress("glTexEnvi"); TexEnvivAddress = GetAddress("glTexEnviv"); TexImage2DAddress = GetAddress("glTexImage2D"); TexParameteriAddress = GetAddress("glTexParameteri"); TexSubImage2DAddress = GetAddress("glTexSubImage2D"); Vertex3fAddress = GetAddress("glVertex3f"); VertexPointerAddress = GetAddress("glVertexPointer"); ViewportAddress = GetAddress("glViewport"); //TexEnvAddress = GetAddress("glTexEnv" ); }