Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8979115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:46:24+00:00 2026-06-15T19:46:24+00:00

I have an OpenGL project in Java that draws a series of circles on

  • 0

I have an OpenGL project in Java that draws a series of circles on the screen, and I want a tooltip to appear whenever the mouse is over one of the circles. It works perfectly if the tooltip is nothing more than a rectangle, but once I add the text rendering code everything stops working. All of the circles disappear once the mouse moves over one of them, and the rectangle behind the text does likewise. They do not reappear no matter where I move the mouse following afterwards. The line of code causing my problems is

GraphicsUtil.DEFAULT_FONT.drawString(x, y, info);

Where info is the String, x and y are the coordinates, and GraphicsUtil.DEFAULT_FONT is declared as follows:

  @SuppressWarnings("unchecked")
  public class GraphicsUtil 
  {
    private GraphicsUtil()
    {

    }

    public static final UnicodeFont DEFAULT_FONT = new UnicodeFont(new Font("",Font.PLAIN,12));

    static
    {
        DEFAULT_FONT.addAsciiGlyphs();
        DEFAULT_FONT.addGlyphs(400, 600);
        DEFAULT_FONT.getEffects().add(new ColorEffect(java.awt.Color.white));
        try
        {
             DEFAULT_FONT.loadGlyphs();
        }
        catch (SlickException e)
        {
             e.printStackTrace();
        }
     }
  }

MISC:

This code is called by the circle that is currently rendering at the end of its render function. Info is a multi-line string. LWJGL version 2.8.3.

UPDATE: This appears to a problem with the alpha. depending on what text I output, the rest of the drawing shows up very faintly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:46:25+00:00Added an answer on June 15, 2026 at 7:46 pm

    I needed to add glDisable after the text rendering. The following code works perfectly:

    GraphicsUtil.DEFAULT_FONT.drawString(x, y, info);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done a graphics project using OpenGL and now I want to convert
Here's the basic situation: I have an OpenGL VBO that draws a 2D symbol
I have an iPhone OpenGL-ES 1.1 project that renders simple 3D models. If I
I have an OpenGL application that outputs stereoscopic 3D video to off-the-shelf TVs via
I'm working on a (c++, opengl) project where I need to have lots of
I have been working on a project of OpenGL. Here I just display a
I have a simple OpenGL project in Xcode. Xcode started to behave in a
I'm working on an openGL project and have chosen to use GLUI for my
I have a problem whit my little Opengl/freeglut/c++ 2D editor project. the editor allows
I have included the opengl.framework and glut.framework from /systems/library/framework into my xcode project. However

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.