Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
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  
  get as much video memory I have  (Read 4485 times)
0 Members and 1 Guest are viewing this topic.
Offline tuxan

Junior Newbie





« Posted 2011-01-22 01:40:03 »

Hi all, I need to know how much video memory I have.
This is to analyze the results of a performance test.

Is it possible to get the amount of video memory using JOGL?

Thanks
Offline lhkbob

JGO Knight


Medals: 32



« Reply #1 - Posted 2011-01-22 08:45:54 »

Looking at JOGL's API I don't think it is possible.  Googling for OpenGL video card memory turned up poor results.  It looks like most of the ways that you check are through OS specific windowing APIs and isn't part of the OpenGL spec.

Offline Mike

JGO Wizard


Medals: 81
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #2 - Posted 2011-01-22 09:18:48 »

from OpenGL.org:
Quote
If you need to find out how much video memory your video card has, you need to ask the OS. GL doesn't provide a function since GL is intended to be multiplatform and on some systems, there is no such thing as dedicated video memory.

Humm... what do we know that is multi platform and allows us to talk to the graphics card... ;-)
1  
System.out.println(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getAvailableAcceleratedMemory());


Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2011-01-22 12:06:03 »

Is it possible to get the amount of video memory using JOGL?
Yes it is possible, there are one extension doing this for NVIDIA and another one for ATI (GL_ATI_meminfo).

Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #4 - Posted 2011-01-22 14:08:33 »

Is this any good?
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #5 - Posted 2011-01-22 14:54:27 »

there is no standardised way to query HW info via OpenGL. You could use JOCL and device.getGlobalMemSize() (and the other getFooMemSize() methods) but those are implementation dependent and usually return less than the physical mem size.

or take a look at those extensions:
http://www.opengl.org/registry/specs/ATI/meminfo.txt
http://developer.download.nvidia.com/opengl/specs/GL_NVX_gpu_memory_info.txt

(we usually don't expose vendor dependent extensions in JOGL, but feel free to file a bug at http://jogamp.org/bugzilla/)

Offline gouessej
« Reply #6 - Posted 2011-01-23 11:49:49 »

lspci -vvv is useful for this on Linux, XNVCTRLQueryAttribute for Nvidia too and this for Windows in general:
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=247174#Post247174

SDL has a nice method to do it:
http://www.libsdl.org/cgi/docwiki.cgi/SDL_VideoInfo

Offline tuxan

Junior Newbie





« Reply #7 - Posted 2011-01-23 23:52:27 »

Is it possible to use SDL in an applet?, is to do like JOGL? (AppletLauncher)

Thanks for your answers
Offline gouessej
« Reply #8 - Posted 2011-01-24 10:38:05 »

Is it possible to use SDL in an applet?, is to do like JOGL? (AppletLauncher)

Thanks for your answers
Java binding of SDL is really crappy (and SDL itself becomes crappy too), I think it could be a source of inspiration to find a nice way of querying the total video memory. However, in my humble opinion, you will never find a nice cross-platform way of getting such an information. After some searches, you cannot even query this info with the same way if you use Vista/7 or XP; in one case, WMI works. Rather use another approach, try to detect OpenGL errors, especially out of memory errors when they occur.

Offline tuxan

Junior Newbie





« Reply #9 - Posted 2011-01-24 16:32:22 »

gouessej: Thanks for your answer.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2011-01-24 16:46:34 »

Maybe suggest a request for enhancement to LWJGL for this feature. We have a pragmatic approach to requirements like this.

Cas Smiley

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #11 - Posted 2011-01-24 21:01:17 »

What's exactly the difference between this
1  
System.out.println(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getAvailableAcceleratedMemory());

and what's actually required? Is it totally unrelated, or just unreliable?

Offline tuxan

Junior Newbie





« Reply #12 - Posted 2011-01-25 00:16:57 »

Did not work for me  Undecided
On all computers I tried the result was -1
Offline gouessej
« Reply #13 - Posted 2011-01-26 18:46:38 »

Maybe suggest a request for enhancement to LWJGL for this feature. We have a pragmatic approach to requirements like this.

Cas Smiley
This is not the right place to speak about another Java binding for OpenGL.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #14 - Posted 2011-01-27 21:40:34 »

Maybe suggest a request for enhancement to LWJGL for this feature. We have a pragmatic approach to requirements like this.

Cas Smiley
This is not the right place to speak about another Java binding for OpenGL.

Um, why not? This is an issue that concerns all OpenGL bindings, even if it was posted in the JOGL section.

Offline gouessej
« Reply #15 - Posted 2011-01-27 22:33:28 »

Um, why not? This is an issue that concerns all OpenGL bindings, even if it was posted in the JOGL section.
but this is the JOGL section and he is asking for help. Imagine that you have a problem with your General Motors car, someone comes to you, you think that he is going to help you. Instead of helping you, he tries to sell an Audi car, it does not solve your problem and I'm sure you would be disappointed in such a situation.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #16 - Posted 2011-01-27 22:41:33 »

Um, why not? This is an issue that concerns all OpenGL bindings, even if it was posted in the JOGL section.
but this is the JOGL section and he is asking for help. Imagine that you have a problem with your General Motors car, someone comes to you, you think that he is going to help you. Instead of helping you, he tries to sell an Audi car, it does not solve your problem and I'm sure you would be disappointed in such a situation.

The difference being that Cas doesn't sell anything here, he's offering a possible and practical path to a solution.
Following your analogy, if JOGL is a free Opel and LWJGL a free Audi, I might be tad disappointed with General Motors for not having the same attitude Smiley

Offline gouessej
« Reply #17 - Posted 2011-01-28 11:37:10 »

The difference being that Cas doesn't sell anything here, he's offering a possible and practical path to a solution.
Following your analogy, if JOGL is a free Opel and LWJGL a free Audi, I might be tad disappointed with General Motors for not having the same attitude Smiley
The "solution" proposed by princec is not a solution to this precise problem for a JOGL user, it is not a solution that uses JOGL. Therefore, my analogy is fine except that both bindings are free of charge. This is the JOGL section, proposed solutions have to use JOGL. If someone hesitates between the use of both bindings, it is not the appropriate place to speak about it. If JOGL was abandoned, I would understand that some people would suggest alternative APIs as we already do for Java3D but it is not the case, JOGL is alive.

Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #18 - Posted 2011-01-28 13:06:03 »

This is the JOGL section, proposed solutions have to use JOGL.
I'm having difficulty understanding why this restriction is necessary. It seems like an arbitrary rule that can only reduce the quality and amount of help that the forum can offer. Could you perhaps explain what undesirable outcome it is protecting us from?
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #19 - Posted 2011-01-28 14:25:32 »

This issue was also the reason the two forms were merged into one so that resources of all opengl developers can be pooled/shared in one area so everyone can benefit (also so any silly flame wars can be avoided), if I remember correctly it was just a technical issue/limitation at the time which prevented this.
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #20 - Posted 2011-01-28 18:13:17 »

The difference being that Cas doesn't sell anything here, he's offering a possible and practical path to a solution.
lol, you guys are so funny. Cas' pragmatic answer was to ask him to file a RFE for an API the thread opener is not using.


Sure you could merge both categories to 'OpenGL', compete against opengl.org and gamedev.net GL forums which would encourage members to post api specific questions to jogamp.org / lwjgl.org / whatever.org. Question is: where is the gain for JGO?

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #21 - Posted 2011-01-28 18:18:35 »

This issue was also the reason the two forms were merged into one so that resources of all opengl developers can be pooled/shared in one area so everyone can benefit (also so any silly flame wars can be avoided), if I remember correctly it was just a technical issue/limitation at the time which prevented this.

Now that I have SQL access (well doh!) I could merge them with a one-liner (and break all external links to these threads...)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline gouessej
« Reply #22 - Posted 2011-01-30 23:04:49 »

lol, you guys are so funny. Cas' pragmatic answer was to ask him to file a RFE for an API the thread opener is not using.
Thanks bienator. Ryanm, the restriction that I mentioned should protect us from what bienator explained to us better than me. I have already explained what I meant, speaking about another API which is a competitor of JOGL does not solve the problem that is related on JOGL, JOGL is not a stalled project, using another API is not the solution. If you want to speak about both APIs, a better place is the general OpenGL section. Using a thread opened by someone asking for help on JOGL to promote a competitor of JOGL is not what I call a pragmatic answer, is that clear now?

This issue was also the reason the two forms were merged into one so that resources of all opengl developers can be pooled/shared in one area so everyone can benefit (also so any silly flame wars can be avoided), if I remember correctly it was just a technical issue/limitation at the time which prevented this.
In my humble opinion, it would be almost the same and maybe even worse than now, the same people would use threads opened by people asking for help to promote something and it would be considered acceptable because there would be no API-specific section.

Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #23 - Posted 2011-01-30 23:22:53 »

FYI I usually have no idea what subforum any thread is in, as all I ever hit is "show unread posts since last visit".

Nor do I care any more. Subforums are largely irrelevant really when you use that link.

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.

radar3301 (9 views)
2014-09-21 23:33:17

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (18 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

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

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

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

Tekkerue (50 views)
2014-09-09 02:24:56
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!