Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  
  [To be deleted]  (Read 2692 times)
0 Members and 1 Guest are viewing this topic.
Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Posted 2012-06-25 15:56:29 »

[EDIT:]
I apologize.
This topic is not helpful at all. I really think its better to delete this, than propably causing flame-wars or whatever. If I would write another topic about JogAmp, LWJGL will not be discussed.
I hope you understand, and I hope this will be deleted soon...

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2012-06-25 16:28:38 »

why did you choose that only-static lib LWJGL? Object-orientation is awesome.
LWJGL is static-only because it allows you to copy-and-paste sourcecode from C to Java, using static imports. This is very convenient and allows you to keep your code 'clean', but not having to pass a 'gl' instance around in every remote corner of your app. IMHO this is still the way to go, and is actually how the OpenGL API was designed. Don't expect to use JOGL and be able to interleave calls to different 'gl' instances: you still have to manage contexts yourself. Behind the scenes, JOGL simply makes static (native) calls to OpenGL, just like LWJGL.

Why didn't you go with JogAmp?
LWJGL was there first, there was nothing to go with.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2012-06-25 16:35:54 »

Indeed, OpenGL is not an object-oriented API. We mapped it directly so you could invent your own object-oriented abstraction for it. However, as this is not how graphics drivers or hardware works, it is probably not so wise to do it. Creates ugly as hell code too.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2012-06-25 16:36:03 »

As this thread is likely to spiral out of control, not in the last place due to statements like: "In the end I'd say LWJGL is good for Java-newbes", I think it's best to urge everybody to only reply to factual statements, ignoring any strong subjective statements that might be posted. Otherwise this thread will be locked quickly.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #4 - Posted 2012-06-25 16:38:08 »

I retract my previous statement about code ugliness and leave the aphorism "beauty is in the eye of the beholder" Smiley

Cas Smiley

Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #5 - Posted 2012-06-25 16:54:56 »

Should I maybe leave out the LWJGL vs JogAmp thing?
I apologize. This is a critical point, and everyone should decide that by themselves.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2012-06-25 17:17:20 »

If you really want an OO graphics api, then use JME, or Ardour3d, both of which have both lwjgl and jogl backends.

If you want to code OpenGL, then lwjgl's static interface is the closest to the original C api as you'll get. This is good because it means all the documentation and code on the web still applies.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline ags1

JGO Ninja


Medals: 46
Projects: 2
Exp: 5 years


Make code not war!


« Reply #7 - Posted 2012-06-25 19:42:59 »


LWJGL is static-only because it allows you to copy-and-paste sourcecode from C to Java, using static imports. This is very convenient and allows you to keep your code 'clean', but not having to pass a 'gl' instance around in every remote corner of your app. IMHO this is still the way to go, and is actually how the OpenGL API was designed. Don't expect to use JOGL and be able to interleave calls to different 'gl' instances: you still have to manage contexts yourself. Behind the scenes, JOGL simply makes static (native) calls to OpenGL, just like LWJGL.

Ah. I see! A new fact learned Smiley

Offline lhkbob

JGO Knight


Medals: 32



« Reply #8 - Posted 2012-06-25 20:39:54 »

I like the static API of LWJGL but sometimes I find it awkward to remember which version of opengl the function was defined in (choosing between GL11, GL15, etc.) while having a GL object allows inheritance to define the different opengl versions (and to remove functionality in the case of moving to Opengl 3+).

One thing that I've always been confused about in both JOGL and LWJGL is what happens when an ARB function is invoked. In JOGL, the API doesn't even expose ARB so I'm assuming that it must do something like GLEW and calls the ARB version if no core function is available.  With LWJGL, both the ARB and core functions can be called explicitly in Java but if I call the ARB and the core is available, will it upgrade and call the core function?

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2012-06-25 21:00:57 »

With LWJGL, both the ARB and core functions can be called explicitly in Java but if I call the ARB and the core is available, will it upgrade and call the core function?
LWJGL does nothing but wrap calls.

When you call the ARB version, like glBufferSubDataARB(...), the ARB version is called in OpenGL.
When you call the core version, like glBufferSubData(...), the core version is called in OpenGL.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline theagentd
« Reply #10 - Posted 2012-06-26 06:21:00 »

With LWJGL, both the ARB and core functions can be called explicitly in Java but if I call the ARB and the core is available, will it upgrade and call the core function?
LWJGL does nothing but wrap calls.

When you call the ARB version, like glBufferSubDataARB(...), the ARB version is called in OpenGL.
When you call the core version, like glBufferSubData(...), the core version is called in OpenGL.
Worth noting is that there won't be a difference between them as long as both are supported and the function/constant names are identical (except for the added suffix (ARB, EXT, etc)). Of course it does not make sense to use both the core AND the extension version of a feature. It should be safe to use OpenGL 2 (shaders, multitexturing, VBOs) on 99% of all computers. If you want FBOs, the extension is supported by OpenGL 2 hardware, but it was only promoted to core in OpenGL 3.

Myomyomyo.
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.

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35

quew8 (33 views)
2014-07-13 13:57:52

SHC (70 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!