Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Sep 23, 2017 9:43 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 1:20 am 
Offline

Joined: Thu Oct 12, 2006 7:21 am
Posts: 415
Location: California
I'm trying to make a rotating prize wheel for a trade show coming up in a couple of weeks. I got my test wheel spinning, but when you compare it to the original image for some reason it looks distorted and not even. I'm not sure why this is the case as I set the width and height to 512 and the image is 1024X1024 perfectly square, the circle seems oval like. I'm not sure how to fix this or what I'm doing wrong. Any help would be much appreciated!

I'm attaching my source code and files you need to help.

You can download them at http://itechware.com/downloads/prizewheel.zip

I'm using the Super Sprite Surface And Realbasic 2010 Release 2.1

_________________
Joe Astrahan
CEO - iTechware Inc.
iTechware - Internet, Technology & Software
Google Adwords Campaign Management
"Rocketing you to the top!"
10900 Los Alamitos Blvd, Suite #210
Los Alamitos, CA, 90720
(949)354-4ADS


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 3:12 am 
Offline

Joined: Thu Aug 18, 2011 5:24 pm
Posts: 39
On my screen, it's opening full screen. I'm going to guess that the fact that my screens ratio isn't 1:1, the app is being scaled (thus stretched) to fit.

For what it's worth, my system really disliked running that in debug. OpenGL issue maybe? (It's been a long time since I worked with OpenGL, but perhaps it opens full screen by default? Someone else should be able to help you with that.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 6:14 am 
Offline

Joined: Thu Oct 12, 2006 7:21 am
Posts: 415
Location: California
Yeah I made the superSpriteSurface lock to the window, and set it's height and width accordingly also, does this somehow change all the elements inside? (Like making my spinning wheel look ovalish instead of a true circle?) If so how do I make it stretch to full screen without doing that then?

_________________
Joe Astrahan
CEO - iTechware Inc.
iTechware - Internet, Technology & Software
Google Adwords Campaign Management
"Rocketing you to the top!"
10900 Los Alamitos Blvd, Suite #210
Los Alamitos, CA, 90720
(949)354-4ADS


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 12:10 pm 
Offline

Joined: Thu Aug 18, 2011 5:24 pm
Posts: 39
Have you tried "drawing" the wheel using OpenGL rather than a sprite? Seems easier to make a plain circle that way. I would assume you could overlay your graphic on the circle wheel object and then animate that. (I didn't look at the code much last night so if that's what you are doing already, disregard my thoughts.)

For what it's worth, the "wheel" has a somewhat dimensional look, as if you were looking down on a roulette wheel rather than something on a flat plane. Maybe if you can't get this to work as designed in time, you could make some supporting graphics to make it look like that instead. :mrgreen:


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 12:36 pm 
Offline

Joined: Thu Oct 12, 2006 7:21 am
Posts: 415
Location: California
Thanks, but my business partners are very picky about how it needs to be. I've tried many other options like having a picture and doing it in a canvas control but the rotation was sooooo slow, and I really don't want to have to make 360 images and cycle between them if it's not necessary. The rotation in this spriteSurface seems no nice and smooth!

It's possible perhaps that the perspective in openGL for this sprite surface is throwing it off somehow, but in the demo's there doesn't appear to be any problems. I wonder what I did wrong?

I'm willing to pay $'s for help here.

_________________
Joe Astrahan
CEO - iTechware Inc.
iTechware - Internet, Technology & Software
Google Adwords Campaign Management
"Rocketing you to the top!"
10900 Los Alamitos Blvd, Suite #210
Los Alamitos, CA, 90720
(949)354-4ADS


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 1:04 pm 
Offline

Joined: Thu Oct 12, 2006 7:21 am
Posts: 415
Location: California
Apparently I may have figured it out. I think because it's in OpenGL (the spriteSurface), when I stretched the window I have to reset everything and set all my values to normal or else OpenGL does not display correctly. Which may very well be the case. I remember in many games things have to reload once you change resolutions or your screen sometimes, perhaps this is just an issue with openGL.

A way to resize live would be nice, but I'm not sure how.

_________________
Joe Astrahan
CEO - iTechware Inc.
iTechware - Internet, Technology & Software
Google Adwords Campaign Management
"Rocketing you to the top!"
10900 Los Alamitos Blvd, Suite #210
Los Alamitos, CA, 90720
(949)354-4ADS


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 2:56 pm 
Offline

Joined: Thu Oct 12, 2006 7:21 am
Posts: 415
Location: California
I uploaded the newest source code.

I still need help but with something else now.

http://itechware.com/downloads/Prize%20Wheel.zip

I'm trying to get the mouse to receive events over the sprites but it doesn't seem to work. It works in the Demo's provided with SuperSpriteSurface but not in my program and I can't for the life of me figure out what I am doing wrong?

Any ideas?

_________________
Joe Astrahan
CEO - iTechware Inc.
iTechware - Internet, Technology & Software
Google Adwords Campaign Management
"Rocketing you to the top!"
10900 Los Alamitos Blvd, Suite #210
Los Alamitos, CA, 90720
(949)354-4ADS


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 7:05 pm 
Offline

Joined: Thu Aug 18, 2011 5:24 pm
Posts: 39
Not sure why, but when I run the app and the wheel is spinning, if I click away from the window (onto the desktop on my other screen for example), the wheels STOPS. When I click back and click on the wheel, I get the message box that says "Yes".

Perhaps the sprite animation is preventing the mouse to register? Just thought i'd share my findings.


Top
 Profile  
Reply with quote  
 Post subject: Re: Distorted Images Super Sprite Surface (OpenGL Help)
PostPosted: Sat Oct 15, 2011 7:56 pm 
Offline

Joined: Thu Oct 12, 2006 7:21 am
Posts: 415
Location: California
I can't even get it to say "yes" (which is coming from the superSpriteSurface1 regular mousedown event. Not sure how you are getting it to do even that, I've tried very hard to get any responses and can't seem to.

It's so weird though, I'm doing exactly what the DEMO does but the demo works and my program doesn't. I'm really confused. I must have done something fundamentally wrong somewhere.

_________________
Joe Astrahan
CEO - iTechware Inc.
iTechware - Internet, Technology & Software
Google Adwords Campaign Management
"Rocketing you to the top!"
10900 Los Alamitos Blvd, Suite #210
Los Alamitos, CA, 90720
(949)354-4ADS


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group