Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
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  
  LWJGL Shadow Mapping - Helper Class?  (Read 728 times)
0 Members and 1 Guest are viewing this topic.
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Posted 2013-09-22 14:42:49 »

Whenever I'm reading tutorials about advanced topics in OpenGL, I always wonder.... why didn't they just create a class which encapsulates the functionality, and all you have to do is call some setters, and then specific methods during different times of rendering?

Call me lazy, but when all I want is code to plugin, and all I get are dozens of tutorials that repeat the same thing and all have code examples that are written specifically for their scenario and not a generic one it drives me bonkers! Something that hasn't really changed doesn't need umpteen tutorials! how about a class which does all the heavy lifting =P. I just want to be able to pass a few parameters in (camera direction, up, right, etc) and have it do all the work.

So... now that I'm done ranting, does anyone have a class like this they use for shadow mapping and LWJGL?

Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #1 - Posted 2013-09-22 14:44:10 »

Thats why we use game engines. If you don't feel like feeling with the low level stuff, find an engine and use it. OpenGL is obviously a low level library, people use it for different reasons. Some for games, some for modeling etc... They can't just have a one class fits all sort of solution. Its not going to happen because thats not why opengl exists.

Offline davedes
« Reply #2 - Posted 2013-09-22 15:02:06 »

Yep; don't expect a
HelperClass.createCoolShadowsForMyGame()
function. Wink

JMonkeyEngine has some shadow mapping, though I'm not sure how well it will perform on mobile. Mobile and WebGL usually need some much different treatment; such as depth packing in the shader. Though now depth textures should be supported in some browsers, such as Google Canary.

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

JGO Coder


Medals: 20


Game Engineer


« Reply #3 - Posted 2013-09-22 15:25:50 »

Thats why we use game engines. If you don't feel like feeling with the low level stuff, find an engine and use it.

Game engines require you to use more than just the piece of functionality you want.

OpenGL is obviously a low level library, people use it for different reasons. Some for games, some for modeling etc... They can't just have a one class fits all sort of solution. Its not going to happen because thats not why opengl exists.

Given there are only so many variables that need to be set for rendering shadows, there can be one class fits all sort of solution.  (it doesn't even need to fit all, just most cases).

Yep; don't expect a
HelperClass.createCoolShadowsForMyGame()
function. Wink

Awww come on, why not?

I heard it's as easy as glEnable(LIGHTING_AND_SHADOWING);

Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #4 - Posted 2013-09-22 19:19:22 »

No. You can't have a one class that fits all or only some because thats not how OpenGL was built. You cant say some people want pixel perfect shadows and thats what we are going to do. Some people might want different shadow types, and then they'll have to make their own class. See how this works? People have different ideas. The only reason Java2D can get away with this is because its regarded as a very specific library. You can do this with it, but you cant get more in depth with it. OpenGL allows you to get down to the very core of graphics and do what you want with it. Why would the OpenGL team make something that restricts you to one way of using it? OpenGL is used for so many different things that they just wont do it. glEnable is used for the fixed function pipeline, and doesn't let you change anything about how it works. Is that how you want OpenGL to be, then go find a game engine.

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.

CopyableCougar4 (14 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!