mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Remove last OpenGL call outside of OpenGLApi class.
This commit is contained in:
parent
04ba5b9a0f
commit
b1690d75ab
@ -10,7 +10,6 @@ using ClassicalSharp.Particles;
|
||||
using ClassicalSharp.Renderers;
|
||||
using ClassicalSharp.Selections;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
using OpenTK.Input;
|
||||
|
||||
namespace ClassicalSharp {
|
||||
@ -328,7 +327,7 @@ namespace ClassicalSharp {
|
||||
|
||||
protected override void OnResize( EventArgs e ) {
|
||||
base.OnResize( e );
|
||||
GL.Viewport( ClientRectangle );
|
||||
Graphics.OnWindowResize( Width, Height );
|
||||
UpdateProjection();
|
||||
if( activeScreen != null ) {
|
||||
activeScreen.OnResize( width, height, Width, Height );
|
||||
|
@ -196,6 +196,8 @@ namespace ClassicalSharp.GraphicsAPI {
|
||||
public virtual void PrintApiSpecificInfo() {
|
||||
}
|
||||
|
||||
public abstract void OnWindowResize( int newWidth, int newHeight );
|
||||
|
||||
public virtual void Draw2DQuad( float x, float y, float width, float height, FastColour col ) {
|
||||
VertexPos3fCol4b[] vertices = {
|
||||
new VertexPos3fCol4b( x + width, y, 0, col ),
|
||||
|
@ -618,6 +618,9 @@ namespace ClassicalSharp.GraphicsAPI {
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnWindowResize( int newWidth, int newHeight ) {
|
||||
GL.Viewport( 0, 0, newWidth, newHeight );
|
||||
}
|
||||
|
||||
public Color4 GetCol() {
|
||||
float[] col = new float[4];
|
||||
|
Loading…
x
Reference in New Issue
Block a user