Skip to content
Browse files

Fix compile warnings in Examples.

This commit fixes every current warning in the Example code bar two.
Both due to the use of the OpenTK.GameWindow.Joysticks.
  • Loading branch information...
1 parent 172462d commit 54f1e575d085deac02032c3044ef03e62f992574 @Frassle Frassle committed Feb 22, 2014
Showing with 59 additions and 60 deletions.
  1. +1 −1 Source/Examples/OpenGL/1.x/DisplayLists.cs
  2. +2 −3 Source/Examples/OpenGL/1.x/FramebufferObject.cs
  3. +1 −1 Source/Examples/OpenGL/1.x/ImmediateMode.cs
  4. +3 −3 Source/Examples/OpenGL/1.x/Picking.cs
  5. +1 −1 Source/Examples/OpenGL/1.x/StencilCSG.cs
  6. +1 −1 Source/Examples/OpenGL/1.x/TextRendering.cs
  7. +1 −1 Source/Examples/OpenGL/1.x/TextureMatrix.cs
  8. +1 −1 Source/Examples/OpenGL/1.x/Textures.cs
  9. +1 −1 Source/Examples/OpenGL/1.x/VBODynamic.cs
  10. +1 −1 Source/Examples/OpenGL/1.x/VBOStatic.cs
  11. +1 −1 Source/Examples/OpenGL/1.x/VertexArrays.cs
  12. +1 −1 Source/Examples/OpenGL/1.x/VertexLighting.cs
  13. +2 −2 Source/Examples/OpenGL/2.x/DDSCubeMap.cs
  14. +4 −4 Source/Examples/OpenGL/2.x/GeometryShader.cs
  15. +7 −7 Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs
  16. +3 −3 Source/Examples/OpenGL/2.x/JuliaSetFractal.cs
  17. +1 −1 Source/Examples/OpenGL/2.x/SimpleGLSL.cs
  18. +4 −4 Source/Examples/OpenGL/2.x/SwizzledParallax.cs
  19. +1 −1 Source/Examples/OpenTK/GLControl/GLControlGameLoop.cs
  20. +1 −1 Source/Examples/OpenTK/GameWindow/GameWindowMsaa.cs
  21. +1 −1 Source/Examples/OpenTK/GameWindow/GameWindowSimple.cs
  22. +1 −1 Source/Examples/OpenTK/GameWindow/GameWindowThreaded.cs
  23. +1 −1 Source/Examples/OpenTK/Test/TestShaderUtf8Support.cs
  24. +7 −7 Source/Examples/Shapes/Base/DrawableShape.cs
  25. +2 −2 Source/Examples/Shapes/Capsule.cs
  26. +2 −2 Source/Examples/Shapes/ChamferCube.cs
  27. +1 −1 Source/Examples/Shapes/Helpers/VboShape.cs
  28. +1 −1 Source/Examples/Shapes/KochTetrahedron.cs
  29. +1 −1 Source/Examples/Shapes/MengerSponge.cs
  30. +1 −1 Source/Examples/Shapes/Old/SierpinskiTetrahedron.cs
  31. +1 −1 Source/Examples/Shapes/SlicedHose.cs
  32. +1 −1 Source/Examples/Shapes/SlicedSphere.cs
  33. +1 −1 Source/Examples/Shapes/TorusKnot.cs
View
2 Source/Examples/OpenGL/1.x/DisplayLists.cs
@@ -65,7 +65,7 @@ protected override void OnLoad(EventArgs e)
GL.Rotate(c * 360.0f, 0.0, 0.0, 1.0);
GL.Translate(5.0, 0.0, 0.0);
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
GL.Vertex3(-1.0f, -1.0f, 1.0f);
GL.Vertex3(1.0f, -1.0f, 1.0f);
View
5 Source/Examples/OpenGL/1.x/FramebufferObject.cs
@@ -39,7 +39,6 @@ protected override void OnLoad(EventArgs e)
{
throw new NotSupportedException(
"GL_EXT_framebuffer_object extension is required. Please update your drivers.");
- Exit();
}
Object = new Shapes.TorusKnot(256, 16, 0.2, 7,8, 1, true);
@@ -234,7 +233,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
// Draw the Color Texture
GL.Translate(-1.1f, 0f, 0f);
GL.BindTexture(TextureTarget.Texture2D, ColorTexture);
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
{
GL.TexCoord2(0f, 1f);
GL.Vertex2(-1.0f, 1.0f);
@@ -250,7 +249,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
// Draw the Depth Texture
GL.Translate(+2.2f, 0f, 0f);
GL.BindTexture(TextureTarget.Texture2D, DepthTexture);
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
{
GL.TexCoord2(0f, 1f);
GL.Vertex2(-1.0f, 1.0f);
View
2 Source/Examples/OpenGL/1.x/ImmediateMode.cs
@@ -127,7 +127,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
private void DrawCube()
{
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
GL.Color3(Color.Silver);
GL.Vertex3(-1.0f, -1.0f, -1.0f);
View
6 Source/Examples/OpenGL/1.x/Picking.cs
@@ -65,7 +65,7 @@ struct Vertex
const TextureTarget Target = TextureTarget.TextureRectangleArb;
float angle;
- BeginMode VBO_PrimMode;
+ PrimitiveType VBO_PrimMode;
Vertex[] VBO_Array;
uint VBO_Handle;
@@ -235,7 +235,7 @@ protected override void OnUpdateFrame(FrameEventArgs e)
protected override void OnRenderFrame(FrameEventArgs e)
{
GL.Color3(Color.White);
- GL.EnableClientState(EnableCap.ColorArray);
+ GL.EnableClientState(ArrayCap.ColorArray);
#region Pass 1: Draw Object and pick Triangle
GL.ClearColor(1f, 1f, 1f, 1f); // clears to uint.MaxValue
@@ -261,7 +261,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
#endregion Pass 1: Draw Object and pick Triangle
GL.Color3(Color.White);
- GL.DisableClientState(EnableCap.ColorArray);
+ GL.DisableClientState(ArrayCap.ColorArray);
#region Pass 2: Draw Shape
if (SelectedTriangle == uint.MaxValue)
View
2 Source/Examples/OpenGL/1.x/StencilCSG.cs
@@ -145,7 +145,7 @@ protected override void OnLoad(EventArgs e)
#region Invert Operand B's Normals
// only the inside of the operand is ever drawn to color buffers and lighting requires this.
- BeginMode tempPrimMode;
+ PrimitiveType tempPrimMode;
VertexT2dN3dV3d[] tempVertices;
uint[] tempIndices;
View
2 Source/Examples/OpenGL/1.x/TextRendering.cs
@@ -234,7 +234,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Enable(EnableCap.Texture2D);
GL.BindTexture(TextureTarget.Texture2D, renderer.Texture);
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
GL.TexCoord2(0.0f, 1.0f); GL.Vertex2(-1f, -1f);
GL.TexCoord2(1.0f, 1.0f); GL.Vertex2(1f, -1f);
View
2 Source/Examples/OpenGL/1.x/TextureMatrix.cs
@@ -45,7 +45,7 @@ protected override void OnLoad(EventArgs e)
const int slices = 32;
const float distance = 0.25f;
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
for (float scale = 0.26f; scale < 5f; scale += distance)
for (int i = 0; i < slices; i++)
View
2 Source/Examples/OpenGL/1.x/Textures.cs
@@ -114,7 +114,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.LoadIdentity();
GL.BindTexture(TextureTarget.Texture2D, texture);
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
GL.TexCoord2(0.0f, 1.0f); GL.Vertex2(-0.6f, -0.4f);
GL.TexCoord2(1.0f, 1.0f); GL.Vertex2(0.6f, -0.4f);
View
2 Source/Examples/OpenGL/1.x/VBODynamic.cs
@@ -185,7 +185,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
// Fill newly allocated buffer
GL.BufferData(BufferTarget.ArrayBuffer, (IntPtr)(VertexC4ubV3f.SizeInBytes * MaxParticleCount), VBO, BufferUsageHint.StreamDraw);
// Only draw particles that are alive
- GL.DrawArrays(BeginMode.Points, MaxParticleCount - VisibleParticleCount, VisibleParticleCount);
+ GL.DrawArrays(PrimitiveType.Points, MaxParticleCount - VisibleParticleCount, VisibleParticleCount);
GL.PopMatrix();
View
2 Source/Examples/OpenGL/1.x/VBOStatic.cs
@@ -158,7 +158,7 @@ void Draw(Vbo handle)
GL.VertexPointer(3, VertexPointerType.Float, BlittableValueType.StrideOf(CubeVertices), new IntPtr(0));
GL.ColorPointer(4, ColorPointerType.UnsignedByte, BlittableValueType.StrideOf(CubeVertices), new IntPtr(12));
- GL.DrawElements(BeginMode.Triangles, handle.NumElements, DrawElementsType.UnsignedShort, IntPtr.Zero);
+ GL.DrawElements(PrimitiveType.Triangles, handle.NumElements, DrawElementsType.UnsignedShort, IntPtr.Zero);
}
/// <summary>
View
2 Source/Examples/OpenGL/1.x/VertexArrays.cs
@@ -153,7 +153,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
angle -= 360.0f;
GL.Rotate(angle, 0.0f, 1.0f, 0.0f);
- GL.DrawElements(BeginMode.Triangles, shape.Indices.Length,
+ GL.DrawElements(PrimitiveType.Triangles, shape.Indices.Length,
DrawElementsType.UnsignedInt, shape.Indices);
//GL.Begin(GL.Enums.BeginMode.TRIANGLES);
View
2 Source/Examples/OpenGL/1.x/VertexLighting.cs
@@ -143,7 +143,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Rotate(x_angle, 0.0f, 1.0f, 0.0f);
- GL.Begin(BeginMode.Triangles);
+ GL.Begin(PrimitiveType.Triangles);
foreach (int index in shape.Indices)
{
GL.Normal3(shape.Normals[index]);
View
4 Source/Examples/OpenGL/2.x/DDSCubeMap.cs
@@ -130,15 +130,15 @@ protected override void OnLoad(EventArgs e)
GL.DeleteShader( FragmentShaderObject );
int[] temp = new int[1];
- GL.GetProgram( ProgramObject, ProgramParameter.LinkStatus, out temp[0] );
+ GL.GetProgram(ProgramObject, GetProgramParameterName.LinkStatus, out temp[0]);
Trace.WriteLine( "Linking Program (" + ProgramObject + ") " + ( ( temp[0] == 1 ) ? "succeeded." : "FAILED!" ) );
if ( temp[0] != 1 )
{
GL.GetProgramInfoLog( ProgramObject, out LogInfo );
Trace.WriteLine( "Program Log:\n" + LogInfo );
}
- GL.GetProgram( ProgramObject, ProgramParameter.ActiveAttributes, out temp[0] );
+ GL.GetProgram(ProgramObject, GetProgramParameterName.ActiveAttributes, out temp[0]);
Trace.WriteLine( "Program registered " + temp[0] + " Attributes. (Should be 4: Pos, UV, Normal, Tangent)" );
Trace.WriteLine( "Tangent attribute bind location: " + GL.GetAttribLocation( ProgramObject, "AttributeTangent" ) );
View
8 Source/Examples/OpenGL/2.x/GeometryShader.cs
@@ -107,15 +107,15 @@ void main(void)
// Set the input type of the primitives we are going to feed the geometry shader, this should be the same as
// the primitive type given to GL.Begin. If the types do not match a GL error will occur (todo: verify GL_INVALID_ENUM, on glBegin)
- GL.Ext.ProgramParameter(shaderProgram, ExtGeometryShader4.GeometryInputTypeExt, (int)BeginMode.Lines);
+ GL.Ext.ProgramParameter(shaderProgram, AssemblyProgramParameterArb.GeometryInputType, (int)BeginMode.Lines);
// Set the output type of the geometry shader. Becasue we input Lines we will output LineStrip(s).
- GL.Ext.ProgramParameter(shaderProgram, ExtGeometryShader4.GeometryOutputTypeExt, (int)BeginMode.LineStrip);
+ GL.Ext.ProgramParameter(shaderProgram, AssemblyProgramParameterArb.GeometryOutputType, (int)BeginMode.LineStrip);
// We must tell the shader program how much vertices the geometry shader will output (at most).
// One simple way is to query the maximum and use that.
// NOTE: Make sure that the number of vertices * sum(components of active varyings) does not
// exceed MaxGeometryTotalOutputComponents.
- GL.Ext.ProgramParameter(shaderProgram, ExtGeometryShader4.GeometryVerticesOutExt, 50);
+ GL.Ext.ProgramParameter(shaderProgram, AssemblyProgramParameterArb.GeometryVerticesOut, 50);
// NOTE: calls to ProgramParameter do not take effect until you call LinkProgram.
GL.LinkProgram(shaderProgram);
@@ -211,7 +211,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
// draw two vertical lines
- GL.Begin(BeginMode.Lines);
+ GL.Begin(PrimitiveType.Lines);
{
// line one
GL.Vertex2(-0.5f, -0.5f);
View
14 Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs
@@ -352,10 +352,10 @@ void main( void )
int tmp;
GL.GetInteger((GetPName)ExtGeometryShader4.MaxGeometryOutputVerticesExt, out tmp);
- GL.Ext.ProgramParameter(shaderProgramCubemap, ExtGeometryShader4.GeometryVerticesOutExt, 18);
+ GL.Ext.ProgramParameter(shaderProgramCubemap, AssemblyProgramParameterArb.GeometryVerticesOut, 18);
- GL.Ext.ProgramParameter(shaderProgramCubemap, ExtGeometryShader4.GeometryInputTypeExt, (int)All.Triangles);
- GL.Ext.ProgramParameter(shaderProgramCubemap, ExtGeometryShader4.GeometryOutputTypeExt, (int)All.TriangleStrip);
+ GL.Ext.ProgramParameter(shaderProgramCubemap, AssemblyProgramParameterArb.GeometryInputType, (int)All.Triangles);
+ GL.Ext.ProgramParameter(shaderProgramCubemap, AssemblyProgramParameterArb.GeometryOutputType, (int)All.TriangleStrip);
// attach shaders and link the program.
GL.AttachShader(shaderProgramCubemap, frag);
@@ -623,7 +623,7 @@ void drawCubemapCross()
GL.PushMatrix();
GL.LoadIdentity();
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
// 0 -x
GL.TexCoord3(-1.0f, +1.0f, -1.0f);
@@ -705,7 +705,7 @@ void renderCubeVBO()
GL.TexCoordPointer(2, TexCoordPointerType.Float, vboCubeStride, new IntPtr(Vector3.SizeInBytes + Vector3.SizeInBytes));
//GL.Arb.DrawArraysInstanced(BeginMode.Triangles, 0, cubeData.Length/8, 1);
- GL.DrawArrays(BeginMode.Triangles, 0, cubeData.Length / (vboCubeStride / sizeof(float)));
+ GL.DrawArrays(PrimitiveType.Triangles, 0, cubeData.Length / (vboCubeStride / sizeof(float)));
GL.DisableClientState(ArrayCap.VertexArray);
GL.DisableClientState(ArrayCap.NormalArray);
@@ -725,7 +725,7 @@ void renderSphereVBO()
GL.TexCoordPointer(2, TexCoordPointerType.Float, vboSphereStride, new IntPtr(Vector3.SizeInBytes + Vector3.SizeInBytes));
GL.BindBuffer(BufferTarget.ElementArrayBuffer, eboSphere);
- GL.DrawElements(BeginMode.Triangles, 16 * 16 * 6, DrawElementsType.UnsignedShort, IntPtr.Zero);
+ GL.DrawElements(PrimitiveType.Triangles, 16 * 16 * 6, DrawElementsType.UnsignedShort, IntPtr.Zero);
//GL.Arb.DrawArraysInstanced(BeginMode.Triangles, 0, cubeData.Length/8, 1);
//GL.DrawArrays(BeginMode.Triangles, 0, sphereData.Length / (vboSphereStride / sizeof(float)));
@@ -758,7 +758,7 @@ void renderCubemap()
// Create 6 ModelViewProjection matrices, one to look in each direction
// proj with 90 degrees (1/2 pi) fov
// translate negative to place cam insize sphere
- Matrix4 model = Matrix4.Scale(-1) * Matrix4.CreateTranslation(spherePos);
+ Matrix4 model = Matrix4.CreateScale(-1) * Matrix4.CreateTranslation(spherePos);
Matrix4 proj = Matrix4.CreatePerspectiveFieldOfView(MathHelper.PiOver2, 1, 0.1f, 100f);
Matrix4[] m = new Matrix4[6];
View
6 Source/Examples/OpenGL/2.x/JuliaSetFractal.cs
@@ -158,11 +158,11 @@ protected override void OnLoad(EventArgs e)
}
#endregion Textures
- Keyboard.KeyUp += KeyUp;
+ Keyboard.KeyUp += Keyboard_KeyUp;
}
int i = 0;
- void KeyUp(object sender, KeyboardKeyEventArgs e)
+ void Keyboard_KeyUp(object sender, KeyboardKeyEventArgs e)
{
if (e.Key == Key.F12)
{
@@ -272,7 +272,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Uniform1(GL.GetUniformLocation(ProgramObject, "OFFSETY"), UniformOffsetY);
// Fullscreen quad. Using immediate mode, since this app is fragment shader limited anyways.
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
{
GL.Vertex2(-1.0f, -1.0f);
GL.Vertex2(1.0f, -1.0f);
View
2 Source/Examples/OpenGL/2.x/SimpleGLSL.cs
@@ -252,7 +252,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.ColorPointer(4, ColorPointerType.UnsignedByte, 0, IntPtr.Zero);
GL.BindBuffer(BufferTarget.ElementArrayBuffer, element_buffer_object);
- GL.DrawElements(BeginMode.Triangles, shape.Indices.Length,
+ GL.DrawElements(PrimitiveType.Triangles, shape.Indices.Length,
DrawElementsType.UnsignedInt, IntPtr.Zero);
//GL.DrawArrays(GL.Enums.BeginMode.POINTS, 0, shape.Vertices.Length);
View
8 Source/Examples/OpenGL/2.x/SwizzledParallax.cs
@@ -161,15 +161,15 @@ protected override void OnLoad(EventArgs e)
GL.DeleteShader( VertexShaderObject );
GL.DeleteShader( FragmentShaderObject );
- GL.GetProgram( ProgramObject, ProgramParameter.LinkStatus, out temp[0] );
+ GL.GetProgram(ProgramObject, GetProgramParameterName.LinkStatus, out temp[0]);
Trace.WriteLine( "Linking Program (" + ProgramObject + ") " + ( ( temp[0] == 1 ) ? "succeeded." : "FAILED!" ) );
if ( temp[0] != 1 )
{
GL.GetProgramInfoLog( ProgramObject, out LogInfo );
Trace.WriteLine( "Program Log:\n" + LogInfo );
}
- GL.GetProgram( ProgramObject, ProgramParameter.ActiveAttributes, out temp[0] );
+ GL.GetProgram(ProgramObject, GetProgramParameterName.ActiveAttributes, out temp[0]);
Trace.WriteLine( "Program registered " + temp[0] + " Attributes. (Should be 4: Pos, UV, Normal, Tangent)" );
Trace.WriteLine( "Tangent attribute bind location: " + GL.GetAttribLocation( ProgramObject, "AttributeTangent" ) );
@@ -315,7 +315,7 @@ protected override void OnRenderFrame( FrameEventArgs e )
GL.Color3( 1f, 1f, 1f );
- GL.Begin( BeginMode.Quads );
+ GL.Begin(PrimitiveType.Quads);
{
GL.Normal3( Normal );
GL.VertexAttrib3( AttribTangent, ref Tangent );
@@ -344,7 +344,7 @@ protected override void OnRenderFrame( FrameEventArgs e )
GL.UseProgram( 0 );
// visualize the light position 'somehow'
- GL.Begin( BeginMode.Points );
+ GL.Begin(PrimitiveType.Points);
{
GL.Color3( LightSpecular );
GL.Vertex3( LightPosition );
View
2 Source/Examples/OpenTK/GLControl/GLControlGameLoop.cs
@@ -160,7 +160,7 @@ private void Render()
private void DrawCube()
{
- GL.Begin(BeginMode.Quads);
+ GL.Begin(PrimitiveType.Quads);
GL.Color3(Color.Silver);
GL.Vertex3(-1.0f, -1.0f, -1.0f);
View
2 Source/Examples/OpenTK/GameWindow/GameWindowMsaa.cs
@@ -99,7 +99,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
{
GL.Clear(ClearBufferMask.ColorBufferBit);
- GL.Begin(BeginMode.Triangles);
+ GL.Begin(PrimitiveType.Triangles);
GL.Color3(Color.MidnightBlue);
GL.Vertex2(-1.0f, 1.0f);
View
2 Source/Examples/OpenTK/GameWindow/GameWindowSimple.cs
@@ -98,7 +98,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
{
GL.Clear(ClearBufferMask.ColorBufferBit);
- GL.Begin(BeginMode.Triangles);
+ GL.Begin(PrimitiveType.Triangles);
GL.Color3(Color.MidnightBlue);
GL.Vertex2(-1.0f, 1.0f);
View
2 Source/Examples/OpenTK/GameWindow/GameWindowThreaded.cs
@@ -287,7 +287,7 @@ public void Render(double time)
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
- GL.Begin(BeginMode.Points);
+ GL.Begin(PrimitiveType.Points);
foreach (Particle p in Particles)
{
GL.Color4(p.Color);
View
2 Source/Examples/OpenTK/Test/TestShaderUtf8Support.cs
@@ -218,7 +218,7 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.BindVertexArray(vaoHandle);
- GL.DrawElements(BeginMode.Triangles, indicesVboData.Length,
+ GL.DrawElements(PrimitiveType.Triangles, indicesVboData.Length,
DrawElementsType.UnsignedInt, IntPtr.Zero);
SwapBuffers();
View
14 Source/Examples/Shapes/Base/DrawableShape.cs
@@ -22,7 +22,7 @@ namespace Examples.Shapes
public abstract class DrawableShape: IDisposable
{
- protected BeginMode PrimitiveMode;
+ protected PrimitiveType PrimitiveMode;
protected VertexT2dN3dV3d[] VertexArray;
protected uint[] IndexArray;
@@ -31,8 +31,8 @@ public int GetTriangleCount
get
{
switch ( PrimitiveMode )
- {
- case BeginMode.Triangles:
+ {
+ case PrimitiveType.Triangles:
if ( IndexArray != null )
{
return IndexArray.Length / 3;
@@ -56,14 +56,14 @@ public int GetTriangleCount
public DrawableShape( bool useDisplayList )
{
UseDisplayList = useDisplayList;
- PrimitiveMode = BeginMode.Triangles;
+ PrimitiveMode = PrimitiveType.Triangles;
VertexArray = null;
IndexArray = null;
}
#region Convert to VBO
- public void GetArraysforVBO(out BeginMode primitives, out VertexT2dN3dV3d[] vertices, out uint[] indices)
+ public void GetArraysforVBO(out PrimitiveType primitives, out VertexT2dN3dV3d[] vertices, out uint[] indices)
{
primitives = PrimitiveMode;
@@ -78,7 +78,7 @@ public void GetArraysforVBO(out BeginMode primitives, out VertexT2dN3dV3d[] vert
indices = IndexArray;
}
- public void GetArraysforVBO(out BeginMode primitives, out VertexT2fN3fV3f[] vertices, out uint[] indices)
+ public void GetArraysforVBO(out PrimitiveType primitives, out VertexT2fN3fV3f[] vertices, out uint[] indices)
{
primitives = PrimitiveMode;
@@ -93,7 +93,7 @@ public void GetArraysforVBO(out BeginMode primitives, out VertexT2fN3fV3f[] vert
indices = IndexArray;
}
- public void GetArraysforVBO(out BeginMode primitives, out VertexT2hN3hV3h[] vertices, out uint[] indices)
+ public void GetArraysforVBO(out PrimitiveType primitives, out VertexT2hN3hV3h[] vertices, out uint[] indices)
{
primitives = PrimitiveMode;
View
4 Source/Examples/Shapes/Capsule.cs
@@ -46,9 +46,9 @@ public Capsule( double radius, double height, eSubdivisions subdivs, bool useDL
HoseSubDivs = 15;
break;
}
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
- OpenTK.Graphics.OpenGL.BeginMode TemporaryMode;
+ OpenTK.Graphics.OpenGL.PrimitiveType TemporaryMode;
VertexT2dN3dV3d[] TemporaryVBO;
uint[] TemporaryIBO;
View
4 Source/Examples/Shapes/ChamferCube.cs
@@ -50,7 +50,7 @@ public ChamferCube( double Width, double Height, double Length, SubDivs subdivs,
#region Temporary Storage
List<Chunk> AllChunks = new List<Chunk>();
- OpenTK.Graphics.OpenGL.BeginMode TemporaryMode;
+ OpenTK.Graphics.OpenGL.PrimitiveType TemporaryMode;
VertexT2dN3dV3d[] TemporaryVBO;
uint[] TemporaryIBO;
@@ -271,7 +271,7 @@ public ChamferCube( double Width, double Height, double Length, SubDivs subdivs,
#endregion 6 quads for the sides
#region Final Assembly of Chunks
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
Chunk.GetArray( ref AllChunks, out VertexArray, out IndexArray );
AllChunks.Clear();
#endregion Final Assembly of Chunks
View
2 Source/Examples/Shapes/Helpers/VboShape.cs
@@ -6,7 +6,7 @@ namespace Examples.Shapes
{
public sealed class VboShape: DrawableShape
{
- public VboShape( ref OpenTK.Graphics.OpenGL.BeginMode primitives, ref VertexT2dN3dV3d[] vertices, ref uint[] indices, bool useDL )
+ public VboShape(ref OpenTK.Graphics.OpenGL.PrimitiveType primitives, ref VertexT2dN3dV3d[] vertices, ref uint[] indices, bool useDL)
: base( useDL )
{
PrimitiveMode = primitives;
View
2 Source/Examples/Shapes/KochTetrahedron.cs
@@ -50,7 +50,7 @@ public KochTetrahedron( double scale, double extrusionHeight, double extrusionMu
}
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
SierpinskiTetrahedron.GetVertexArray( ref Triangles, out VertexArray );
IndexArray = null;
}
View
2 Source/Examples/Shapes/MengerSponge.cs
@@ -39,7 +39,7 @@ public MengerSponge( double scale, eSubdivisions subdivs, bool useDL )
default: throw new ArgumentOutOfRangeException( "Subdivisions other than contained in the enum cause overflows and are not allowed." );
}
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
#region Get Array Dimensions
uint
View
2 Source/Examples/Shapes/Old/SierpinskiTetrahedron.cs
@@ -66,7 +66,7 @@ public SierpinskiTetrahedron( double scale, eSubdivisions subdivs, bool useDL )
default: throw new ArgumentOutOfRangeException( "Subdivisions other than contained in the enum cause overflows and are not allowed." );
}
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
SierpinskiTetrahedron.GetVertexArray( ref Triangles, out VertexArray );
IndexArray = null;
}
View
2 Source/Examples/Shapes/SlicedHose.cs
@@ -32,7 +32,7 @@ public enum eSide:byte
public SlicedHose( eSide side, uint subdivs, double scale, Vector3d offset1, Vector3d offset2, bool useDL )
: base( useDL )
{
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
Vector3d start = Vector3d.Zero,
end = Vector3d.Zero;
View
2 Source/Examples/Shapes/SlicedSphere.cs
@@ -40,7 +40,7 @@ public SlicedSphere( double radius, Vector3d offset, eSubdivisions subdivs, eDir
{
double Diameter = radius;
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.Triangles;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.Triangles;
if ( sides[0] == eDir.All )
{
View
2 Source/Examples/Shapes/TorusKnot.cs
@@ -21,7 +21,7 @@ public TorusKnot( int pathsteps, int shapevertices, double radius, int p, int q,
Trace.Assert( shapevertices >= MINShapeVertices, "A Shape must contain at least " + MINShapeVertices + " Vertices to be considered valid and create a volume." );
Trace.Assert( TexCount >= 1, "at least 1 Texture set is required." );
- PrimitiveMode = OpenTK.Graphics.OpenGL.BeginMode.TriangleStrip;
+ PrimitiveMode = OpenTK.Graphics.OpenGL.PrimitiveType.TriangleStrip;
Vector3d[] PathPositions = new Vector3d[pathsteps];

0 comments on commit 54f1e57

Please sign in to comment.
Something went wrong with that request. Please try again.