Skip to content

Instantly share code, notes, and snippets.

@Raffaele3D
Raffaele3D / PerspectiveCamera
Last active May 15, 2020 12:00
Perspective camera/Vertex Shader/Fragment Shader
****************************************************
********PERSPECTIVE CAMERA**************************
****************************************************
private void Render ()
{
if (!loaded)
return;
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
#pragma once
// Std. Includes
#include <vector>
// GL Includes
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
@Raffaele3D
Raffaele3D / C#, Windows Forms, Open TK
Created April 26, 2017 09:22
Draw text lines by OpenTk in the OpenGL Window with C# and Windows Forms
public void statistics()
{
if (statisticsOnOff)
{
//Generate the plane containing the statistics
GL.Begin(PrimitiveType.Quads);
GL.TexCoord2(0f, 1f); GL.Vertex2(0f, 0f);
GL.TexCoord2(1f, 1f); GL.Vertex2(glControl1.Width, 0f);
GL.TexCoord2(1f, 0f); GL.Vertex2(glControl1.Width, glControl1.Height);