public void Initalise(IPlatformGraphicsDevice graphicsDevice, ResourceManager resourceManager) { m_ResourceManager = resourceManager; m_GraphicsDevice = graphicsDevice; // Load Context { IntPtr context = ImGui.CreateContext(); ImGui.SetCurrentContext(context); } // Load Fonts { var fonts = ImGui.GetIO().Fonts; ImGui.GetIO().Fonts.AddFontDefault(); } // Load Graphics Resources { m_ShaderProgram = m_ResourceManager.LoadShaderFromString(this.vertShaderCode, this.fragShaderCode); m_VertexArrayObject = m_ResourceManager.LoadVAO <VertexImGui>(m_Verts, m_Indicies32, VertexImGui.Stride, VertexImGui.AttributeLengths, VertexImGui.AttributeOffsets, OpenGL.BufferUsageHint.GL_DYNAMIC_DRAW); SetKeyMappings(); BuildFontAtlas(); CreateTexture(); } }
internal void Init(IPlatformAudioDevice audioDevice, IPlatformGraphicsDevice graphicsDevice, GameWindow window, GameInput input) { Window = window; Audio = audioDevice; GraphicsDevice = graphicsDevice; Input = input; m_RenderQueue = new RenderQueue(graphicsDevice); DependancyLocator.AddDepenancy(Window); DependancyLocator.AddDepenancy(Audio); DependancyLocator.AddDepenancy(GraphicsDevice); DependancyLocator.AddDepenancy(Input); }
public RenderQueue(IPlatformGraphicsDevice graphicsDevice) { m_Graphics = graphicsDevice; }