I am drawing a line on android in opengl es. The line draws fine. The only problem is that the line remains the same thickness no matter how close or far the camera is from it. Are there any solutions to this?
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in OPENGL-ES
- Setting up OpenGL ES 1.1, and my android environment
- Opengl Augmented Reality in Android from solvepnp
- error 1281 for the call to glUseProgram
- Page Curl with best quality
- Qtwebengine on Embedded linux, with qtwayland and OpenGL not working, black rectangles seen on browser
- Maintaining glSurfaceView through different activities
- LibGDX - load and process texture asynchronously
- OpenGL ES 2.0 Framebuffer with render to texture iOS: nothing shown
- Generating a sphere in OpenGL without high level libraries - what's wrong with my code?
- matrix.multiply returning Nan
- Android OpenGL ES Fatal signal crash
- OpenGL / weight order independent transparency
- GLSL: How to calculate fragments output RGB value based on Photoshops curve value?
- Find a longitude given a pair of (lat,long) and an offset latitude
- How to implement dynamic page curl in android?
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 THICKNESS
- How to reduce table border thickness?
- Why is XAML "Thickness" invalid because the expected type is "Thickness" when the actual type is indeed "Thickness"?
- How do I change the border size for a table in Dear ImGui?
- Extra space - where does it come from?
- How to adjust JFrame border thickness in Java
- Set the thickness width of the blinking cursor
- CGAL - Extracting 2D contours form a sequence of segments
- How to add a Thick bottom border across multiple cells every 9th row,
- Three JS how to add color and line thickness to mesh loaded with GLTFLoader
- How to change the thickness & colour of the <hr> tag?
- Line thickness ggplot - looks discrete
- can the CImg library draw thick lines
- WPF Border Thickness increase direction
- Thickness of axes in Manim plot
- iOS, OpenGL ES. Line thickness on retina screen?
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?
OpenGL draws lines at a fixed width measured in pixels, independent of the distance from the camera. If you need "lines" with a thickness that changes with the camera distance, you will have to draw them as polygons.
You can change the line width with
glLineWidth(), but it will still be a fixed width in pixels. Also, in OpenGL ES, implementations are only required to support line widths up to 1.0.There are at least two main approaches to draw lines as polygons. One is that you draw a single quad for each line, and make sure that the quad is oriented towards the camera. The other approach is that you draw a "stick" (cylinder) consisting of multiple polygons. Depending on the precision you need, it might be enough to use as few as 4 polygons to approximate the cylinder, which basically makes it a long thin box.