Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (515)
Games in Android Showcase (122)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Prerelease of LWJGL 0.7  (Read 1688 times)
0 Members and 1 Guest are viewing this topic.
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Posted 2003-07-16 21:46:50 »

This is just a small notice to notify you guys that a prerelease of 0.7 has been released!
get it while it's hot:
http://www.lwjgl.org/

Offline cfmdobbie

Senior Duke


Medals: 1


Who, me?


« Reply #1 - Posted 2003-07-17 12:42:34 »

Just to confirm - you create an instance of GL with the specification of the window you require in the constructor and create() it, then use static methods to make your usual OpenGL calls, then destroy the instance when you're done?

And the LWJGL-specific methods (tick, paint etc) are called on the instance you've created, not statically on the class?

I think I'm a little confused here... Grin

Hellomynameis Charlie Dobbie.
Offline elias

Senior Duke





« Reply #2 - Posted 2003-07-17 14:26:10 »

That particular problem might be my doing. Matzon completely agrees with you (he can't defend himself in his next week of vacation).

My reasoning is this: the static gl calls are on the _current_ gl context, and the current gl context can either be a Pbuffer or a gl window. For me, it's irrelevant that there can only be one window at a time. Massive critics will probably change my oppinion though in time for 0.7 final. So in my view, the gl window should be in a separate class, not along with the gl calls.

- elias

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2003-07-17 15:03:44 »

I was siding with Matzon on this one because it's more consistent with the other APIs but I'm coming round to the idea of the window being a separate entity from GL.

Cas Smiley

Offline psiegel

Junior Duke




Adamant about gaming.


« Reply #4 - Posted 2003-07-17 17:11:40 »

I think I like what Elias is saying here.  Let me just make sure I get it.  

I think what you're saying is CoreGL should no longer extend Window.  That in fact the process would look something like this:

-- Pseudocode --
1  
2  
3  
4  
5  
6  
7  
8  
9  
  Window w = new Window(x, y, width, height, pixeldepth);
  GL.setContext(w);
 
  while(appIsRunning) {
    GL.drawABunchOfShit();

    w.paint();
    w.tick();
  }


Actually,  it seems to me that a system like this could have multiple windows if it wanted to.  But maybe I'm way off base here.  Elias?

Paul

Paul Siegel
Adamant Games, Inc.
http://www.adamantgames.com
Offline elias

Senior Duke





« Reply #5 - Posted 2003-07-17 17:19:02 »

Not quite. Here's what I'm saying:

The inheritance tree is right now:

Window<-BaseGL<-CoreGL<-GL
Pbuffer

What I want is something like:

Window<-BaseGL(probably named GLWindow or something)
Pbuffer
CoreGL<-GL

Thereby making the gl function set (CoreGL, GL) a separate structure from the possible gl contexts (Pbuffer, BaseGL). The reason Window exists is because of Cas' and Matzon's wish to create a LWJGL 2d window someday. Like this:

Window<-BaseGL
               <-Base2D

Window therefore contains the window specific handling, like message loops and abstract methods like paint() and tick().

Allowing multiple windows would not be that hard really, but I'm not sure we want to go that way, design-wise. After all, who need two GL windows anyway? 99% of the time you want multiple windows, you really want multiple contexts in the same window, maybe mixed with some swing.

- elias

Offline psiegel

Junior Duke




Adamant about gaming.


« Reply #6 - Posted 2003-07-17 18:12:18 »

Ah, I see.   What's confusing currently is that GL has both the static methods and a constructor.  That definitely should change one way or the other.  And personally, I like the idea of the static methods being separate from the Window object.

Paul

Paul Siegel
Adamant Games, Inc.
http://www.adamantgames.com
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2003-07-18 06:01:31 »

Plenty of people "need" more than one window... but they'll be using JOGL Cheesy We're trying to design a system that'll work on everything from a phone through to a PC without horrid kludges.

The new heirarchy you've outlined is much more sensible now we've ditched the GL-is-an-object idea, which is why it grew into the strange shape it did in the first place.

Cas Smiley

Offline cfmdobbie

Senior Duke


Medals: 1


Who, me?


« Reply #8 - Posted 2003-07-18 17:48:25 »

The line that's currently annoying me is:

1  
if(gl.isMinimized())


I mean, logically that make no sense at all.  Probably worth splitting the two up just to avoid "Huh?!" moments like that.

Ach, I'm sure it'll all work out in the end.  I tend to adapt quite quickly... Grin

Edit: Typo

Hellomynameis Charlie Dobbie.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (30 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (39 views)
2014-10-26 19:37:11

Luminem (21 views)
2014-10-26 10:17:50

Luminem (25 views)
2014-10-26 10:14:04

theagentd (31 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (57 views)
2014-10-16 15:22:06

Norakomi (46 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!