OpenGL Display Lists problem!
Why are OpenGL Display List 4-5 times faster on windows than OSX? Is this a driver problem? iMac 2008, nvidia 8800gs, 10.7.3
Thanks for your answers!
If I use DLon=1; The performance is 4-5 times better on a windows system. On OSX there is no performance gain.
What am I doing wrong?
Sample code:
if (DLon == 1) {
if (DLbuild == 1) {
DLtest = glGenLists(1);
glNewList(DLtest, GL_COMPILE);
init_textures.iso.bind();
for (int i = 0; i <= 4800; i = i + 32) {
for (int j = 0; j <= 6400; j = j + 64) {
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(j, i);
glTexCoord2f(1, 0);
glVertex2f(j + init_textures.iso.getTextureWidth(), i);
glTexCoord2f(1, 1);
glVertex2f(j + init_textures.iso.getTextureWidth(), i + init_textures.iso.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(j, i + init_textures.iso.getTextureHeight());
glEnd();
init_textures.iso2.bind();
for (int i = 16; i <= 4800; i = i + 32) {
for (int j = 32; j <= 6400; j = j + 64) {
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(j, i);
glTexCoord2f(1, 0);
glVertex2f(j + init_textures.iso2.getTextureWidth(), i);
glTexCoord2f(1, 1);
glVertex2f(j + init_textures.iso2.getTextureWidth(), i + init_textures.iso2.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(j, i + init_textures.iso2.getTextureHeight());
glEnd();
glEndList();
System.out.println("DLcompiled");
DLbuild = 4;
glCallList(DLtest);
} else {
init_textures.iso.bind();
for (int i = 0; i <= 4800; i = i + 32) {
for (int j = 0; j <= 6400; j = j + 64) {
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(j, i);
glTexCoord2f(1, 0);
glVertex2f(j + init_textures.iso.getTextureWidth(), i);
glTexCoord2f(1, 1);
glVertex2f(j + init_textures.iso.getTextureWidth(), i + init_textures.iso.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(j, i + init_textures.iso.getTextureHeight());
glEnd();
init_textures.iso2.bind();
for (int i = 16; i <= 4800; i = i + 32) {
for (int j = 32; j <= 6400; j = j + 64) {
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(j, i);
glTexCoord2f(1, 0);
glVertex2f(j + init_textures.iso2.getTextureWidth(), i);
glTexCoord2f(1, 1);
glVertex2f(j + init_textures.iso2.getTextureWidth(), i + init_textures.iso2.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(j, i + init_textures.iso2.getTextureHeight());
glEnd();
the renderer (whatever it uses, quartz extreme) still has a framerate and the monitor still has a framerate (or response time) tho, so if thats partway through rendering a frame when dvi grabs that and sends it out, youll see some tearing. dvi attempts to match its transfer speed to the monitor, but everything still needs to be sent to the video card and in turn the dvi link intact. everything should be synced and passed into an offscreen buffer so an entire 'frame' is there, intact, at once but if the renderer is outputting at a speed that doesnt match the rest of the os then youll end up with partial frames from that renderer.
whilst this problem could be down to the video card, i highly doubt that since it would show problems in all parts of the screen rather than just those rendered using a certain engine.
Similar Messages
-
Problem adding to the display list from a class
If I try to convert as3 in an mxml file into a class file and
create an instance of the class, I am unable to add the instance to
the display list. The original mxml file is at the bottom of the
page. The modified mxml file and its associated class are below.
The problem is that I cannot use addChild(myComponent); So how to I
add the UIComponent to the Display list?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import LoadSwf
private var myLoader:LoadSwf
public function init():void{
myLoader=new LoadSwf()
]]>
</mx:Script>
</mx:Application>
Class:
package{
import flash.display.MovieClip;
import com.adobe.viewsource.ViewSource;
import flash.events.Event
import mx.core.UIComponent
import flash.display.Loader
import flash.events.TimerEvent;
import flash.events.StatusEvent
import flash.net.LocalConnection
import flash.net.URLRequest
import flash.net.URLVariables
import flash.utils.Timer;
public class LoadSwf{
private var request:URLRequest
private var loader:Loader = new Loader();
private var conn:LocalConnection = new LocalConnection();
private var myComponent:UIComponent=new UIComponent();
private var swfTimer:Timer;
private var myParameters:URLVariables ;
public function LoadSwf(){
request= new URLRequest("Login.swf");
myParameters= new URLVariables()
myParameters.loginID = "101";
myComponent.addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
finishedLoading);
loader.load(request);
private function finishedLoading(e:Event):void{
//PROBLEM IN THE FOLLOWING LINE!!!!!!!
addChild(myComponent);
swfTimer = new Timer(10);
swfTimer.addEventListener(TimerEvent.TIMER,sendData);
swfTimer.start();
private function sendData(e:Event):void{
conn.addEventListener(StatusEvent.STATUS, onStatus);
conn.send("myConnection", "lcHandler",
myParameters.loginID);
private function onStatus(event:StatusEvent):void {
if (event.level=="status") {
trace("LocalConnection connected");
swfTimer.stop();
}else if (event.level=="error"){
trace("FAILED to connect")
}"SiHoop" <[email protected]> wrote in
message
news:[email protected]...
> If I try to convert as3 in an mxml file into a class
file and create an
> instance of the class, I am unable to add the instance
to the display
> list. The
> original mxml file is at the bottom of the page. The
modified mxml file
> and its
> associated class are below. The problem is that I cannot
use
> addChild(myComponent); So how to I add the UIComponent
to the Display
> list?
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
> layout="absolute"
> creationComplete="init()">
> <mx:Script>
> <![CDATA[
> import LoadSwf
> private var myLoader:LoadSwf
> public function init():void{
> myLoader=new LoadSwf()
> }
> ]]>
> </mx:Script>
> </mx:Application>
> Class:
> package{
> import flash.display.MovieClip;
> import com.adobe.viewsource.ViewSource;
> import flash.events.Event
> import mx.core.UIComponent
> import flash.display.Loader
> import flash.events.TimerEvent;
> import flash.events.StatusEvent
> import flash.net.LocalConnection
> import flash.net.URLRequest
> import flash.net.URLVariables
> import flash.utils.Timer;
> public class LoadSwf{
> private var request:URLRequest
> private var loader:Loader = new Loader();
> private var conn:LocalConnection = new
LocalConnection();
> private var myComponent:UIComponent=new UIComponent();
> private var swfTimer:Timer;
> private var myParameters:URLVariables ;
> public function LoadSwf(){
> request= new URLRequest("Login.swf");
> myParameters= new URLVariables()
> myParameters.loginID = "101";
> myComponent.addChild(loader);
>
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> finishedLoading);
> loader.load(request);
> }
> private function finishedLoading(e:Event):void{
> //PROBLEM IN THE FOLLOWING LINE!!!!!!!
> addChild(myComponent);
You didn't add this component to the Application, so I
wouldn't expect to
see anything you add in this component in the Application.
HTH;
Amy -
Problems with display-lists (Urgent)
I would like to load 3d polygonal Objects into seperate display lists and deliver them to OGL, which works fine.
But if I want to clean up my screen with the intention to load some new objects, I have the big problem deleting my old display lists.
Maybe the problem is caused by other reasons. But finally my Canvas displays everytime the old 3d Object. Here are some essential snippets of my code:
public class CanvasOGL extends JPanel implements GLEventListener {
public final static int GL_POLYGON_MODE_LINE = 1;
public final static int GL_POLYGON_MODE_FILL = 2;
public final static int GL_POLYGON_MODE_POINT = 3;
private int iGLPolygonMode = 2;
private final GLCapabilities caps = new GLCapabilities();
private final GLJPanel drawable = GLDrawableFactory.getFactory().createGLJPanel(caps);
private GL gl;
private GLU glu;
private float fDistance = -3f;
private float view_rotx = 0f;
private float view_roty = 0f;
private float view_rotz = 0f;
private int prevMouseX;
private int prevMouseY;
private Color bgColor = new Color(255, 255, 255, 0);
private Color fcolor = new Color(222, 222, 222, 0);
private String imagePath = "";
private PgGeometry[] pgGeometries;
private int lists;
public CanvasOGL() {
caps.setAlphaBits(8);
drawable.setOpaque(false);
drawable.addGLEventListener(this);
drawable.addMouseListener(this);
drawable.addMouseMotionListener(this);
drawable.addMouseWheelListener(this);
setLayout(new BorderLayout());
add(drawable, BorderLayout.CENTER);
public void setPgGeometries(PgGeometry pgGeometries[]) {
// delete old lists
if (gl!=null)
gl.glDeleteLists(lists,this.pgGeometries.length);
// create new lists
this.pgGeometries = pgGeometries;
createLists();
drawable.display();
public void setPgGeometry(PgGeometry pgGeometry) {
// delete old lists
if (gl!=null)
gl.glDeleteLists(lists,pgGeometries.length);
// create new lists
pgGeometries = new PgGeometry[1];
pgGeometries[0] = pgGeometry;
createLists();
drawable.display();
/* GLEventListener Methods */
public void init(GLDrawable glDrawable) {
System.out.println("call: init");
gl = glDrawable.getGL();
glu = glDrawable.getGLU();
gl.glClearColor(bgColor.getRed() / 255f, bgColor.getGreen() / 255f, bgColor.getBlue() / 255f, bgColor.getAlpha() / 255f); //This Will Clear The Background Color To Black
gl.glClearDepth(1.0);
gl.glEnable(GL.GL_DEPTH_TEST);
gl.glDepthFunc(GL.GL_LEQUAL);
gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
/* Init Light1 */
float[] LightAmbient = {0.8f, 0.8f, 0.8f, 1.0f};
float[] LightDiffuse = {1.0f, 1.0f, 1.0f, 1.0f};
float[] LightPosition = {2.0f, 0.0f, 2.0f, 1.0f};
gl.glLightfv(GL.GL_LIGHT1, GL.GL_AMBIENT, LightAmbient); // Setup The Ambient Light
gl.glLightfv(GL.GL_LIGHT1, GL.GL_DIFFUSE, LightDiffuse); // Setup The Diffuse Light
gl.glLightfv(GL.GL_LIGHT1, GL.GL_POSITION, LightPosition);
gl.glEnable(GL.GL_LIGHT1);
gl.glEnable(GL.GL_LIGHTING);
gl.glEnable(GL.GL_CULL_FACE);
gl.glBindTexture(GL.GL_TEXTURE_2D, 1);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
createLists();
public void display(GLDrawable glDrawable) {
System.out.println("call: display");
switch (iGLPolygonMode) {
case GL_POLYGON_MODE_LINE:
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
break;
case GL_POLYGON_MODE_FILL:
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
break;
case GL_POLYGON_MODE_POINT:
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_POINT);
gl.glClearColor(bgColor.getRed() / 255f, bgColor.getGreen() / 255f, bgColor.getBlue() / 255f, bgColor.getAlpha() / 255f);
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
if (!imagePath.equals("")) {
RenderedImage image = JAI.create("fileload", imagePath);
BufferedImage img = ImageUtils.toBufferedImage(image);
makeRGBTexture(img, GL.GL_TEXTURE_2D, false);
gl.glLoadIdentity();
// Position des Auges des Betrachters
gl.glTranslatef(0, 0, fDistance);
gl.glPushMatrix();
gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
gl.glColor4f(fcolor.getRed() / 255f, fcolor.getGreen() / 255f, fcolor.getBlue() / 255f, fcolor.getAlpha() / 255f);
for(int i=lists; i<= pgGeometries.length; i++)
gl.glCallList(i);
private void createLists() {
if (gl == null)
return;
System.out.println("call: create");
int num = pgGeometries.length;
lists = gl.glGenLists(num);
for (int i = 0; i < num; i++) {
PgElementSet pgElementSet = (PgElementSet) pgGeometries;
PdVector[] bounds = pgElementSet.getBounds();
PdVector pdVectorDiagonal = PdVector.subNew(bounds[1], bounds[0]);
double dx = pdVectorDiagonal.getEntry(0);
double dy = pdVectorDiagonal.getEntry(1);
double dz = pdVectorDiagonal.getEntry(2);
double temp;
if (dx < dy)
temp = dy;
else
temp = dx;
if (temp < dz)
temp = dz;
double dScale = 1 / temp;
double dMaxx,dMaxy,dMaxz,dMinx,dMiny,dMinz;
dMaxx = pgElementSet.getVertex(0).getEntry(0);
dMaxy = pgElementSet.getVertex(0).getEntry(1);
dMaxz = pgElementSet.getVertex(0).getEntry(2);
dMinx = pgElementSet.getVertex(0).getEntry(0);
dMiny = pgElementSet.getVertex(0).getEntry(1);
dMinz = pgElementSet.getVertex(0).getEntry(2);
int numV = pgElementSet.getNumVertices();
for (int j = 1; j < numV; j++) {
if (dMaxx < pgElementSet.getVertex(i).getEntry(0))
dMaxx = pgElementSet.getVertex(i).getEntry(0);
if (dMaxy < pgElementSet.getVertex(i).getEntry(1))
dMaxy = pgElementSet.getVertex(i).getEntry(1);
if (dMaxz < pgElementSet.getVertex(i).getEntry(2))
dMaxz = pgElementSet.getVertex(i).getEntry(2);
if (dMinx > pgElementSet.getVertex(i).getEntry(0))
dMinx = pgElementSet.getVertex(i).getEntry(0);
if (dMiny > pgElementSet.getVertex(i).getEntry(1))
dMiny = pgElementSet.getVertex(i).getEntry(1);
if (dMinz > pgElementSet.getVertex(i).getEntry(2))
dMinz = pgElementSet.getVertex(i).getEntry(2);
double x;
double y;
double z;
PdVector pdVector;
gl.glNewList(lists+i, GL.GL_COMPILE);
for (int j = 0; j < pgElementSet.getNumElements(); j++) {
gl.glBegin(GL.GL_POLYGON);
PiVector piVector = pgElementSet.getElement(j);
for (int k = 0; k < piVector.getSize(); k++) {
int index = piVector.getEntry(k);
pdVector = pgElementSet.getVertex(index);
x = dScale * (pdVector.getEntry(0) - (dMaxx + dMinx) / 2);
y = dScale * (pdVector.getEntry(1) - (dMaxy + dMiny) / 2);
z = dScale * (pdVector.getEntry(2) - (dMaxz + dMinz) / 2);
gl.glTexCoord2d(0.5 + x, 0.5 + y);
gl.glVertex3d(x, y, z);
gl.glEnd();
gl.glEndList();
I would be pleased about every kind of help. Thanks a lot!
Kindly regards,
EldarUse Windows Device Manager to set it back to F:
These directions are for an ipod but will work for an exHD, too:
http://support.apple.com/kb/TS1493
Change the drive letter while itunes is closed. When you reopen itunes all the file paths should be OK. -
Module - adding to display list, container null?
So I'm working on a module inside one of our applications and when the module is loaded it is passed a VO. I have found that I need to fire all of my other logic for the nested classes inside this module on the Set method of this VO because if I wait for the creationComplete, the nested logic in the other classes never gets executed. The only problem is, when I fire off all of my logic on the Set, it all gets executed but when it goes to draw these components and add them to the display list, the container they're being added to is still null, I assume because it hasn't been created yet. I also tried to add my components in the MXML and just bind their data value to the VO, but even when I do that, the inner logic never gets executed, I assume for the same reason.
Has anyone else had this issue before or have any ideas on a way to solve this issue? It almost feels like waiting for CreationComplete is too late, yet the Set method is too early.
Thanks,
BKNot sure I understand. You can hook other lifecycle methods in the module
like commitProperties. That's where we recommend custom components resolve
new properties. -
Question about timeline navigation and the display list-
I’ve got a movieclip called “rotatorProxy” that spans the entire timeline. I’ve got nav buttons that jump to various frames on that timeline. I need to get the display depth of rotatorProxy each time the nav buttons move the playhead. The AS3 code is easy enough:
var zIndex:int = this.getChildIndex(getChildByName("rotatorProxy")) ;
my problem is where to put it. If I put this code in any script that executes in the target frame, it works, but only if I hit the nav buttons slowly. If I bang on a single nav button rapidly, getChildByName("rotatorProxy”) can return null. I don’t know much about how the display list works but I assume the display list is rebuilt after every jump and the frame scripts are executing asynchronously, so it’s possible my getChildByName call is executed before the display list is complete. Is there an event or some other handle that would allow me to call my code before the frame is rendered but after the display list is complete?Wow, thanks for the fast response...
“if rotatorProxy exists in all frames, it should never return null.”
That’s what I thought, but not what I’m seeing, rapidly jumping around on the timeline seems to confuse the player and it temporarily looses track of rotatorProxy.
You can sort of see it in action here: http://www.appliedcd.com/newACT/act.html
The zIndex is used to establish the depth of the rotating screens which have been added to the display list via AS. If you bang on the nav buttons quickly you’ll see the stacking order screw up, if you had been in the development environment you’d see the null error thrown.
I’ll see if I can use the render event to sort this out. I know testing in the frame after the jump will work, but it’s cleaner if I can establish the proper stacking order before the first jump frame is rendered. -
Revision: 12542
Revision: 12542
Author: [email protected]
Date: 2009-12-04 10:38:32 -0800 (Fri, 04 Dec 2009)
Log Message:
When adding a mask to the display list need to validate it and all its children. Previously the children were not validated and their display list was updated before properties were committed or measure was done. RichText was not set up to handle this.
QE notes:
Doc notes:
Bugs: SDK-24511
Reviewer: Evtim, Deepa
Tests run: checkintests, fxg, primitives, Group
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-24511
Modified Paths:
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.asAFAIK, the only way to do this is to write a system modifcation.
The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer. -
I haven't had a problem getting a single Display List to work. However, when I try to create multiple Display Lists and display them using gl.glCallLists, I only get the first Display List created. Not too surprising: I'm not at all sure what I should be doing with the Buffer. Here's some code:
listID = gl.glGenLists(2);
gl.glNewList(listID+0, GL.GL_COMPILE);
gl.glNewList(listID+1, GL.GL_COMPILE);
IntBuffer buff = BufferUtil.newIntBuffer(2);
gl.glListBase(listID);
gl.glCallLists(2, GL.GL_INT, buff);
Any help is GREATLY appreciated! :o)Maybe you should ask your question again at http://www.javagaming.org/forums/index.php?board=25.0
(this is the official JOGL-forum), they should be able to help you there. -
Extracting Textfield Text from Display List
I am attempting to extract the text in a textfield that is
displayed with the container (see below) display list. The code
snippet I am using is listed below.
for (i = 0; i < container.numChildren; i++) {
var temp:TextField = new TextField();
// temp = container.getChildAt(i);
trace(container.getChildAt(i));
trace(temp.text);
When I execute this, the trace(container.getChildAt(i)) line
displays <object TextField>. But, when I activate the comment
line temp = container.getChildAt(i); I get an error about coerceing
a static variable. Can anyone give me a clue how I can trace the
text in the textfield container.getChildAt(i)?I found some example code in the
help->clases->staticText that I modified as below to solve
the problem.
for (i = 0; i < container.numChildren; i++) {
var displayitem:DisplayObject = container.getChildAt(i);
if (displayitem is TextField) {
trace("a static text field is item " + i + " on the display
list");
var myFieldLabel:TextField = TextField(displayitem);
trace("and contains the text: " + myFieldLabel.text);
} -
Using a devices camera and adding the image to the display list
Hi,
My students and I have not been able to make an AIR app that can take a picture using the devices camera and then add the image to the display list. We are able to open the devices camera and of course take a picture, but that's it.
We've been using these two tutorials/examples:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/CameraUI.ht ml
and
http://tv.adobe.com/watch/adc-presents/input-for-mobile-devices-camera/
I've uploaded our project: http://www.dayvid.com/professor/camera.zip
Can someone help us out?
Thanks!
Below is the main document class:
package {
import flash.desktop.NativeApplication;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MediaEvent;
import flash.media.CameraUI;
import flash.media.MediaPromise;
import flash.media.MediaType;
import flash.events.MouseEvent;
public class Main extends MovieClip{
private var deviceCameraApp:CameraUI = new CameraUI();
private var imageLoader:Loader;
public function Main()
this.stage.align = StageAlign.TOP_LEFT;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
camera_btn.addEventListener(MouseEvent.CLICK, cameraBtnClicked);
private function cameraBtnClicked(event:MouseEvent):void
if( CameraUI.isSupported )
result_txt.text = "Initializing camera...";
deviceCameraApp.addEventListener( MediaEvent.COMPLETE, imageCaptured );
deviceCameraApp.addEventListener( Event.CANCEL, captureCanceled );
deviceCameraApp.addEventListener( ErrorEvent.ERROR, cameraError );
deviceCameraApp.launch( MediaType.IMAGE );
else
result_txt.text = "Camera interface is not supported.";
private function imageCaptured( event:MediaEvent ):void
result_txt.text = "Media captured...";
var imagePromise:MediaPromise = event.data;
if( imagePromise.isAsync )
result_txt.text = "Asynchronous media promise.";
imageLoader = new Loader();
imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, asyncImageLoaded );
imageLoader.addEventListener( IOErrorEvent.IO_ERROR, cameraError );
imageLoader.loadFilePromise( imagePromise );
else
result_txt.text = "Synchronous media promise.";
imageLoader.loadFilePromise( imagePromise );
showMedia( imageLoader );
private function captureCanceled( event:Event ):void
result_txt.text = "Media capture canceled.";
NativeApplication.nativeApplication.exit();
private function asyncImageLoaded( event:Event ):void
result_txt.text = "Media loaded in memory.";
showMedia( imageLoader );
private function showMedia( loader:Loader ):void
this.addChild( loader );
private function cameraError( error:ErrorEvent ):void
result_txt.text = "Error:" + error.text;
NativeApplication.nativeApplication.exit();Hi,
Do I have to add the picture to the cameraroll in order to add it to the AIR apps display list?
Both examples from Adobe claim that their examples work. Do they not?
In the example, the event handler asyncImageLoaded is never called. The output text field shows - result_txt.text = "Asynchronous media promise."; So the Event.COMPLETE is being added. But I don't think it's being dispatched.
Any ideas? -
Display list of sales orders for one particular customer using BAPI in WD
Friends,
i want to display list of sales orders for one particular customer, the materials ordered, quantity ordered, goods issue date of that particular order and contact information about that particular customer, using Webdynpro.
Please somebody send me related info,blogs,help links , to complete this task, this is very urgent.
Please help
PeterFind the WD tutorials here...
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/web%20dynpro%20sample%20applications%20and%20tutorials.htm">Tutorials</a> -
Suggest Solution for this Display Flickering problem ....
Hi, I read the post about calibration and I probably do that a little too often TBH! As I get so little time out the battery and mainly use my MBP on my lap, usually with the power supply near by, it gets charged to full, run to empty to the point of sleep, or sometimes it even cuts out and then is recharged to full again, so I really think it's new battery time. I've seen non Apple Official ones for between £35 and £65 that have 3 year warranties and state they are around 5200mh but am unsure due to reviews.
Later...
Anyway's I have now ordered a non Apple replacement from Amazon for about £35 and it has several good reviews and 4.5 out of 5 stars so I'll see if it works and report back. If it doesn't I'll send it back and get the Official Apple one.
Message was edited by: Missy Steph -
Macbook display color problems
macbook, mac os 10.5.8 updated, display color problem. when i try to fix it by color sync. it says:
/Library/Application Support/Adobe/Color/Profiles/DCDM_X'Y'Z'.icc
Tag 'A2B1': Requiredtag is not present.
Tag 'B2A1': Requiredtag is not present.
Tag 'A2B2': Requiredtag is not present.
Tag 'B2A2': Requiredtag is not present.
Tag 'gamt': Requiredtag is not present.
The file is locked. could not be fixed.
/Library/Application Support/Adobe/Color/Profiles/DCI_P3.icc
Tag 'A2B1': Requiredtag is not present.
Tag 'B2A1': Requiredtag is not present.
Tag 'A2B2': Requiredtag is not present.
Tag 'B2A2': Requiredtag is not present.
Tag 'gamt': Requiredtag is not present.
The file is locked. could not be fixed.
Repair done - 0 out of 2 profiles fixed.
Kindly assist what to do.Welcome to Apple Discussions!
Pictures would help. A good way to do this is to post them to a free photo sharing site like Flickr and then post a link.
Also, you are in the original MBP section, and I think you need to post your question in the newer MBP section:
http://discussions.apple.com/forum.jspa?forumID=1294
Good luck! -
Reg: Combining two display lists into one list
Dear All,
i want to combine two display lists into one display list. Please give the idea for this one issue.
*****************dispaly list 1 starting here*********************
*& Form F_006_DISPLAY_LIST
* text
* --> p1 text
* <-- p2 text
FORM F_006_DISPLAY_LIST.
* TABLES : LFA1 .
DATA : V_DEBIT_TOTAL TYPE P DECIMALS 2 ,
V_CREDIT_TOTAL TYPE P DECIMALS 2 ,
V_CLOSE_BAL TYPE P DECIMALS 2 .
DATA : V_CNT TYPE I .
SORT ITAB_OPG BY LIFNR.
LOOP AT ITAB_OPG.
NEW-PAGE.
* Displaying Vendor Name
SELECT SINGLE NAME1 FROM LFA1 INTO LFA1-NAME1 WHERE
LIFNR EQ ITAB_OPG-LIFNR .
FORMAT COLOR COL_POSITIVE INTENSIFIED ON.
WRITE:/2 'Vendor Code:' ,
ITAB_OPG-LIFNR ,
40 LFA1-NAME1 .
CLEAR : LFA1 .
WRITE :/(190) SY-ULINE .
* Displaying Opening Balance
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON .
READ TABLE ITAB_OPG WITH KEY LIFNR = ITAB_OPG-LIFNR .
IF ITAB_OPG-BAL LE 0 .
WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
171(18) ITAB_OPG-BAL .
ELSE.
WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
151(18) ITAB_OPG-BAL .
ENDIF.
WRITE :/(190) SY-ULINE .
* Displaying Line Items
LOOP AT ITAB_DISPLAY WHERE LIFNR EQ ITAB_OPG-LIFNR.
V_CNT = SY-TABIX MOD 2.
IF V_CNT EQ 0.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
ENDIF.
* Selecting Bank Name and Cheque Number
SELECT SINGLE CHECT HBKID INTO (PAYR-CHECT , PAYR-HBKID)
FROM PAYR WHERE
ZBUKR EQ P_BUKRS AND
VBLNR EQ ITAB_DISPLAY-BELNR AND
LIFNR EQ ITAB_DISPLAY-LIFNR .
SELECT SINGLE BANKS BANKL INTO (T012-BANKS , T012-BANKL) FROM
T012 WHERE BUKRS EQ P_BUKRS AND
HBKID EQ PAYR-HBKID.
SELECT SINGLE BANKA INTO BNKA-BANKA FROM BNKA WHERE
BANKS EQ T012-BANKS AND
BANKL EQ T012-BANKL .
WRITE :/2 ITAB_DISPLAY-BUDAT ,
14 ITAB_DISPLAY-BELNR ,
26 ITAB_DISPLAY-BLDAT ,
40 ITAB_DISPLAY-XBLNR ,
58(16) PAYR-CHECT ,
75 BNKA-BANKA ,
105(40) ITAB_DISPLAY-SGTXT ,
146(4) ITAB_DISPLAY-BLART .
* Determinig Debit or Credit
IF ITAB_DISPLAY-SHKZG EQ 'S'.
V_DEBIT_TOTAL = V_DEBIT_TOTAL + ITAB_DISPLAY-DMBTR.
WRITE:151(18) ITAB_DISPLAY-DMBTR ,
171(18) SPACE .
ELSEIF ITAB_DISPLAY-SHKZG EQ 'H'.
V_CREDIT_TOTAL = V_CREDIT_TOTAL + ITAB_DISPLAY-DMBTR.
WRITE:151(18) SPACE ,
171(18) ITAB_DISPLAY-DMBTR .
ENDIF.
CLEAR : T012 , BNKA , PAYR .
ENDLOOP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/(190) SY-ULINE.
* Displaying Debit and Credit Totals
WRITE:/125 TEXT-001 ,
151(18) V_DEBIT_TOTAL ,
171(18) V_CREDIT_TOTAL .
WRITE:/(190) SY-ULINE.
* Displaying the Closing Balance
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
V_CLOSE_BAL = ITAB_OPG-BAL + V_DEBIT_TOTAL - V_CREDIT_TOTAL .
IF V_CLOSE_BAL GT 0.
WRITE:/122 TEXT-002 ,
151(18) V_CLOSE_BAL NO-SIGN. " D00K909674
ELSEIF V_CLOSE_BAL LE 0.
WRITE:/122 TEXT-002 ,
171(18) V_CLOSE_BAL NO-SIGN. " D00K909674
ENDIF.
CLEAR : V_CLOSE_BAL.
ENDLOOP.
ENDFORM. " F_006_DISPLAY_LIST
*****************dispaly list 1 ending here*********************
*****************dispaly list 2 starting here*********************
*& Form F_006_DISPLAY_LIST1
* text
* --> p1 text
* <-- p2 text
FORM F_006_DISPLAY_LIST1 .
TABLES : KNA1 .
DATA : V_DEBIT_TOTAL1 TYPE P DECIMALS 2 ,
V_CREDIT_TOTAL1 TYPE P DECIMALS 2 ,
V_CLOSE_BAL1 TYPE P DECIMALS 2 .
DATA : V_CNT1 TYPE I .
SORT ITAB_OPG1 BY KUNNR.
LOOP AT ITAB_OPG1.
NEW-PAGE.
* Displaying Vendor Name
SELECT SINGLE NAME1 FROM KNA1 INTO KNA1-NAME1 WHERE
KUNNR EQ ITAB_OPG1-KUNNR .
FORMAT COLOR COL_POSITIVE INTENSIFIED ON.
WRITE:/2 'Customer Code:' ,
ITAB_OPG1-KUNNR ,
40 KNA1-NAME1 .
CLEAR : KNA1 .
WRITE :/(190) SY-ULINE .
* Displaying Opening Balance
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON .
READ TABLE ITAB_OPG1 WITH KEY KUNNR = ITAB_OPG1-KUNNR .
IF ITAB_OPG1-BAL1 LE 0 .
WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
171(18) ITAB_OPG1-BAL1 .
ELSE.
WRITE :/2 'Opening Balance for Period' , (4) S_MONAT-LOW , ':' ,
151(18) ITAB_OPG1-BAL1 .
ENDIF.
WRITE :/(190) SY-ULINE .
* Displaying Line Items
LOOP AT ITAB_DISPLAY1 WHERE KUNNR EQ ITAB_OPG1-KUNNR.
V_CNT1 = SY-TABIX MOD 2.
IF V_CNT1 EQ 0.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
ENDIF.
* Selecting Bank Name and Cheque Number
SELECT SINGLE CHECT HBKID INTO (PAYR-CHECT , PAYR-HBKID)
FROM PAYR WHERE
ZBUKR EQ P_BUKRS AND
VBLNR EQ ITAB_DISPLAY1-BELNR AND
KUNNR EQ ITAB_DISPLAY1-KUNNR .
SELECT SINGLE BANKS BANKL INTO (T012-BANKS , T012-BANKL) FROM
T012 WHERE BUKRS EQ P_BUKRS AND
HBKID EQ PAYR-HBKID.
SELECT SINGLE BANKA INTO BNKA-BANKA FROM BNKA WHERE
BANKS EQ T012-BANKS AND
BANKL EQ T012-BANKL .
WRITE :/2 ITAB_DISPLAY1-BUDAT ,
14 ITAB_DISPLAY1-BELNR ,
26 ITAB_DISPLAY1-BLDAT ,
40 ITAB_DISPLAY1-XBLNR ,
58(16) PAYR-CHECT ,
75 BNKA-BANKA ,
105(40) ITAB_DISPLAY1-SGTXT ,
146(4) ITAB_DISPLAY1-BLART .
* Determinig Debit or Credit
IF ITAB_DISPLAY1-SHKZG EQ 'S'.
V_DEBIT_TOTAL1 = V_DEBIT_TOTAL1 + ITAB_DISPLAY1-DMBTR.
WRITE:151(18) ITAB_DISPLAY1-DMBTR ,
171(18) SPACE .
ELSEIF ITAB_DISPLAY1-SHKZG EQ 'H'.
V_CREDIT_TOTAL1 = V_CREDIT_TOTAL1 + ITAB_DISPLAY1-DMBTR.
WRITE:151(18) SPACE ,
171(18) ITAB_DISPLAY1-DMBTR .
ENDIF.
CLEAR : T012 , BNKA , PAYR .
ENDLOOP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/(190) SY-ULINE.
* Displaying Debit and Credit Totals
WRITE:/125 TEXT-001 ,
151(18) V_DEBIT_TOTAL1,
171(18) V_CREDIT_TOTAL1 .
WRITE:/(190) SY-ULINE.
* Displaying the Closing Balance
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
V_CLOSE_BAL1 = ITAB_OPG1-BAL1 + V_DEBIT_TOTAL1 - V_CREDIT_TOTAL1 .
IF V_CLOSE_BAL1 GT 0.
WRITE:/122 TEXT-002 ,
151(18) V_CLOSE_BAL1 NO-SIGN. " D00K909674
ELSEIF V_CLOSE_BAL1 LE 0.
WRITE:/122 TEXT-002 ,
171(18) V_CLOSE_BAL1 NO-SIGN. " D00K909674
ENDIF.
CLEAR : V_CLOSE_BAL1.
ENDLOOP.
ENDFORM. " F_006_DISPLAY_LIST1
*****************dispaly list 2 ending here*********************
Thanks,
Sankar MHi,
Can you post it as two halves ?
Regards,
Swarna Munukoti -
Help with taking a pic with Android camera and adding pic to display list
Hi,
My students and I have not been able to make an AIR app that can take a picture using the devices camera and then add the image to the display list. We are able to open the devices camera and of course take a picture, but that's it.
We've been using these two tutorials/examples:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/media/CameraUI.html
and
http://tv.adobe.com/watch/adc-presents/input-for-mobile-devices-camera /
I've uploaded our project: http://www.dayvid.com/professor/camera.zip
Can someone help us out?
Thanks!
Below is the main document class:
package {
import flash.desktop.NativeApplication;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MediaEvent;
import flash.media.CameraUI;
import flash.media.MediaPromise;
import flash.media.MediaType;
import flash.events.MouseEvent;
public class Main extends MovieClip{
private var deviceCameraApp:CameraUI = new CameraUI();
private var imageLoader:Loader;
public function Main()
this.stage.align = StageAlign.TOP_LEFT;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
camera_btn.addEventListener(MouseEvent.CLICK, cameraBtnClicked);
private function cameraBtnClicked(event:MouseEvent):void
if( CameraUI.isSupported )
result_txt.text = "Initializing camera...";
deviceCameraApp.addEventListener( MediaEvent.COMPLETE, imageCaptured );
deviceCameraApp.addEventListener( Event.CANCEL, captureCanceled );
deviceCameraApp.addEventListener( ErrorEvent.ERROR, cameraError );
deviceCameraApp.launch( MediaType.IMAGE );
else
result_txt.text = "Camera interface is not supported.";
private function imageCaptured( event:MediaEvent ):void
result_txt.text = "Media captured...";
var imagePromise:MediaPromise = event.data;
if( imagePromise.isAsync )
result_txt.text = "Asynchronous media promise.";
imageLoader = new Loader();
imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, asyncImageLoaded );
imageLoader.addEventListener( IOErrorEvent.IO_ERROR, cameraError );
imageLoader.loadFilePromise( imagePromise );
else
result_txt.text = "Synchronous media promise.";
imageLoader.loadFilePromise( imagePromise );
showMedia( imageLoader );
private function captureCanceled( event:Event ):void
result_txt.text = "Media capture canceled.";
NativeApplication.nativeApplication.exit();
private function asyncImageLoaded( event:Event ):void
result_txt.text = "Media loaded in memory.";
showMedia( imageLoader );
private function showMedia( loader:Loader ):void
this.addChild( loader );
private function cameraError( error:ErrorEvent ):void
result_txt.text = "Error:" + error.text;
NativeApplication.nativeApplication.exit();Hi,
My students and I have not been able to make an AIR app that can take a picture using the devices camera and then add the image to the display list. We are able to open the devices camera and of course take a picture, but that's it.
We've been using these two tutorials/examples:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/media/CameraUI.html
and
http://tv.adobe.com/watch/adc-presents/input-for-mobile-devices-camera /
I've uploaded our project: http://www.dayvid.com/professor/camera.zip
Can someone help us out?
Thanks!
Below is the main document class:
package {
import flash.desktop.NativeApplication;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MediaEvent;
import flash.media.CameraUI;
import flash.media.MediaPromise;
import flash.media.MediaType;
import flash.events.MouseEvent;
public class Main extends MovieClip{
private var deviceCameraApp:CameraUI = new CameraUI();
private var imageLoader:Loader;
public function Main()
this.stage.align = StageAlign.TOP_LEFT;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
camera_btn.addEventListener(MouseEvent.CLICK, cameraBtnClicked);
private function cameraBtnClicked(event:MouseEvent):void
if( CameraUI.isSupported )
result_txt.text = "Initializing camera...";
deviceCameraApp.addEventListener( MediaEvent.COMPLETE, imageCaptured );
deviceCameraApp.addEventListener( Event.CANCEL, captureCanceled );
deviceCameraApp.addEventListener( ErrorEvent.ERROR, cameraError );
deviceCameraApp.launch( MediaType.IMAGE );
else
result_txt.text = "Camera interface is not supported.";
private function imageCaptured( event:MediaEvent ):void
result_txt.text = "Media captured...";
var imagePromise:MediaPromise = event.data;
if( imagePromise.isAsync )
result_txt.text = "Asynchronous media promise.";
imageLoader = new Loader();
imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, asyncImageLoaded );
imageLoader.addEventListener( IOErrorEvent.IO_ERROR, cameraError );
imageLoader.loadFilePromise( imagePromise );
else
result_txt.text = "Synchronous media promise.";
imageLoader.loadFilePromise( imagePromise );
showMedia( imageLoader );
private function captureCanceled( event:Event ):void
result_txt.text = "Media capture canceled.";
NativeApplication.nativeApplication.exit();
private function asyncImageLoaded( event:Event ):void
result_txt.text = "Media loaded in memory.";
showMedia( imageLoader );
private function showMedia( loader:Loader ):void
this.addChild( loader );
private function cameraError( error:ErrorEvent ):void
result_txt.text = "Error:" + error.text;
NativeApplication.nativeApplication.exit(); -
Media browser in Premiere CS 6 doesn't display list of hard drives!
My media browser in Premiere CS 6 doesn't display list of hard drives. There is no dropdown of folders or anything to select the media from. Any suggestions as to why this is happening and how I can correct this?
If Premiere is acting weird try this:
Start Premiere with holding down shift+alt until welcome screen.
See if that will help.
Maybe you are looking for
-
Creative Cloud Package Installation Issues - School network behind a proxy
Greetings All, I have created a package using creative cloud manager. I am now testing it before deployment by running the setup.exe (or the msi using msi exec) but it keeps stopping part of the way through. I have tried everything I can think of a
-
How can I get the comments, suggestions in my form to show in the summary report?
-
Problem in sending mail to external id from customer exit
Hello All, I have a problem that I am sending mail to supervisor. I have written code and it is working correctly in se38 program. This code If I keep in an exit and run tcode then it is not working and it is giving message no mail sent. Why is this
-
Sharing Apple Monitor between G5 and windos computer
I seemed to have read that it is possible to connect a windows computer to the Apple monitor and share the monitor between the two computers. Anyone know what I need to to that?
-
Can't get my new page to work wit my website
I know html but I can't get this to work. I have a website and I am trying to ad a new page to it. I can't get it to work. I have checked it link and it is fine. Must be something with the page. I don't know. Can anyone help me.