Autor Beitrag
FrEaKY
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 235


D7
BeitragVerfasst: Sa 14.08.04 02:20 
moin
ich mach in meinem prog paar gras sträucher nur die sehen so komisch aus. hiern pic:
user defined image
und naja das sieht net grad so identisch mit der verwendeten textur:
user defined image
also ich habs so gecoded:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
procedure tform1.strauch(x,y,z,xs,ys,zs:glfloat);
begin
  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA,GL_ONE);
  glDisable(GL_DEPTH_TEST);

  strauch1.Bind;
  glbegin(gl_quads);
   gltexcoord2f(0,0);glvertex3f(x+xs/2,y,z);
   gltexcoord2f(1,0);glvertex3f(x-xs/2,y,z);
   gltexcoord2f(1,1);glvertex3f(x-xs/2,y+ys,z);
   gltexcoord2f(0,1);glvertex3f(x+xs/2,y+ys,z);
   glend;
  glbegin(gl_quads);
   gltexcoord2f(0,0);glvertex3f(x,y,z-zs/2);
   gltexcoord2f(1,0);glvertex3f(x,y,z+zs/2);
   gltexcoord2f(1,1);glvertex3f(x,y+ys,z+zs/2);
   gltexcoord2f(0,1);glvertex3f(x,y+ys,z-zs/2);
   glend;

   gldisable(gl_blend);
end;

MFG
MathiasH
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 699

WinXP, Win98SE, Debian, Win95
D5 Stand, D6 Prof
BeitragVerfasst: Sa 14.08.04 08:06 
Hallo Freaky

du verwendest die falsche glBlendFunc. Deine erzeugt nämlich dem Bild nach additives Blending. Dieses wird eher für irgendwelche Lichteffekt verwendet, denn dabei werden die Farbwerte von Vorder-und Hintergrund addiert. guck dich mal auf [url]www.delphigl.com[/url] um, ich weis die richtige blendfunc grad net auswendig.

MathiasH

_________________
"Viel von sich reden, kann auch ein Mittel sein, sich zu verbergen."
Friedrich Nietzsche
FrEaKY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 235


D7
BeitragVerfasst: Sa 14.08.04 10:39 
Hm da hab ich die blendfunktion auch her ich find jedenfalls keine andere.
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Sa 14.08.04 11:31 
guckst du hier:
wiki.delphigl.com/index.php/GlBlendFunc

evtl. solltest du auch ne Alpha-MAske benutzen

guckst du hier: *g*
www.delphigl.com/for...ighlight=glblendfunc
FrEaKY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 235


D7
BeitragVerfasst: Sa 14.08.04 12:17 
hm ich benuzte glbmp für meine texturen. kann man da TGA laden ??
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Sa 14.08.04 14:59 
weiß ich nicht, da es soviele verschiedene Units auf dem Gebiet gibt, die tw. auchnoch gleich heißen...
wahrscheinlich kann die das, wenn es die ist, die ich kenne...
Probiers einfach aus ;-)