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

Aktuelle Zeit: Mi Jul 09, 2025 14:19

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



Ein neues Thema erstellen Auf das Thema antworten  [ 6 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Faces Ocupying the same space
BeitragVerfasst: Do Sep 16, 2004 17:56 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Iv noticed in RTCW maps that some faces overlap over faces, proberly the one thats ontop is a decal. My query is, is there anyway to make one dominant? Depending on where u look at them from, depends on which is dominant..... which looks stupid...


Dateianhänge:
Dateikommentar: Snow fully dominant(like it should be)
_0078.jpg [153.52 KiB]
55-mal heruntergeladen
Dateikommentar: Ground bit more dominant than the snow.
_0077.jpg [157.22 KiB]
55-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 16, 2004 18:04 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
Just use glPolygonOffset before rendering the decals. This function offsets a polygon that drawn a the exact same place as another polygon.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 16, 2004 20:05 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Thx SOS :)

For anyone who doesn't know how to use the polygon offset(like i didn't) heres some simple code:

Code:
  1.  
  2. glEnable(GL_POLYGON_OFFSET_FILL);
  3.  


Code:
  1.  
  2. if Shader.polygonOffset then // If its a decal
  3. glPolygonOffset(0,0)
  4. else
  5. glPolygonOffset(1,1);
  6.  


Much simpler than i thought it would be.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 16, 2004 20:19 
Offline
DGL Member

Registriert: Do Sep 16, 2004 17:21
Beiträge: 2
Are you writing a game engine or something? After looking at the last few topics you stared, it sure seems like it.

Anyway, nice example of a decal.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 16, 2004 20:30 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Yes im trying to make a game engine, Its bassed on Q3MapView by Harry Paintner but heavily modifyed. Always wanted to mod Half-Life but could never find a copy of Visual C++ that was cheap(as in not above 100 pounds) or in a shop, so the next and better thing to do is make a game engine in the worlds best language.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Sep 16, 2004 21:45 
Offline
DGL Member

Registriert: Do Sep 16, 2004 17:21
Beiträge: 2
Awesome!! Wish I could help, but my knowledge of GL is tiny. I hope to learn more and get some books soon. I'd be willing to give you ideas or test. :lol:

Best Wishes,
Robert


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


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 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.010s | 17 Queries | GZIP : On ]