Comments (4)
Logged In: YES
user_id=1317290
Originator: NO
I don't fully understand why this bug is occurring but I have found something that fixes the transparency problem.
If you add the following code to Painter's begin(GLWidget *widget) method transparency works while the text renderer is enabled:
if(d->textRenderer->isActive())
{
d->textRenderer->end();
}
Its probably a bit of a hacky fix but as I said, I don't understand the underlying code, I just stumbled across this while working on a new tool (more to come about that later). I assume someone else understands the code better and that this hacky fix might clue you in on what might be the underlying cause of the bug.
Hope this helps,
James & Ross
Original comment by: jbunt
from avogadro.
Logged In: YES
user_id=1500648
Originator: NO
- I have resolved this issue but it's not the greatest. At this time when TextRenderer is activated it sets up it's OpenGL environment to what i needs by pushing some stuff to the GL stack etc. However, to optimize we don't call ::end until we are ready to render another non-text item. However this causes problems because with our GLPainter::begin and GLPainter::end, we may draw text, change the environment, then draw a sphere, but here is the order of operations,
TextRenderer::begin (push environment)
TextRenderer::drawText
glEnable(GL_BLEND) (new environment, say GL_BLEND)
TextRenderer::end (pop OLD environment, no GL_BLEND)
drawSphere()
So to fix the error i simply call TextRenderer::end after calling ::drawText. This is bad because that means for each call to draw text we are re-setting up our environment. Our painting system is a little off-whack and I think we need to remedy it a bit more. One of the problems is that you can change the GL environment in the rendering code, but actually, things like enabling transparency, etc should be handled by the GLPainter. Also, we can easily make it so you can instanciate your own GLPainter and just use a shared static variable. shrug I have fixed the problem temp but please leave this PR open.
- There is no transparency problem, it's just that for EACH unitcell the labels get rendered on the initial molecules coordinates. Multiple calls end up looking like a box around the text but that's not the case. The problem is that when we go to render the unit cell we do a glTranslate which is all well and good except that text rendering is based off what the camera() object thinks is the modelview. So to remedy this we either need the camera to take into consideration the gltranslations (which is bad imo) or we need to make the camera have it's own model view stack and allow us to push and pop that bad boy. This would resolve the problem and i'll look into it more soon.
Original comment by: @milkypostman
from avogadro.
Logged In: YES
user_id=1500648
Originator: NO
This has been resolved.
Original comment by: @milkypostman
from avogadro.
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Original comment by: sf-robot
from avogadro.
Related Issues (20)
- Avogadro crashes (Segmentation Fault) when opening ORCA output file
- Compiling Error on a Manjaro-Machine HOT 1
- Missing Label Display Type
- slection and delet several atoms HOT 1
- Can't Read Distance and Angle Information
- Avogadro crashes with GAMESS extension
- Problema con download Avogadro
- Optimization Geometry does not work
- Not opening inp.log files
- file MSVCP100.dll isnt found HOT 4
- Avogardo Cannot Read Angle Measurements HOT 1
- Freezes
- Stops working when opening new file.
- Ctrl+z does not work with the radius attribute
- Trouble loading chiral carbon nanotubes in .xyz format
- Frequencies are sorted as strings, not numercially
- cartesian editor
- MAC OS avogadro V1.2.0 can not open gaussian input file gjf, even the gjf file is producted by itself. HOT 1
- Issue with auto-opt tool HOT 1
- At least three files have Python syntax errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avogadro.