Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (416)
games submitted by our members
Games in WIP (306)
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  
  Shadow Mapping, minus the GLUT  (Read 767 times)
0 Members and 1 Guest are viewing this topic.
Offline OpenGLShaders

Senior Newbie




Currently writing a game engine.


« Posted 2012-06-29 02:36:06 »

Recently I have been working on shadow mapping, and have found some(what look like) good tutorials.
However, they all are in C++ and they all use GLUT.

It looks like they need this line:
1  
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH);


If I understand it correctly, I shouldn't need to worry about the first 3 modes,
But I am guessing I need either a render buffer, or some sort of pixel format in display.create() to replace the fourth mode. Or am I wrong, and I don't need that at all?  Roll Eyes

Any help is greatly appreciated.

~OpenGLShaders
Offline ra4king

JGO Kernel


Medals: 291
Projects: 2


I'm the King!


« Reply #1 - Posted 2012-06-29 07:32:23 »

Assuming that you're using LWJGL, the Display class is basically the 'GLUT' of Java. Display.create() creates a double buffered OpenGL context with a 24-bit color buffer and an 8-bit depth buffer, so you don't need to worry about any GLUT stuff at all.

Offline OpenGLShaders

Senior Newbie




Currently writing a game engine.


« Reply #2 - Posted 2012-06-29 14:07:00 »

Wow, I feel stupid  Smiley Thanks for your help
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sproingie
« Reply #3 - Posted 2012-06-30 02:53:35 »

Display, Keyboard, and Mouse make up the GLUT replacements.  Note that none of it is event-based like GLUT, you have to poll for input and window events, so any C++ code using the callbacks will have to be switched around a bit.  

GLUT also defines some geometry primitives, including the iconic teapot, but those are very old-school and don't fit in modern opengl.  If you're really jonesing for a teapot, I did get around to porting the one in JOGL, but I'd recommend going with a VBO version of the teapot and working with that instead.
Offline OpenGLShaders

Senior Newbie




Currently writing a game engine.


« Reply #4 - Posted 2012-07-04 01:39:03 »

Ok, but first I have to make the shadows Cheesy
I don't know what, but they aren't drawing.
Maybe something with my matrices. Sad
Offline theagentd
« Reply #5 - Posted 2012-07-04 03:12:35 »

Ok, but first I have to make the shadows Cheesy
I don't know what, but they aren't drawing.
Maybe something with my matrices. Sad
You need an FBO (or the deprecated PBO) to do shadow mapping.

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

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
mrbenebob (10 views)
2013-06-20 02:55:23

BrassApparatus (18 views)
2013-06-19 20:52:37

NegativeZero (21 views)
2013-06-19 15:31:52

NegativeZero (24 views)
2013-06-19 15:24:09

Jesse_Attard (27 views)
2013-06-19 10:03:02

HeroesGraveDev (65 views)
2013-06-16 11:35:23

Vermeer (64 views)
2013-06-15 08:08:06

davedes (65 views)
2013-06-15 04:03:55

alaslipknot (58 views)
2013-06-13 19:56:31

Roquen (80 views)
2013-06-12 16:12:32
Smoothing Algorithm Question
by UprightPath
2013-05-28 02:58:26

Smoothing Algorithm Question
by UprightPath
2013-05-28 02:57:33

Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38
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!