(.25, .25) and (.75,.75) are line’s start and end point.
To draw a line from (10,10) to (20,20):
glBegin(GL_LINES); glVertex2f(10, 10); glVertex2f(20, 20); glEnd();
Related Posts:
- Why use ‘glad’ library for opengl initialization? [duplicate]
- glm rotate usage in Opengl
- How to use glOrtho() in OpenGL?
- Understanding glm::lookAt()
- Drawing Circle with OpenGL
- Pause Console in C++ program
- Why the switch statement cannot be applied on strings?
- How to dynamically allocate arrays in C++
- How to convert string to char array in C++?
- How can I convert a std::string to int?
- Why is “using namespace std;” considered bad practice?
- What is a lambda expression in C++11?
- How to convert string to char array in C++?
- ld: symbol(s) not found for architecture x86_64 error
- C++ string to double conversion
- Good input validation loop using cin – C++
- C++ for each, pulling from vector elements
- How do I erase an element from std::vector<> by index?
- Incomplete Type Is Not Allowed
- how to implement quick sort algorithm in C++
- C++ Vector of pointers
- How do I reverse a C++ vector?
- Is there a C++ decompiler?
- What is a dangling pointer?
- undefined reference to WinMain@16 (codeblocks)
- What is uintptr_t data type
- const int = int const?
- Undefined reference to vtable
- In C++, what is a virtual base class?
- wntdll.pdb not loaded – Can’t see the exception
- Difference between const reference and normal parameter
- Why am I getting this redefinition of class error?
- error: redefinition of class
- How to convert a std::string to const char* or char*
- What does -> mean in C++?
- How to pass optional arguments to a method in C++?
- How to copy a string of std::string type in C++?
- C++ forbids converting a `string` constant to `char*` – Alphabets to Morse converting program
- What is activation record in the context of C and C++?
- Static array vs. dynamic array in C++
- C++ terminate called after throwing an instance of ‘std::out_of_range’ Simple Averaging code
- Error “C++ requires a type specifier for all declarations whilst defining methods”
- How to create a dynamically-allocated array of const objects, but have values assigned to them?
- Why doesn’t std::vector::push_front() exist?
- Fastest way to check if a file exist using standard C++/C++11,14,17/C?
- Invalid use of non-static member function c++
- C++ #include guards
- Is std::stoi actually safe to use?
- C++ forbids variable-size array
- C++ IDE with repl?
- error: use of deleted function
- Run C++ in command prompt – Windows
- pthread sleep linux
- 2D array vs array of arrays
- C++ error: definition of implicitly-declared
- Already defined in .obj – no double inclusions
- expected unqualified-id before string constant
- C++: Access violation writing location
- error: strcpy was not declared in this scope
- What does `Fatal Python error: PyThreadState_Get: no current thread` mean?
- Debug Assertion Failed: _CrtIsValidHeapPointer(block)
- gdb error not in executable format: File format not recognized
- C++ Erase vector element by value rather than by position?
- C++ Class ‘undeclared identifier”
- Destructor for Binary Search Tree
- What is the most popular general purpose C++ framework?
- Adding message to assert
- c++ error: invalid types ‘int[int]’ for array subscript
- What are the different versions of exec used for in C and C++?
- C++ – include unistd.h: why not cunistd?
- Dynamically allocated string array, then change it’s value?
- Use the auto keyword in C++ STL
- c++ –
- is there is a compiler which convert c++ code into mips assembly language
- term does not evaluate to a function taking 1 arguments
- reading from stdin in c++
- Difference between pic Vs pie
- C++ Templates – LinkedList
- In C++ can constructor and destructor be inline functions?
- What’s the meaning of exception code “EXC_I386_GPFLT”?
- how to convert from int to char*?
- When is it safe to call this-> in constructor and destructor
- How to do std::string indexof in C++ that returns index of matching string?
- variable or field declared void
- Invalid conversion from ‘char’ to ‘const char *’
- How do I deal with “signed/unsigned mismatch” warnings (C4018)?
- Creating folders in C++
- Unrecognizable template declaration/definition
- MSVCP120d.dll missing
- Modulo operator with negative values [duplicate]
- Finding the type of an object in C++
- heap corruption detected | C++
- Update g++ but still old version
- module unsafe for SAFESEH image C++
- Why are there two different getline() functions (if indeed there are)?
- Whats the difference between UInt8 and uint8_t
- Struct with template variables in C++
- error: no member function declared in class
- Why does my program give “NULL used in arithmetic”
- no matching function to call for “getline”