I'm trying to make do water simulation. But I'm restricted to use 2D, So i started with just making the boundary of the sea by using sine wave, through Gl_Line_loop. but I'm just unable to fill it. I have tried changing it to the Gl_polygon mode but then i don't get the proper shape. here is the code:
How to fill the shape, made up of GL_LINE_LOOP
3.2k Views Asked by shahtaj khalid At
1
There are 1 best solutions below
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in OPENGL
- setting OpenGL version in objective-C
- How to run OpenGL version 3.3 (with Intel HD 4000) on Ubuntu 15.04
- Can linear filtering be used for an FBO blit of an MSAA texture to non-MSAA texture?
- How to get shader version from QOpenGLShader?
- "Capture GPU Frame" in XCode -- iOS only?
- Difference between glewGetString(GLEW_VERSION) and glewIsSupported
- Tesselation result flickering - OpenGL/GLSL
- Water rendering in opengl
- Texture mapping consuming physical memory
- Rotating a Cube using Quaternions in PyOpenGL
- Switching from perspective orthographic projection in OpenGL
- FreeType2 and OpenGL : Use unicode
- Should Meshes with and without Skeleton use different Shaders?
- How to get accurate 3D depth from 2D screen mouse click for large scale object in OpenGL?
- Trying to load 2d texture with glTexImage2D, but just getting blank
Related Questions in LINE
- Attach canvas drawed line to scene in Android
- Get a single line representation for multiple close by lines clustered together in opencv
- geom_path diameter to scale with coordinate system
- Android: Intentionally Blank Lines in EditText Are Not Getting Saved
- Draw lines between divs using css border
- why hough transform detects two lines while there is only one line
- PhpStorm shortcut for line breaks
- How to read a value on a specific line in an external file into an AWK script
- How to draw a line over a GridView programmatically
- Using fabric.js hovering lines is fired around them (not only exactly over them)
- Java BufferedReader - empty line issue
- Matlab - plot bar and line graph on the same y axis
- Inserting string in file in nth line after pattern using sed
- batch file delete lines with same variable
- Read lines from file, iterate over each line and each character in that line
Related Questions in WAVE
- Is my audio normalization code correct?
- Convert OutputStream to ByteArrayOutputStream
- Weird glitch when creating sine audio signal
- Repaint in achartengine with new values
- Python Wave byte data
- How to play wave file in MVC 4
- How to detect empty wave file in Python?
- Determining Bit-Depth of a wav file
- Compare voice wav in android or voice tag ( voice commands ) API
- Wave Simulation with Python
- Saving files using Carrierwave without forms
- Play a part of a .wav file in python
- Merging two WAVE files on Android (concatenate)
- Making a wavetable synth for the first time...Can somebody point me in the right direction?
- Playing wave files from stream
Related Questions in SINE-WAVE
- Android java: draw image of a sine waveform
- Generate sine wave using ADC
- How to achieve a gradual change in frequencies for a sweep (chirp) signal on STM32F4?
- PWM sine wave using arduino and H bridge
- How to associate days (1 to 365.25) to radians in perl?
- How to make sine wave using defined frequency on Linux Assembly
- python code to generate a sine wave with diffferent points and different frequencies
- How to generate a sine wave in python?
- Create Vertical Sine wave
- Generating a series of slightly random integers in a numpy array
- How to generate mixed frequency sinewave using STM32F4 DAC?
- How to generate the random sinewave with noise?
- Fitting a sine wave without stretching it
- issue when generating sine wave for more than 1 second
- How to convert sine wave form in to audio?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
To tessellate the above, specify a top then a bottom vertex right along the line, then draw a triangle strip. i.e. for each (x, y) position along the sin wave, emit two vertices, the same x but y = 0 (the bottom). Then render a triangle strip.
Something like this: