Daily Archives

Articles indexed Sunday April 8 2012

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How should I group these variables?

    - by stariz77
    I have a shape that will be defined by: char s_type; char color; double height; double width; These variables are scanned in from a request string sent to my server and passed into my printing function, which then prints out the shape. Currently they are just local variables sitting in my main(); however, I was wondering if there would be any advantage in creating a struct containing these variables, and then passing the struct to my printing function? or how else might I improve my program's structure/style, would passing a struct by reference have any kind of performance benefit if there were many requests and therefore many printing function calls? printer(char st, char cr, double ht, double wd); int main() { // Other main functionality. char s_type; char color; double height; double width; sscanf (serv_req, "GET /%c/%c/%lf/%lf", &s_type, &color, &height, &width); printer(s_type, color, height, width); // Other main functionality. return 0; } It seemed "neater" if I had a struct or something that didn't leave me with declarations in the middle of everything else going on in main. I'm interested in structure/style as well as performance. EDIT: didn't mean to put printer declaration inside main.

    Read the article

  • Equivalent of #map in ruby in golang

    - by Oct
    I'm playing with Go and run into something I'm unable to find in Google, although there is certainly something that exists: I'm using the following struct: type Syntax struct { name string extensions *regexp.Regexp } type Scanner struct { classifier * bayesian.Classifier save_file string name_to_syntax map[string] *Syntax extensions_to_syntax map[*regexp.Regexp] *Syntax } I'd like to perform the following using Go and I'm quoting ruby because it's how I'd do that using ruby: test_regexpes = my_scanner.extensions_to_syntax.keys My goal is to get an array of *regexp.Regexp . Any idea on how to do that in a simple way ? Thank you !

    Read the article

  • xmodmap modifications aren't enough - anything else I can do?

    - by Codemonkey
    I'm using an Apple keyboard which has some annoyances compared to other keyboards. Namely, the Alt_L and Super_L keys are swapped, and the bar and less keys are swapped ("|" and "<"). I've written an Xmodmap file to swap the keys back: keycode 49 = less greater less greater onehalf threequarters keycode 64 = Super_L NoSymbol Super_L keycode 94 = bar section bar section brokenbar paragraph keycode 108 = Super_R NoSymbol Super_R keycode 133 = Alt_L Meta_L Alt_L Meta_L keycode 134 = Alt_R Meta_R Alt_R Meta_R I did this by identifying the keys using xev and the default modmap xmodmap -pke and swapping the keycodes. xev now identifies all my keys as correct, which is awesome! I can also use the correct keys to type the bar and less than symbols. (I followed this answer on askubuntu: How do I remap certain keys?) But it seems the change isn't very deep. For instance, the Super key is now broken in the Compiz Settings Manager. No shortcuts involving the Super key works (but the Alt key does). Also the settings dialog for Gnome Do doesn't heed the changes in xmodmap, and I can't open the Gnome Do window anymore if I use any of the remapped keys. So to summarize, everything broke. I would like a deeper way of telling Ubuntu (or any other Linux distro for that matter) which keys are which on the keyboard. Is there a way to edit the Keyboard Layout directly? I'm using the Norwegian Bokmål keyboard layout. Does it reside in a file somewhere I could edit? Any comments, previous experiences or relevant stray thoughts would be greatly appreciated - Thanks

    Read the article

  • Instalar o Ubuntu / Install Ubuntu

    - by Joaquim Venâncio
    10:10 I installed Ubuntu alongside Windows 7, after the installation was able to upgrade to version 4.11. Now I'm trying to update to version 11.10 but I get an error message saying it is not possible to upgrade, I decided to install a partition that I created the part, but when I start the PC directly opens Windows 7 does not appear to me the option to choose which want to start the operating system. I formatted the partition where you had installed ubuntu, I've been looking for tutorials where you learn how to install ubuntu on a partition part to try to understand what my problem. I wonder if I can explain how to install ubuntu on a partition that part so that when I connect the PC to show me the option to choose which system I want to start.

    Read the article

  • Tool to know what is making the desktop load longer than usual

    - by Marky
    Is there such a tool? My desktop as of late is taking longer to load than usual. I'd say it takes more than 20 seconds from GDM login until I see the desktop. Aside from disabling all app-indicators and testing it manually one by one, what else should be done? The only indicator I remember activating lately was bluetooth and I have already disabled it from Startup Applications. No improvement. I know of bootchart, but I don't really have a problem with boot. It is only after I login that the issue occurs. I'm on Natty Narwhal. *Updating this thread.... The issue seems to have fixed itself and I did not even do anything. It is really weird. I guess this is how Gnome works (and talk about not recognizing your theme and reverting to Windows 95-like look. How about that?). I have been a long time KDE user and I never encountered issues like this one. The KDE then may have booted into the desktop longer (from KDM) but at least I know it was consistent.

    Read the article

  • shutdown logging in ubuntu 10.04 & 11.10

    - by Joe
    When my system starts up it logs everything into syslog/dmesg. And I can review it for problems. When my system shuts down, where does that get logged? I didn't see anything obvious in /var/log in 10.04. (My 11.10 system is out of reach at the moment.) I looked at How do I turn on 'shutdown logging' or operating system tracing? but didn't see anything that helped. I use kubuntu, but all of the stuff at this level is probably the same.

    Read the article

  • Greenfoot project is read-only

    - by AzharHafiz.com
    I received this message when starting greenfoot on ubuntu 11.10 I'm a newbie and not sure where does the file located (greenfoot) The project is read-only.How and where do I change the permission? You will not be able to create objects or execute methods. Either the access rights of the project directory are set as 'read only' for you, or the whole file system is not writable (is it a CD?). To fully use this project, you must ensure that it is on a writable file system (usually your hard disk), and that you have write permission in the project directory and each file within it. This can often be accomplished by choosing "save as" from the Project menu after closing this dialog.

    Read the article

  • Empathy minimizing automatically

    - by 168335
    I am able to login into empathy, but the thing is whenever i am clicking over it from the right top task bar so that I could open it and see who all are online, it opens just for a second and minimises automatically. I am still logged in only, no issues with that , but i am not able to open the client at all, its like i am restricted tot he panel and its notifications only whenever someone sends me a message. so can anyone suggest a method via which I can stop this automation of empathy?

    Read the article

  • Unable to remove the lock by normal means

    - by Loki
    I've been installing ubuntu restricted extras via the software center. Everything was going well at first, but then the installation process froze on 'applying changes' stage. I've had this in the past already, and usually just hitting the 'cancel' button helped, but not this time. Obviously, the install process has placed a lock, and I couldn't issue any apt-get commands. then i've tried doing what was suggested here Fixing Could not get lock /var/lib/dpkg/lock : sudo fuser -cuk /var/lib/dpkg/lock; sudo rm -f /var/lib/dpkg/lock but it seemed to me that it has only killed my X server. Okay, i've just pressed the power button on my PC, and restarted, hoping that the lock was finally off and i could reinstall the stuff. No dice. when I open the software center, I still have one operation in process, a weird one: " Searching | Cancelling ". The 'cancel' button is either inactive, or it just does nothing. So I've become desperate and decided to write here. How do I fix the problem? Can't install anything on a fresh ubuntu 12.04 :) Thanks in advance

    Read the article

  • Screen cuts off part of GRUB on boot

    - by Matthew
    I've recently installed Ubuntu 11.10 on my Windows 7 desktop computer (on a seperate partition) Everything has gone smoothly except when I restart the computer and GRUB's loader screen shows, part of the screen gets cut off.. but once ive selected a boot option and hit enter, the screen readjusts to fill the entire monitor properly. So my question is, is there a way I can correct this ? Kind of annoying not being able to see the full boot option

    Read the article

  • Unable to wake display with remote

    - by Eugene
    I'm running an HTPC (xbmc) without a keyboard/mouse attached, running oneiric. After some indeterminate amount of time, sometime between 1 and 12 hours, the display goes to sleep. The computer itself is not sleeping, I can still SSH to it from another computer. The remote will not wake the display. The IR receiver is working, as irw will show me the remote key presses. The only way to get my display back is to restart the display manager, lightdm in this case. Does anybody know a way to keep the display from going to sleep? I don't really need any power management at all considering that it connects to my TV and when I want my display to go to sleep, I turn off my TV.

    Read the article

  • Problem with apt-get [install, purge, autoremove, upgrade]

    - by Ark
    I am trying to install openvpn using apt-get, but I get an error during the process [As far as I understand the issue is with unattended-updates, which I could not upgrade due to apt-get porblem :/]. I cannot upgrade, install, autoremove or purge anything else [which I need to do since /boot is full. For upgrading I did update before trying].... Trace [on sudo apt-get autoremove]: 0 upgraded, 0 newly installed, 79 to remove and 421 not upgraded. 35 not fully installed or removed. Need to get 24.1 kB of archives. After this operation, 140 MB disk space will be freed. Do you want to continue [Y/n]? y Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main unattended-upgrades all 0.73ubuntu1 [24.1 kB] Fetched 24.1 kB in 0s (31.2 kB/s) Preconfiguring packages ... (Reading database ... 287206 files and directories currently installed.) Removing flashplugin-downloader:i386 ... Removing libasound2-plugins:i386 ... Removing libpulse0:i386 ... Removing libsndfile1:i386 ... Removing libvorbisenc2:i386 ... Removing libvorbis0a:i386 ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place (Reading database ... 287174 files and directories currently installed.) Preparing to replace unattended-upgrades 0.73ubuntu1 (using .../unattended-upgrades_0.73ubuntu1_all.deb) ... Checking for running unattended-upgrades: Traceback (most recent call last): File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module> import apt_pkg ImportError: No module named apt_pkg invoke-rc.d: initscript unattended-upgrades, action "stop" failed. dpkg: warning: subprocess old pre-removal script returned error exit status 1 dpkg - trying script from the new package instead ... Checking for running unattended-upgrades: Traceback (most recent call last): File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module> import apt_pkg ImportError: No module named apt_pkg invoke-rc.d: initscript unattended-upgrades, action "stop" failed. dpkg: error processing /var/cache/apt/archives/unattended-upgrades_0.73ubuntu1_all.deb (--unpack): subprocess new pre-removal script returned error exit status 1 update-rc.d: warning: unattended-upgrades start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (none) update-rc.d: warning: unattended-upgrades stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (0 6) Checking for running unattended-upgrades: Traceback (most recent call last): File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module> import apt_pkg ImportError: No module named apt_pkg invoke-rc.d: initscript unattended-upgrades, action "start" failed. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/unattended-upgrades_0.73ubuntu1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Maybe I missed something basic, but I would appreciate pointers on solving the issue. Thanks

    Read the article

  • Picasa 3.9 login fails with 2-factor authentication

    - by Paul Pomes
    I've installed Picasa 3.9 via the instructions at webupd8, however the login window keeps failing with the message, "You must be connected to the Internet to use this feature." If "Try again" is tried I'll successfully pass the first login screen of username and password. Next I'm prompted for the verification code which then takes me back to the "You must be connected to the Internet to use this feature" screen again.

    Read the article

  • Switch encoding of terminal with a command

    - by Tomas Lycken
    One of the servers I quite often ssh to uses western encoding instead of utf-8 (and there's no way I can change that). I've started writing a bash script to connect to this server, so I won't have to type out the entire address every time, but I would like to improve this script so it also changes the encoding of the terminal window correctly. The change I need to do can be performed using the mouse by navigating to "Terminal"-"Set Character Encoding..."-"Western (ISO-8859-1)". Is there a terminal command that does the same thing, for the current terminal window/screen? To clarify: I'm not interested in ways of switching the locale of the system on the remote site - that system is administered by someone else, and I have no idea what stuff might depend on the latin-1 encoding there. What I want to do is to let this terminal window on my side switch character encoding to the above mentioned, in the same way I can do with my mouse and the menus.

    Read the article

  • Rosegarden plugin list is empty

    - by Wes
    I've just installed rosegarden through apt. I've also installed jack and a low latency kernel through a PPA https://launchpad.net/~abogani/+archive/ppa. I've started jack-server and through the control panel I can see its wiring things through rosegarden. I've also tried installing qsynth and dssi both through apt. However I can't see any plug ins in the synth plug-in list. Therefore I'm unable to test if this works. I've tried launching qsynth before rosegarden and I've tried a few things however I just can't see any plugins. Does anyone know how to get this to work? I'm using ubuntu 11.04 or 11.10 I think. sudo apt-get install rosegarden -o APT::Install-Suggests=true synaptic sudo apt-get install synaptic synaptic sudo synaptic synaptic sudo apt-add-repository ppa:abogani/ppa sudo apt-get install linux-lowlatency sudo apt-get install dssi sudo apt-get install alsa-firmware-loaders alsa-tools alsa-tools-gui alsa-firmware sudo apt-get install alsa-firmware-loaders alsa-tools alsa-tools-gui sudo apt-get install blop caps cmt fil-plugins rev-plugins swh-plugins tap-plugins sudo apt-get install blepvco mcp-plugins omins

    Read the article

  • Wireless on ThinkPad Edge E420s

    - by user21820
    I have installed Kubuntu 11.04 (Natty) on my ThinkPad Edge E420 laptop. Unfortunately, the wireless is not working. I have got Windows 7 installed besides Kubuntu, and wireless is working with no problems there, so it has to be problem of the OS. What I tried: I installed the official driver from Realtek RLT8192CE. After reboot the wireless didn't work, but at least the system was able to detect that it is present in the system. However, after executing lscpi -v, under the card's details there was a line "Currently used driver" which said "r8169". Why is this? I did all of this according to a manual on http://www.php-architect.com/blog/2010/05/01/getting-wireless-to-work-on-lenovo-thinkpad-t400-with-ubuntu-10-4-lucid/. There a meany other similar ones, but don't work for me either. My questions are: 1) Is there any way to get this fixed? If yes, how to do so? 2) Do you think OpenSUSE (or any other distro) is better distribution concerning such hardware issues, so should I give it a try? If yes, which distro gives me the best chance?

    Read the article

  • How to get a "Maximize" button in every window in GNOME Fallback

    - by RockKeyman
    Just installed Ubuntu 11.10 (AMD64), and immediately switched back to GNOME with GNOME Fallback. I'm searching for a feature which provided a "maximise" button in every window, even ones which should have only the "close" button. In older Ubuntu versions this feature was activated when switching from "None" to "Normal" in "Visual Effects": But now, that window is out, and I can't find that feature. I guess it's somewhere in CompizConfig, but I've searched there with no result. Does anyone know what's the feature I'm searching for?

    Read the article

  • Realtek RTL8111/8168B wired network doesn't work anymore

    - by Radar4002
    This sounds like it's a common problem upgrading 11.04, but I am having trouble finding a common solution, and one that will work for me. I just applied updates via the update manager and now my wired network connection is down. I know Ubuntu network settings is the issue, because I have a dual-boot with Win 7 and my network/internet is fine on Win 7. I don't know too much about networking, so what can I do to trouble shoot this issue? I can choose an older grub version, 2.6.38-8 instead of 2.6.38-11 and this does not resolve the issue. Here is my lspci result: 00:00.0 Host bridge: ATI Technologies Inc RD890 Northbridge only single slot PCI-e GFX Hydra part (rev 02) 00:02.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (PCI express gpp port B) 00:04.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (PCI express gpp port D) 00:05.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (PCI express gpp port E) 00:06.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (PCI express gpp port F) 00:07.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (PCI express gpp port G) 00:09.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (PCI express gpp port H) 00:0a.0 PCI bridge: ATI Technologies Inc RD890 PCI to PCI bridge (external gfx1 port A) 00:11.0 SATA controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] (rev 40) 00:12.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:12.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:13.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:13.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 41) 00:14.1 IDE interface: ATI Technologies Inc SB7x0/SB8x0/SB9x0 IDE Controller (rev 40) 00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40) 00:14.3 ISA bridge: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller (rev 40) 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40) 00:14.5 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 00:15.0 PCI bridge: ATI Technologies Inc Device 43a0 00:16.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:16.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration 00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map 00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller 00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control 00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control 01:00.0 VGA compatible controller: ATI Technologies Inc Juniper [Radeon HD 5700 Series] 01:00.1 Audio device: ATI Technologies Inc Juniper HDMI Audio [Radeon HD 5700 Series] 02:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03) 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03) 06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03) 07:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03) 07:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03) 08:0e.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) 09:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 02) 09:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 02) Here is my sudo lshw -class network: *-network description: Ethernet interface product: RTL8111/8168B PCI Express Gigabit Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:05:00.0 logical name: eth0 version: 03 serial: 6c:f0:49:e7:72:e8 size: 10Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s resources: irq:40 ioport:9e00(size=256) memory:fceff000-fcefffff memory:fcef8000-fcefbfff memory:fce00000-fce1ffff *-network description: Ethernet interface product: RTL8111/8168B PCI Express Gigabit Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:06:00.0 logical name: eth1 version: 03 serial: 6c:f0:49:e7:72:ea size: 10Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s resources: irq:47 ioport:8e00(size=256) memory:fddff000-fddfffff memory:fddf8000-fddfbfff memory:fdd00000-fdd1ffff

    Read the article

  • How can I remove the IM status entries from the messaging indicator?

    - by spoonfood
    On 11.10: I know how to remove the email & u1 entries using blacklist/remove from /usr/share/blablabla_youknowwhere but I see no entries or solutions on how to remove only the status entries, as I dont use any IMs, only mail & u1. I suspect its hardcoded, please let me be wrong. but if it is so, maybe someone enlightened got a diff/patch, although I fear it will lead to dependency hell (compiling wise)

    Read the article

  • Ubuntu Server driver source catalog

    - by SRU IT
    Where do I find this drivers on my .iso image for the server software, or what is the ftp: location to download these files as those are the two options i am given on how to solve this issue. ubuntu-server 11.10, hardware: dell r210 what I am reading is that I am possibly missing 'mpt2sas' driver somewhere in this boot disc. I'm attempting to download a different version in the hopes that the mistake I made was downloading software meant for an AMD architecture.

    Read the article

  • At what visitor share do you stop supporting a given browser?

    - by adam
    I'm lead dev for a large website which has a higher than average percentage of IE6 users - about 4.4% of our audience. Our new version is going to make use of progressive enhancement - including transitions and effects as well as rounded corners, gradients, web fonts and other CSS techniques. Obviously there are cross-browser ways to achieve most of these things which require various amounts of work to implement. What I'm currently looking into - and what I'd like your experiences of - is how to decide at what point we draw the line between providing an enhanced experience vs just supporting the functionality. FYI, I believe that this question meets the six guidelines for great subjective questions as defined in the FAQ. I'm after answers detailing why and how, not too short, with constructive comments, experiences, facts and references. Thanks! Adam

    Read the article

  • OpenGL 2 on Android: native window

    - by ThreaderSlash
    According to OGLES specification, we have the following definition: EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, NativeWindowType native_window, EGLint const * attrib_list) More details, here: http://www.khronos.org/opengles/documentation/opengles1_0/html/eglCreateWindowSurface.html And also by definition: int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format); More details, here: http://mobilepearls.com/labs/native-android-api I am running Android Native App on OGLES 2 and debugging it in a Samsung Nexus device. For setting up the 3D scene graph environment, the following variables are defined: struct android_app { ... ANativeWindow* window; }; android_app* mApplication; ... mApplication=&pApplication; And to initialize the App, we run the commands in the code: ANativeWindow_setBuffersGeometry(mApplication->window, 0, 0, lFormat); mSurface = eglCreateWindowSurface(mDisplay, lConfig, mApplication->window, NULL); Funny to say is that, the command ANativeWindow_setBuffersGeometry behaves as expected and works fine according to its definition, accepting all the parameters sent to it. But the eglCreateWindowSurface does no accept the parameter mApplication-window, as it should accept according to its definition. Instead, it looks for the following input: EGLNativeWindowType hWnd; mSurface = eglCreateWindowSurface(mDisplay,lConfig,hWnd,NULL); As an alternative, I considered to use instead: NativeWindowType hWnd=android_createDisplaySurface(); But debugger says: Function 'android_createDisplaySurface' could not be resolved Can someone tell if there is a way to convert mApplication-window? In a way that the data from the android_app get accepted to the window surface?

    Read the article

  • Realtime rendering using a ray tracing engine

    - by Keyhan Asghari
    I want to render an object that has a mesh with one million hexagonal elements(100 * 100 * 100). Lights, shadows and textures is not important and each element has a solid color. and finally, the actions I want to have, is simply rotating the object, zooming and panning. I am wondering what ray tracing engine is better for my conditions. or, do I have to take another approach? any help will be appreciated.

    Read the article

  • How to scroll in the physical world AndEngine?

    - by Esteban Quintero
    I am using andengine to make a game where a sprite (player) is going up across the stage, this is my world. final Rectangle ground = new Rectangle(0, CAMERA_HEIGHT - 2, CAMERA_WIDTH, 2, vertexBufferObjectManager); final Rectangle roof = new Rectangle(0, 0, CAMERA_WIDTH, 2, vertexBufferObjectManager); final Rectangle left = new Rectangle(0, 0, 2, CAMERA_HEIGHT, vertexBufferObjectManager); final Rectangle right = new Rectangle(CAMERA_WIDTH - 2, 0, 2, CAMERA_HEIGHT, vertexBufferObjectManager); final FixtureDef wallFixtureDef = PhysicsFactory.createFixtureDef(0, 0.5f, 0.5f); PhysicsFactory.createBoxBody(this.mPhysicsWorld, ground, BodyType.StaticBody, wallFixtureDef); PhysicsFactory.createBoxBody(this.mPhysicsWorld, roof, BodyType.StaticBody, wallFixtureDef); PhysicsFactory.createBoxBody(this.mPhysicsWorld, left, BodyType.StaticBody, wallFixtureDef); PhysicsFactory.createBoxBody(this.mPhysicsWorld, right, BodyType.StaticBody, wallFixtureDef); /* Create two sprits and add it to the scene. */ this.mScene.setBackground(autoParallaxBackground); this.mScene.attachChild(ground); this.mScene.attachChild(roof); this.mScene.attachChild(left); this.mScene.attachChild(right); this.mScene.registerUpdateHandler(this.mPhysicsWorld); The problem is that if the sprite reaches up and hits the wall, as I scroll here?

    Read the article

  • How to effectively gather info about how players play my HTML5 game?

    - by Bane
    I'm finishing another HTML5 game, and this time I'd like to do some spying business on the players... Mostly just basic stuff: when they are playing, for how long, what upgrades they are buying the most and so on. Now, my first idea was just to collect this information during the gameplay, and then have a Javascript function fire when they close the tab/browser, and said function would send it to my server via Socket.io. This, of course, wouldn't work, because anyone who takes a look at the code would realize it and could start sending a tonne of false info which would mess up my statistics. Questions: Is there a way to effectively do this? If yes, what kind of info should I be looking for, aside from stuff I already mentioned?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >