mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 17:12:25 -05:00
More modern GL functions.
This commit is contained in:
parent
652fdf4db2
commit
db5c0ad84c
2 changed files with 18 additions and 1 deletions
|
@ -70,6 +70,23 @@ namespace ClassicalSharp.GraphicsAPI {
|
|||
GL.VertexAttrib4( attribLoc, v );
|
||||
}
|
||||
|
||||
public void SetVertexAttribPointerFloat( int attribLoc, int numComponents, int stride, int offset ) {
|
||||
GL.VertexAttribPointer( attribLoc, numComponents, VertexAttribPointerType.Float, false, stride, new IntPtr( offset ) );
|
||||
}
|
||||
|
||||
public void SetVertexAttribPointer( int attribLoc, int numComponents,
|
||||
VertexAttribPointerType type, bool normalise, int stride, int offset ) {
|
||||
GL.VertexAttribPointer( attribLoc, numComponents, type, normalise, stride, new IntPtr( offset ) );
|
||||
}
|
||||
|
||||
public void EnableVertexAttribArray( int attribLoc ) {
|
||||
GL.EnableVertexAttribArray( attribLoc );
|
||||
}
|
||||
|
||||
public void DisableVertexAttribArray( int attribLoc ) {
|
||||
GL.DisableVertexAttribArray( attribLoc );
|
||||
}
|
||||
|
||||
// Booooo, no direct state access for OpenGL 2.0.
|
||||
|
||||
public void SetUniform( int uniformLoc, ref float value ) {
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace ClassicalSharp.Renderers {
|
|||
|
||||
public override void Render( double deltaTime ) {
|
||||
if( Map.IsNotLoaded ) return;
|
||||
|
||||
|
||||
Vector3 pos = Window.LocalPlayer.EyePosition;
|
||||
if( pos.Y < Map.Height + skyOffset ) {
|
||||
Graphics.DrawVbPos3fCol4b( DrawMode.Triangles, skyVbo, skyVertices );
|
||||
|
|
Loading…
Reference in a new issue