Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (113)
games submitted by our members
Games in WIP (563)
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  
  few questions..  (Read 2209 times)
0 Members and 1 Guest are viewing this topic.
Offline javatypo

Junior Member





« Posted 2003-12-24 13:57:12 »

ok.. im not new to game programming, because ive made a few "games". check out my site,

i was playing with lwjgl 0.5 a while ago.. but i stopped programming for a while. ive been around here b4.

now i got lwjgl 0.8 and was looking at the nehe tutorials.

so first, is there a site or tutorial that explains what all this orthograph stuff, and all the things like

1  
2  
3  
4  
5  
6  
7  
8  
GL.glShadeModel(GL.GL_SMOOTH);            // Enable Smooth Shading
   GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);  // Black Background
   GL.glClearDepth(1.0);                     // Depth Buffer Setup
   GL.glEnable(GL.GL_DEPTH_TEST);            // Enables Depth Testing
   GL.glDepthFunc(GL.GL_LEQUAL);             // The Type Of Depth Testing To Do

    GL.glMatrixMode(GL.GL_PROJECTION);        // Select The Projection Matrix
   GL.glLoadIdentity();    


actually does?

im completely new to opengl and 3d, and 2d using ogl, and i have no clue what that stuff does and i dont know what to look for since i have no idea how opengl works.

thanks..
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #1 - Posted 2003-12-24 19:13:38 »

What you need is the Red Book, aka the OpenGL Programming Guide:

http://www.opengl.org/documentation/red_book_1.0/

The fourth edition, covering up to OpenGL 1.4, is now in the shops, or you can download a (perfectly legal!) PDF of the first edition from that page as well.

Once you've got that you'll need the OpenGL specifications:

http://www.opengl.org/documentation/spec.html

Download the PDF spec for the version of OpenGL you intend to use.  If you don't know what you want, get whatever is supported by your hardware, 1.3 or 1.4 for recent cards, 1.2 for older ones, possibly 1.1 for ill-supported cards.  Check your card's driver docs to see what it supports.

Hellomynameis Charlie Dobbie.
Offline javatypo

Junior Member





« Reply #2 - Posted 2003-12-24 20:11:33 »

awesome thank you very much.

also when i was just playing around with creating a window, using the same code as nehe1.0 does off the lwjgl site, i can never get the window to come up without it saying that the mode is not supported. any suggestions?

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

Junior Member




I love my Java


« Reply #3 - Posted 2003-12-27 01:27:49 »

Hi,

How do you set your Modes ?

Code please  Cool

- jens


The Network is the Music
http://www.mac-systems.de
Offline javatypo

Junior Member





« Reply #4 - Posted 2003-12-27 13:26:21 »

well i was doing what it said in the nehe thing, which is

1  
Window.create("Hello World",50,50,640,480,16,0,8,0);


which should've made a window not fullscreen, but it gave me the mode not supported error.

so then i updated my video card drivers and it worked.

but still any idea why this wouldnt have worked before i updated my drivers?

thanks.
Offline renanse

Junior Member




Intelligence is light to a dark world.


« Reply #5 - Posted 2003-12-27 16:40:21 »

One of my machines here has a (seemingly) similar problem.  It seems that for some reason getAvailableModes is returning modes that have an unsupported refresh rate.  It is a laptop with an nVidia 128MB GeForce card in it (latest detonator drivers)

Renanse  (ruh-NON-say)
Offline javatypo

Junior Member





« Reply #6 - Posted 2003-12-27 19:38:38 »

well i didnt even change the display mode all i did was call window.create.

but after updating drivers on my nvidia riva tnt2, it works but it seemed to slow my computer down a little..
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2003-12-28 09:40:10 »

You generally get a much smaller selection of modes if you try and create a windowed window rather than a fullscreen window, as it depends on what your desktop is set to as to whether certain configurations are available (which is why we put so much emphasis on the way we do fullscreen mode).

Cas Smiley

Offline Mac_Systems

Junior Member




I love my Java


« Reply #8 - Posted 2003-12-28 20:36:34 »

Hi,

for me it looks like a known programming  bug (not really).
But if you write an Application using lwjgl, make sure you are
not trying only to find one Mode to set, you have to try some more. Some cards dislike Deepbuffer bit deep. some cards dislike Stencil bit depth ...and so on. Most problem should be fixed only by iterating a list of Modes.

- jens

The Network is the Music
http://www.mac-systems.de
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2003-12-29 08:31:18 »

That's right. You should get all the available display modes, filter out the ones that aren't acceptable, and then sort them in order of preference. Once you've got this sorted list of modes, you need to iterate through, trying each one in turn until it works. Then that's your screen mode.

With windowed Windows, you've got very little choice but to specify your minimum requirements up front and hope for the best (as it's unlikely you'll get any better success trying various different combinations if you're already going for the minimum). The driver will tend to give you more than you need if it can without sacrificing performance.

Cas Smiley

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

Junior Member




Intelligence is light to a dark world.


« Reply #10 - Posted 2003-12-29 14:02:33 »

Makes good sense and by falling back on other modes when one fails I have fixed my laptop's full-screen issue.  Thanks!

Just wondering though... Why does getAvailableDisplayModes include modes that the screen can't support?  For example, it includes modes that have a refresh rate of 72 when the laptop can only handle 60.

Regards

Renanse  (ruh-NON-say)
Offline elias

Senior Member





« Reply #11 - Posted 2003-12-29 14:18:32 »

Because that's what Windows tells us is available. Probably because Windows don't know for sure either. Actually, what is worse than a failing mode is a mode that is outside the allowed frequency range that _succeeds_ resulting in a black screen. The user thinks the game crashed and the game thinks that everything is OK in the world.

- elias

Offline renanse

Junior Member




Intelligence is light to a dark world.


« Reply #12 - Posted 2003-12-29 14:21:26 »

Is there a good way to prevent that from occuring?

Renanse  (ruh-NON-say)
Offline elias

Senior Member





« Reply #13 - Posted 2003-12-29 14:32:36 »

Not that I know of. My current hack is to prefer 60 Hz when sorting the modes. And if I'm not wrong, a lot of retail games do the same.

- elias

Offline Mac_Systems

Junior Member




I love my Java


« Reply #14 - Posted 2003-12-29 19:55:57 »

Hi,

i allways only accept DisplayModes with 60 HZ, all other
are unsave to Init !

-jens


The Network is the Music
http://www.mac-systems.de
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2003-12-30 09:03:12 »

In the lower resolutions (800x600 or less) you're usually safe up to 72Hz as well.

Cas Smiley

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.

Dwinin (16 views)
2014-09-12 09:08:26

Norakomi (50 views)
2014-09-10 13:57:51

TehJavaDev (58 views)
2014-09-10 06:39:09

Tekkerue (27 views)
2014-09-09 02:24:56

mitcheeb (50 views)
2014-09-08 06:06:29

BurntPizza (34 views)
2014-09-07 01:13:42

Longarmx (20 views)
2014-09-07 01:12:14

Longarmx (23 views)
2014-09-07 01:11:22

Longarmx (22 views)
2014-09-07 01:10:19

mitcheeb (31 views)
2014-09-04 23:08:59
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!