IVideoModeList ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Battlestations
Posts: 10
Joined: Sun Jan 18, 2004 10:46 pm
Location: USA
Contact:

IVideoModeList ?

Post by Battlestations »

Hi,

I am trying to print the video mode list with a printf statment and am getting problems? How do i do it with this given.

Code: Select all

	s32 video_count = 0;
	s32 i = 0;
	device = createDevice(video::EDT_NULL,
		core::dimension2d<s32>(0, 0), 16, false, false, NULL);

	if(!device)
		return 0;

	IVideoModeList *video_list = device->getVideoModeList();
	video_count = video_list->getVideoModeCount();

	
	for( i = 0; i < video_count; i++)
	{
		printf(" Item:%i Mode:%s\n", i, video_list);//??

	}
	
	video_list->drop();
	device->drop();
Ok, now how do i print the list or get the info from video_list?
I tried several different things and am not getting any text. Am I not doing something right here?
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

http://irrlicht.sourceforge.net/docu/cl ... eList.html

hrm, that doesnt seem to help very much. it doesnt seem to list video modes so much as give the current stats (res, color depth, etc)
a screen cap is worth 0x100000 DWORDS
Battlestations
Posts: 10
Joined: Sun Jan 18, 2004 10:46 pm
Location: USA
Contact:

Post by Battlestations »

Ok, so how do I get the list of available video choices..(part of that email i sent you about a template idea i wanted to make for a beginner, like I am)
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

from the documentation, i cant really see how you can get a list form it-- just the current status.

here is a link to Saigumi's XML gui project:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=1095
a screen cap is worth 0x100000 DWORDS
Battlestations
Posts: 10
Joined: Sun Jan 18, 2004 10:46 pm
Location: USA
Contact:

Post by Battlestations »

Got It!

For anyone wanting to know how to enumerate em, here ya go..

Code: Select all

IrrlichtDevice *device = 0;
#include <stdio.h>
int main(int argc, const char *argv[])
{
	s32 video_count = 0;
	s32 i = 0;
	device = createDevice(video::EDT_NULL,
		core::dimension2d<s32>(0, 0), 16, false, false, NULL);

	if(!device)
		return 0;

	IVideoModeList *video_list = device->getVideoModeList();
	video_count = video_list->getVideoModeCount();
			
	for( i = 0; i < video_count; i++ )
	{
		printf(" Item:%i Resolution:%ix%i Depth:%i\n", i, video_list->getVideoModeResolution(i), video_list->getVideoModeDepth(i));

	}
This took way to long for me to figure out.. :(
Post Reply