Tag:OpenGL

  • Director a fireworks event with OpenGL to welcome the coming new year

    Time:2022-2-3

    It’s been a busy holiday for a year. I had planned to have a good rest, but I didn’t expect to feel a little bored after half a day. Seeing that my family and friends are busy in the new year, I will direct a fireworks event with OpenGL to dedicate it to the coming […]

  • Glsurfaceview for getting started with Android OpenGL

    Time:2021-12-14

    Glsurfaceview uses OpenGL es is an open source graphics library, so it needs something to display the screen. In Android, the OpenGL package provides a view called glsurfaceview, which is defined as follows: An implementation of SurfaceView that uses the dedicated surface for displaying OpenGL rendering. Its characteristics are as follows: Manages a surface, which […]

  • OpenGL midpoint Bresenham line drawing algorithm

    Time:2021-11-24

    This example shares the OpenGL midpoint Bresenham line drawing algorithm for your reference. The specific contents are as follows environment MacOS Xcode compiler code #include <GLUT/GLUT.h> #include <iostream> #include<iostream> #include<cstdlib> #include<ctime> using namespace std; float wid = 400; // Set the size of the window. The agreed window must be square float height = wid; […]

  • OpenGL library configuration tutorial under vs2015

    Time:2021-11-2

    Write before: Recently, I need to use OpenGL. It takes a lot of effort to configure it under vs2015. Now I will directly contribute my achievements to you. I hope to save some trouble for readers who need to configure OpenGL under vs2015. Text: Resource address:OpenGL installation package Resources are compiled and can be used […]

  • How to use OpenGL es to realize drawing board in IOS

    Time:2021-7-15

    Today, we use OpenGL es to implement a drawing board, mainly introduces the implementation scheme of drawing smooth curve in OpenGL es. First of all, let’s look at the final effect In IOS, there are many ways to implement a drawing board. For example, my other project mfpaintview is based on coregraphics. However, using OpenGL […]

  • The method of drawing Bezier curve with OpenGL

    Time:2021-2-9

    This example for you to share the OpenGL Bezier curve drawing specific code, for your reference, the specific content is as follows Project requirements: – use the mouse to set any control point on the screen and generate a curve – use the mouse and keyboard to modify the curve. General introduction of the project […]

  • Drawing Bezier curve with OpenGL

    Time:2021-2-7

    Bezier curve algorithm is an algorithm to get smooth curve based on parametric curve equation. The parameters of curve equation are determined by control points.Its essence is that the harmonic function is interpolated according to the control points Where PI (I = 0,1 , n) is the vector of the control point, Bi,n(t)Is a Bernstein […]

  • Using OpenGL to draw Bezier curve

    Time:2021-2-6

    This example for you to share the OpenGL Bezier curve drawing specific code, for your reference, the specific content is as follows Recently, I read the book computer graphics (OpenGL Edition) (Third Edition) Co authored by Francis s hill, Jr. and Stephen m Kelley. There are codes for drawing Bezier curves of three control points. […]

  • Drawing cubic Bezier curve with OpenGL

    Time:2021-2-4

    This example for you to share the OpenGL drawing cubic Bezier curve specific code, for your reference, the specific content is as follows Calculation formula: Results of operation: The code is as follows: #include<gl/glut.h> #include<math.h> #include<windows.h> #include<vector> #include<algorithm> using namespace std; struct Point { int x, y; Point(){}; Point(int tx, int ty) { x = […]

  • Multi segment Bezier curve splicing based on OpenGL

    Time:2021-2-3

    This example for you to share the OpenGL implementation of multi Bezier curve splicing specific code, for your reference, the specific content is as follows The interactive way of running the program is similar to the free curve drawing in CorelDRAW or the pen free path drawing in Photoshop. Screenshot: The BezierCurve is encapsulated into […]

  • OpenGL drawing five star red flag

    Time:2020-3-5

    The example of this paper shares the specific code of OpenGL drawing five star red flag for your reference. The specific content is as follows Main instruments and equipment VisualStudio C++2015 Windows 10 environmentOpenGL library Operation steps 1. Parameters of five star red flag 1) The flag is red, rectangular, and the ratio of length […]

  • OpenGL about the difference between glstencilfuncseparate() and glstencilfuncfunction()

    Time:2019-12-23

    glStencilFunc()Function is a command provided by OpenGL to control the template buffer. This is a function used before OpenGL 2.0. Its function prototype is void glStencilFunc(GLenum func, GLint ref, GLuint mask). Func specifies the comparison function, which specifies the conditions for passing the test. The values can be: (for convenience, the reference value is refvalue, […]