Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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  
  3 little questions  (Read 1779 times)
0 Members and 1 Guest are viewing this topic.
Offline SDV

Senior Newbie





« Posted 2005-04-02 15:07:44 »

1. i know iv read it here.. but i cant find it anymore.. so how can i deactivate v-sync? (to get max fps... for testing purposes only)
2. iv read something about an ogl profiler.... where what how?
or is a normal profiler good enough to detect ogl bottleholes?
3. what does resize()? (the one from the glenvent listener)
i read it sets the viewport.....
also i need to set the viewport by myself on some places (drawing into textures)... but i need to reset it afterwarts to its original size... is there a better way then use getHight/With from the glcanvas to do this?

thx
Offline rexguo

Junior Devvie




Real-Time Java


« Reply #1 - Posted 2005-04-03 09:20:39 »

There are 2 ways to control vsync:
1. on Windows, via the Display Properties,
  goto the OpenGL settings under Advanced Settings.
2. use the wglSwapIntervalEXT(int n) function.
  if n = 0, vsync is disabled.

For OpenGL info, you can visit my webpage
at http://www.waterlogic.com.sg/opengl
for a list of useful links for beginners.

http://www.rexguo.com - Technologist + Designer
Offline SDV

Senior Newbie





« Reply #2 - Posted 2005-04-04 12:11:31 »

thx
swap intervall works good...
but am i right that the 'w' stands for ms-windows? (no portability)


so can someone answer questions 2 & 3?
especialy 2 cause i would like to see some exact profiling info about my ogl calls
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #3 - Posted 2005-04-04 16:56:39 »

Quote

2. iv read something about an ogl profiler.... where what how?
or is a normal profiler good enough to detect ogl bottleholes?


A normal Java profiler should be able to give you an idea of where time is being spent in the OpenGL portions of your application. The built-in -Xprof profiler in HotSpot used to be a good low-cost way of profiling your app, but it got much more expensive in 1.5. Nowadays I would probably recommend one of the commercial profilers or JFluid.

Quote
3. what does resize()? (the one from the glenvent listener)
i read it sets the viewport.....
also i need to set the viewport by myself on some places (drawing into textures)... but i need to reset it afterwarts to its original size... is there a better way then use getHight/With from the glcanvas to do this?


Before your resize() callback is called, JOGL makes a call to glViewport(0, 0, width, height) where width and height are the parameters supplied by the AWT (and which are equivalent to the component's width and height). Based on this information you can reset the viewport or do any other operations you need to.
Offline Rob Nugent

Junior Devvie




May contain nuts


« Reply #4 - Posted 2005-04-05 06:29:24 »

Quote
thx
swap intervall works good...
but am i right that the 'w' stands for ms-windows? (no portability)


I use glXSwapIntervalSGI on Linux. My code does:

1  
2  
3  
4  
5  
6  
7  
8  
9  
        if (gl.isExtensionAvailable("WGL_EXT_swap_control")) {
            System.out.println("Disabling VSYNC (Win)");
            ((WGL)gl).wglSwapIntervalEXT(0);
        } else if (gl.isExtensionAvailable("GLX_SGI_swap_control")) {
            System.out.println("Disabling VSYNC (X)");
            ((GLX)gl).glXSwapIntervalSGI(0);
        } else {
            System.out.println("Could not alter VSYNC");
        }


Don't know about Mac.

Rob
Offline SDV

Senior Newbie





« Reply #5 - Posted 2005-04-05 10:42:14 »

thx both of u

@ken russel
iv started a thread about java profilers here

@mac
well they have to stick with fps of monitor-refresh-rate/n Wink
Offline girvine

Junior Devvie




Java games rock!


« Reply #6 - Posted 2005-04-07 07:03:55 »

Can i ask why anyone really wants a final refresh rate of more than 24fps since this is the speed of motion video and anything more is spurious?
Offline Rob Nugent

Junior Devvie




May contain nuts


« Reply #7 - Posted 2005-04-07 07:14:03 »

Quote
Can i ask why anyone really wants a final refresh rate of more than 24fps since this is the speed of motion video and anything more is spurious?


Well, I guess because 24fps (or there abouts) is the point at which the brain *starts* to be fooled that it's seeing continuous motion rather than a sequence of individual frames. Higher frame rates do look much smoother, particularly when the viewpoint is moving fast, e.g. try rotating the camera in a scene about a vertical axis. This looks much better and smoother at high frame rates than 24fps. Try it.

I've never quite understood the point of wanting to exceed the monitor's vertical refresh rate though...

Rob
Offline rexguo

Junior Devvie




Real-Time Java


« Reply #8 - Posted 2005-04-07 09:33:10 »

Assume 100Hz refresh rate and a display mode of 1000
pixels horizontally. Moving a sprite across the screen in 1
second will mean a moving a distance of 10 pixels per frame.
Now measure how wide that 10 pixels is on your screen.
Depending on the size of your screen, it can be about
0.5cm. Certainly visible to my eyes...

http://www.rexguo.com - Technologist + Designer
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.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (35 views)
2014-12-09 22:41:13

BurntPizza (70 views)
2014-12-08 04:46:31

JscottyBieshaar (32 views)
2014-12-05 12:39:02

SHC (44 views)
2014-12-03 16:27:13

CopyableCougar4 (40 views)
2014-11-29 21:32:03

toopeicgaming1999 (108 views)
2014-11-26 15:22:04

toopeicgaming1999 (94 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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