• Advertisement
Sign in to follow this  

Jogl in different class

This topic is 2665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have my main class

public class mymain {
function main(){
//here i create a new of my window class
WindowClass hold = new WindowClass();

//drawing code here doesnt work at all

and I have my WindowClass

class WindowClass {
public GL gl;
//this works just fine
//sets up a frame canvas and gl context
gl = the gl i just setup

//if i put my drawing code here it works just fine

Now my problem is I try to draw a rectangle or do anything via hold.gl it does nothing at all but if I use the exact same code inside my window class it works 100%. Is there somthing I am missing with opengl or do I have to make them friend (not sure what that means exactly) im just throwing stuff out there cause im not getting an error or anything it just seems like it ignores my drawing code.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement