Skip to main content
gamedev.net
🔒 Locked

Overlay

Started by TeSsL 1 reply 550+ views
Original Post
TeSsL
TeSsL
i am trying to create a 2D overlay on top of my scene but keep getting "NullPointerException".. i did initialise it.. But when i reaches the draw statement, the error pop up. This is my first time using an overlay=x do let me know if i made any silly mistake. Thanks private Overlay overlay; overlay =new Overlay(glDrawable); overlay.draw(x, y, 30, 30);
Lord_Evil
Lord_Evil
Any chance the NPE occurs within the draw function, e.g. is your drawable null?
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
TeSsL
TeSsL
hmm. i tried placing it under both my init and display. Both gives me the same error. But when i print out my gldrawable i got some values.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.