You Are Here:

Community: Developer Discussion Boards

#1 Old Fullscreen output trouble on 6630 - 2005-03-24, 14:21

Join Date: Sep 2003
Posts: 67
Location: Ukraine
abovesun
Offline
Regular Contributor
I try to render 3d scene.
Scene rendering with some trouble. It render only on the top part of screen :( but bottom is empty.
There is a code of rendering
public static final void draw3d() {
boolean bound = false;
try
{
try {
g3d.bindTarget(ScreenCanvas.g);
g3d.setViewport(0,0,ScreenCanvas.width, ScreenCanvas.height);
bound = true;
g3d.clear(background);
g3d.render(worldGroup, worldTransform);
} catch (Exception ex) {
System.out.println("Game3d: "+ex.toString()+" "+ex.getMessage());
}
}
finally
{
if (bound)
{
g3d.releaseTarget();
}
}
}
Reply With Quote

#2 Old 2005-05-04, 12:22

Join Date: Mar 2004
Posts: 18
lax@work
Offline
Registered User
I've had the same problem... I solved it something like this:

I presume you get your ScreenCanvas.width and .height by doing somthing like:

(This is in the ScreenCanvas which I presume you extend from GameCanvas)..

width=getWidth();
height=getHeight();

If this is done immidiatly after the canvas has been set as current displayable the width and height return from getWidth() and getHeight() are still refering to the dimensions of the Canvas...

What I did was wait app. 200ms after setting the GameCanvas as the current on display... Something like this

* Part of main class extending midlet. This code is

public void run()
{
Display.getDisplay(this).setCurrent(ScreenCanvas);
ScreenCanvas.init().
}


* This is part of ScreenCanvas extending GameCanvas

public void init()
{
try {
Thread.sleep(200);
}
catch(Exception e) {
}

width=getWidth();
height=getHeight();

.... etc. etc.
}
Reply With Quote

#3 Old 2005-05-17, 18:39

Join Date: Jul 2004
Posts: 10
rainersimon
Offline
Registered User
I have the same problem... The above solution didn't work for me. I set the my GameCanvas as the current displayable, waited, no effect. Could you maybe post a full example? Or did anyone else find a workaround for this?

-Ray
Reply With Quote

#4 Old 2005-05-17, 20:52

Join Date: Feb 2004
Posts: 6
laxity
Offline
Registered User
Did you set fullScreenMode(true)?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ