Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Closed Rect rendert IngameBackground grau/schwarz

Status
Not open for further replies.

MasterOf13FPS

Administrator
Staff member
Administrator
MasterOf13FPS
Joined
Jul 11, 2020
Messages
0
Reaction score
25
Points
0
Hallo ich habe eine Arraylist mit Rect, Rainbow und Font

Als ich die Fonts hinzugefügt hatte musste ich die drawRect Methode ändern damit sie nicht die Farbe verändern

Allerdings ist es jetzt so, wenn ich Rect aktiviert habe das der hintergrund bei z.B dem Inventar grau ist

03f0wuk.png


Aber auch in der GuiIngameMenu Klasse

hdJWbcF.png


Wenn ich Rects deaktiviere funktioniert alles deswegen vermute ich es liegt an der DrawRect Methode

Code:
public static void drawRect(double x, double y, double x2, double y2, int color)
{
    float red = (color >> 24 & 0xFF) / 255.0F;
    float green = (color >> 16 & 0xFF) / 255.0F;
    float blue = (color >> 8 & 0xFF) / 255.0F;
    float alpha = (color & 0xFF) / 255.0F;

    GL11.glEnable(3042);
    GL11.glDisable(3553);
    GL11.glBlendFunc(770, 771);
    GL11.glEnable(2848);

    GL11.glPushMatrix();
    GL11.glColor4f(green, blue, alpha, red);
    GL11.glBegin(7);
    GL11.glVertex2d(x2, y);
    GL11.glVertex2d(x, y);
    GL11.glVertex2d(x, y2);
    GL11.glVertex2d(x2, y2);
    GL11.glEnd();
    GL11.glPopMatrix();

    GL11.glEnable(3553);
    GL11.glDisable(3042);
    GL11.glDisable(2848);
}

Habe außerdem schon versucht Grafikmodus auf Schnell , Shader rauszunehmen und Fast Render zu aktivieren. Hilf alles nicht :/
 
Ein kuhler mensch hat mir geholfen rofl xd lp //Thread kann geclosed werden @FantaCoke
 
Status
Not open for further replies.
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top