Render to Texture Webstart Demo small help needed

Hi ;D

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 ;D ;D ;D !!!

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

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

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

if so, base it on that…

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. ;D

  • Jens

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 :slight_smile:

What is VAR or VBO ?

[quote]Nah, just use VAR or VBO if they’re available.
[/quote]

  • Jens

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 :slight_smile:

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 … >:( grrrr.

  • Jens

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 :slight_smile:

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

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.

Good Morning ;D

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 8).

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

Hi, ;D

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

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

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

Hi,

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

  • Jens

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

Oh what da f*** !

…why is this so crap ?

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) ::slight_smile:
Anyway, I’ll restore a backup and give it another try…

Please do that :smiley:

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

  • Jens

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

  • elias