Category: Computer Graphics
-
Meow CAD 001 – Logarithmic Zoom
There are two possible way for zooming an object: Decrease The Camera Angle If you use digital cameras before probably you see 50mm 18-35mm … or similar text on lenses. This number shows the focal length of the lens. The focal length and camera angle is opposite to each other. In other words 50 mm…
-
Graphics pipeline
A bunch of programs that connected each other in order to created graphics from vertices. Some of that programs can be programmable -we call those programs as shader-. Input assembler Create geometric primitives – like point, line, triangle – from vertices. Vertex shader Define position of vertices -and also can manipulate other vertex data-. Why…
-
OpenGL 101
En kaba tabirle OpenGL; nokta, çizgi ve yüzey çizip bunu renklendirmenize olanak tanıyan bir API’dir. Başka bir deyişle GPU’yu kullanabilmemiz için sunulmuş bir arayüzdür. Bu arayüzü kullanabilmemiz için grafik kartı üreticisinin (veya başka bir kişinin), driver yazıp OpenGL’in bize sunmuş olduğu fonksiyonların kodlaması gerekmektedir. Göreceğiniz üzere OpenGL aynı zamanda bir “specification” yani tanımlamadır. Khronos grup…
-
Quadratic Equation of Sphere
Quadratic Equation of Circle Line Equation m is the gradient and c is the height at which the line crosses the y-axis, also known as the y -intercept. Vector Form Of Equations Of Line Parametric Equations Of Line Equation of Circle (a,b) is the center of the circle. If our center is located on origin Quadratic form If we write the parametric…
-
Actors
If you use any game engine or a 3D software like Blender/Maya. Probably you know every componentz on scene/viewport have tranforms and some data. I will call this components as “Actor” -like Unreal did-. Actor Class Main.cpp Summary: Non-summary Vertex/Index Buffer
-
ImGui
Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline-enabled application. It is fast, portable, renderer agnostic, and self-contained (no external dependencies). https://github.com/ocornut/imgui
-
Uniforms
A uniform is a global Shader variable declared with the “uniform” storage qualifier. These act as parameters that the user of a shader program can pass to that program. Their values are stored in a program object. Uniforms are so named because they do not change from one shader invocation to the next within a particular rendering call thus their value…
-
The Second Square
A vertex array object (also known as VAO) can be bound just like a vertex buffer object and any subsequent vertex attribute calls from that point on will be stored inside the VAO. This has the advantage that when configuring vertex attribute pointers you only have to make those calls once and whenever we want to draw the…
-
Hello Square
For drawing two squares we need to make two things. First, add extra 3 vertices and the second one is to add those extra vertices to the draw command As you can see these two triangles have adjacent 2 vertices. Instead of supplying these two extra vertices, we can supply a list for the order…
-
Hello Triangle
Shaders VBO Vertex Attributes Refactor main Shader Class https://www.khronos.org/opengl/wiki/Vertex_Specification
-
Hello Window
GLFWwindow Firstly we need to create a GLFW window. After creating a window we should create an infinite loop for render purposes. Of course, we don’t render anything except a black screen for now. Legacy Triangle GLAD will manage OpenGL function pointers for us. In other words we need to initialize GLAD before using OpenGL…