More modern GL functions.

This commit is contained in:
UnknownShadow200 2015-04-06 06:28:53 +10:00
parent 652fdf4db2
commit db5c0ad84c
2 changed files with 18 additions and 1 deletions

View file

@ -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 ) {

View file

@ -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 );