Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (553)
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  
  Render to Texture Webstart Demo small help needed  (Read 3309 times)
0 Members and 1 Guest are viewing this topic.
Offline Mac_Systems

Junior Member




I love my Java


« Posted 2003-08-11 19:43:27 »

Hi  Grin

as promised i ported the Nehe Tutorial Lessen # 36.
But some trouble i have there with the Init of the Fullscreenmode.

Most Examples use create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil)  Method.

But when i try to init the fullscreen Mode with Display.setDisplayMode(DisplayMode) i  often run into exceptions that the alpha or depth values are too high! Often i try to lauch the fullscreen with a depth of 24Bit. But it seems not to work on all modes. Is there something i havent understand yet about using GL ?

For a first impression you can see the Webstart Demo(without fullscreen), actually only on Windows maschines by this link:

http://www.mac-systems.de/rendertotexture.html

My site is allmost in german. anyway it seems that LWJGL rocks  Grin Grin Grin !!!

As i want to fix this problem and also want to support the other OS, could someone post some generic Init code for doing that ?

Bye the way. You can experiment a bit with all parameters for the Demo, but before please close the Render Window, and click again on "Start" Button

Thx 4 response,

- Jens


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

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2003-08-12 05:11:10 »

Nice! - works perfectly, albeit slow on this crappy oldskool gfx card (TNT2, Athlon 1Ghz) - at least in 640*480 windowed mode :/

As for initialization code, does org.lwjgl.test.opengl.FullScreenWindowedTest work fine for you?

if so, base it on that...

Offline Mac_Systems

Junior Member




I love my Java


« Reply #2 - Posted 2003-08-12 07:39:01 »

Yep,

i plan to support both Fullscreen and Windowed mode.
But under my Geforce2 mx 400 it also had poor performance, i will recode the helix generation  code to use display lists.  Grin

- Jens



The Network is the Music
http://www.mac-systems.de
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 363
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2003-08-12 09:02:11 »

Nah, just use VAR or VBO if they're available.
It works pretty well here too, but could do with a fullscreen option to make it faster.


Cas Smiley

Offline Mac_Systems

Junior Member




I love my Java


« Reply #4 - Posted 2003-08-12 10:02:08 »

What is VAR or VBO ?

Quote
Nah, just use VAR or VBO if they're available.


- Jens

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

JGO Kernel


Medals: 363
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2003-08-12 10:57:13 »

VAR is Nvidia's Vertex Array Range extension (NV_vertex_array_range and NV_vertex_array_range2)

VBO is the new ARB-approved Vertex Buffer Object extension which accomplishes a similar thing in a different, cross-platform way.

There's also ATI buffer objects, for ATI cards only, which was the precursor to VBO.

All of these are theoretically as fast as display lists on consumer class hardware and avoid certain artifacts in rendering.

Cas Smiley

Offline Mac_Systems

Junior Member




I love my Java


« Reply #6 - Posted 2003-08-12 11:06:50 »

Thx ..i will have a look at it next.

hmm, some bottleneck i have in the Render To Texture Demo. But with the FullScreenWindowedTest shows me how to init the Screen. I will try to fix that now, and upload the fixed version asap. As this is only some Basic Stuff in Gl this should almost run far beyond the 100 fps on Geforce based cards  i think, but it doesnt't ..   Angry grrrr.

- Jens



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

JGO Kernel


Medals: 363
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2003-08-12 13:03:42 »

You'll find that rendering to a window is probably what's costing you the most performance. When you render to a window you have to share the screen with all of the other bits and bobs that want to be drawn, so the driver can't give you exclusive access to the hardware context.

Cas Smiley

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #8 - Posted 2003-08-12 15:11:02 »

Interesting.  Given that, might in certain situations it be useful to keep seperate detail prefs for windowed and full-screen modes then?

Hellomynameis Charlie Dobbie.
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #9 - Posted 2003-08-13 03:39:29 »

IMO, the best would be to make the pref window "ingame". However what Cas means is that when the LWJGL window isn't fullscreen it can't run at full steam due to technical issues. Whether or not a swing pref window is in the background is irrelevant - just as long as the rendering window is fullscreen.

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 #10 - Posted 2003-08-13 08:15:43 »

Good Morning  Grin

i have a Windowed/Fullscreen Version running there local at my maschine. I will clean the source a bit and will upload the new Webstart Demo i think today. After this i plan to send it also to the Nehe Archive. This also supports LWJGL a bit more  Cool.

The Performance is higher in Fullscreen, maybe the poor performance from the less GFX Memory on board on some Cards.

@Matzon maybe this happend on your TNT2 based card, cause the 'Virtual' Texture have transfered through the AGP/PCI Bus. As the Blur Effect is done 25 Times with this 'Virtual' Texture. Maybe you get more performance when limit the Texture Size (default is 128*128 Texel)

- Jens



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

Junior Member




I love my Java


« Reply #11 - Posted 2003-08-15 10:42:47 »

Hi,  Grin

I updated the Webstart Demo to Fullscreen support.
The Demo actual supported only Windows.
I was a bit lazy last 2 Days, so the Demo does not use
Displaylist or something other for the Helix.

I interrested if it will get some better Performance on your maschines now ? It should be ...for me it does  Wink

http://mac-systems.de/rendertotexture.html


- Jens


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

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #12 - Posted 2003-08-15 14:24:31 »

works perfectly! - might want to sort the display mode list!

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #13 - Posted 2003-08-18 09:41:56 »

It works, but the odd thing is that performance is really bad in full screen  Huh about 3fps, much worse than in windowed mode...

Offline Mac_Systems

Junior Member




I love my Java


« Reply #14 - Posted 2003-08-18 18:57:48 »

Hi,

Try some lower Screen Resolution ,
32 Bit is much faster! Grin

- Jens

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

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #15 - Posted 2003-08-19 06:27:17 »

I tried 800x600x32 on both windowed and fullscreen  :-/
Never seen this before: fullscreen being slower than windowed.

Offline Mac_Systems

Junior Member




I love my Java


« Reply #16 - Posted 2003-08-19 09:53:42 »

Oh what da f*** !

..why is this so crap ?






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

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #17 - Posted 2003-08-19 09:59:19 »

maybe it's just my system, though...
I had some more weird problems recently, the msblast virus being one of them (although that was easy to get rid of) Roll Eyes
Anyway, I'll restore a backup and give it another try...

Offline Mac_Systems

Junior Member




I love my Java


« Reply #18 - Posted 2003-08-19 10:04:54 »

Please do that  Cheesy

Bye the Way , The Class GLWindow seems to be no longer Avaible ? Should i use Window ?

- Jens

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

Senior Member





« Reply #19 - Posted 2003-08-19 11:00:19 »

Yes, use Window instead. LWJGL 2d plans are dropped, resulting in a merger of Window and GLWindow.

- elias

Offline Mac_Systems

Junior Member




I love my Java


« Reply #20 - Posted 2003-08-19 11:07:52 »

Hmm,

Conversion was pretty Simple. Grin

ok, my Code runs here at Home, with the new API.
Also i came behind some of the performance bottlenecks.
Seems to be some kind of newbie failure, drawing the Render Text more as needed, with different View Pos, so wasnt to see. Will fix more.

- Jens

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

Junior Member




I love my Java


« Reply #21 - Posted 2003-08-19 17:25:12 »

Hi, Grin

Again i updated the Webstart Demo,
for me it worked quite well now (uses LWJGL 0.7 rc 2)

I added  some more Sliders for Control the Helix Detail
and the nr of Texture used for the 'Blur' effect!
Also a Displaylist were used for Display the Helix.
Also i set the Pirority to Low!

If someone can again check the performance ?

http://www.mac-systems.de/rendertotexture.html

- Jens






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

JGO Kernel


Medals: 363
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #22 - Posted 2003-08-19 20:31:25 »

Works perfectly well here on my Inspiron 8100. (1.2GHz, Geforce2Go, 512MB RAM, JRE1.4.2).

Cas Smiley

Offline Mac_Systems

Junior Member




I love my Java


« Reply #23 - Posted 2003-08-20 08:56:01 »


Hi,

Since yesterday i own some ATI Radeon 9200 GFX Card  Grin, It was so cheap i must buy it.
So i have two Maschines for Tesing lwjgl.

After Install the new GFx Card, the whole Demo crashed....but after download the newest Drivers from ATI the demo runs fine under ATI Chipset...keep on the good work! Did someone tested the 0.7pre 2 under Linux ? I plan to do it next, but i read about some Depthbuffer Problems on Linux. On Windows i dont have specifiy a Depth Buffer when creating a Display for Fullscreen like:
1  
Window.create ( "test" ,displaymode.bpp , 0 , 0 , 0 ) ;


For me this i not correct, cause it should give also DisplayProblems , or am i wrong ?

I've noticed you added a isFullscreen Method on Window.class, good to use!

- Jens








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

Senior Member





« Reply #24 - Posted 2003-08-20 09:45:47 »

It's not really depth buffer problems on linux, it's a misunderstood API. You must _always_ specify your minimum requirements for an OpenGL window in create. That means that if you use the depth at all (very likely), you must have specified depth >0. Just like the bpp argument.

- elias

Offline Mac_Systems

Junior Member




I love my Java


« Reply #25 - Posted 2003-08-20 09:54:13 »

Ok,

but it seems to Wok on Windows without correct value of Depth Buffer, also there a some default value ?

Ok, i would be handy to throw some Excpetion when doing this. Like "WrongDepthBufferSetException"..

- Jens

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

Senior Member


Medals: 1


Who, me?


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

The OpenGL drivers are free to return whatever context they want, as long as it's at least as good as what you asked for.

Given that, it should be clear that you should not ask for no depth buffer and still assume one is there!  That's a particular quirk of your hardware,your operating system and your particular version of the drivers - not something to rely on!

If you want a depth buffer, ask for it.  It's that simple.

Hellomynameis Charlie Dobbie.
Offline Mac_Systems

Junior Member




I love my Java


« Reply #27 - Posted 2003-08-26 20:16:14 »

Fine to read that the final of 0.7 is out,
so i will update the binaries of the Demo also.
Next the Linux version should be added.
Is there somthing to know about Linux and LWJGL ?
Or just easy as under Win ?

- Jens

The Network is the Music
http://www.mac-systems.de
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 (24 views)
2014-08-22 19:31:30

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

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

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

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

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

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

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

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

Norakomi (42 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!