Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki

Aktuelle Zeit: Sa Nov 25, 2017 02:38

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Mo Feb 13, 2017 18:59 
Offline
DGL Member

Registriert: So Jan 15, 2017 18:52
Beiträge: 14
Programmiersprache: Delphi
Hello,

I have another problem with TextSuite. I tryed to find a problem in my OpenGL code but without luck. Description of the problem: Sometimes when I start application I see background quads instead of text. Quads have color of text. When it happens, I must restart application to repair. So I do not think it is a problem in my code but maybe in TextSuite. Picture is attached.

What bothers me the most is that it only happens sometimes.

Any ideas?

Thanks!
SpaM


Dateianhänge:
Dateikommentar: Wrong and correct text display
example.png
example.png [ 2.5 KiB | 401-mal betrachtet ]
Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mo Feb 13, 2017 21:44 
Offline
Ernährungsberater
Benutzeravatar

Registriert: Sa Jan 01, 2005 17:11
Beiträge: 1946
Programmiersprache: C++
Doesn't look like a problem of the text suite.
Please make sure that if you switch a state in OpenGL, you switch back once done with it.
It looks like you're disabling texturing. Can you add some debug control or so which will reenable texturing if the problem occures?

_________________
Steppity,steppity,step,step,step! :twisted:
❆ ❄ ❄ ❄ ❅ ❄ ❆ ❄ ❅ ❄ ❅ ❄ ❅ ❄ ❄
❄ ❄ ❄ ❅ ❄ ❄ ❄ ❅ ❄ ❄ ❆ ❄ ❄


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Fr Feb 17, 2017 14:08 
Offline
DGL Member

Registriert: So Jan 15, 2017 18:52
Beiträge: 14
Programmiersprache: Delphi
Thank you for tip. I am disabling textures after TextSuite because than I not see other objects. I will take alook on it!


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mo Feb 20, 2017 07:52 
Offline
DGL Member

Registriert: So Jan 15, 2017 18:52
Beiträge: 14
Programmiersprache: Delphi
Hello,

I take a deep look into TextSuite and all drawings are between glEnable(GL_TEXTURE_2D) and glDisable(GL_TEXTURE_2D). There is no reason why problem happens only sometimes.

Important note: I have several forms and each of them have own drawing code using OpenGL. This problem occur only on one of them. I compared them but no difference at all.

It is weird :(


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mo Feb 20, 2017 15:32 
Offline
DGL Member
Benutzeravatar

Registriert: Do Sep 02, 2004 19:42
Beiträge: 4157
Programmiersprache: FreePascal, C++
I’m afraid, in this case you’ll need to provide more code, as minimal as possible.

regards,
Horazont

_________________
If you find any deadlinks, please send me a notification – Wenn du tote Links findest, sende mir eine Benachrichtigung.
current projects: ManiacLab; aioxmpp
zombofant networkmy photostream
„Writing code is like writing poetry“ - source unknown


„Give a man a fish, and you feed him for a day. Teach a man to fish and you feed him for a lifetime. “ ~ A Chinese Proverb


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Fr Feb 24, 2017 19:23 
Offline
DGL Member
Benutzeravatar

Registriert: Di Apr 29, 2008 18:56
Beiträge: 1208
Programmiersprache: Delphi/FPC
Hey,

did you enabled blending? You need Additiv Alpha Blending or Normal Alpha Blending:

Code:
  1. glEnable(GL_BLEND);
  2. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // normal
  3. glBlendFunc(GL_SRC_ALPHA, GL_ONE); // additiv


Greetings Bergmann89

_________________
Aktuelle Projekte: BumpMapGenerator, Massive Universe Online
Auf meiner Homepage gibt auch noch paar Projekte und Infos von mir.


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Do Jun 29, 2017 07:15 
Offline
DGL Member

Registriert: So Jan 15, 2017 18:52
Beiträge: 14
Programmiersprache: Delphi
Hello all,

I am back. I thought that I solved this problem but it still appears "sometimes". I hate "sometimes" errors :(
I tryed all the advices posted here on this forum but without luck.

I know how to simulate the problem with about 50% success:

I have three forms. Each have its own OpenGL drawing (I have my own class). First form have never problem with drawing texts. Never! ... Second not have texts but third forum "sometimes" show filled quads instead of texts. When it happens, I must restart the Application. When I start the App, first form is visible. Than I jump to third form and text is ok too! But when I open / close second form and open back third form, I see quads instead of texts.... as I sad "sometimes".

I think it is bug of OpenGL. All drawings go through one code.... but maybe I am wrong.

Any idea what to do?
Thanks!


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.035s | 20 Queries | GZIP : On ]