Daily Archives

Articles indexed Wednesday December 12 2012

Page 15/17 | < Previous Page | 11 12 13 14 15 16 17  | Next Page >

  • How to download kde or gnome from synaptic for offline installation

    - by Arin Chakraborty
    I know how to install GNOME 3 and KDE using apt-get. But i want to know how to, only download, from synaptic package manager, these shells. When i search for kubuntu-desktop in synaptic then the download file shows nearly 4MB but i clearly remember the actual size was near 100 mb. Just for information both are already installed in my laptop. So the question is - How to download the actuall 100 mb KUbuNTU-DESKTOP so that i can just, without any hesitation install it in offline computer which is using ubuntu 12.04. Same for the GNOME 3. Please help me out !

    Read the article

  • khotkey: starts firefox on any key?

    - by Adobe
    I have many scripts which I call with khotkey. However -- in my other laptop -- khotkey wouldn't call the script -- but tries to open the command in firefox. I checked -- the scripts are executable, and are mine. What else could that be? When I start the command from konsole -- it works as expected, but when I call it with khotkey -- it doesn't. I guess someone shadows my keybiding. But who could that be?

    Read the article

  • Removed Java replaced with newest "Sun Java", disc won't boot, and won't let me re-install grub using boot repair disc

    - by Al Rowe
    Had a minor problem with my Stock market platform. Set-up screen would freeze program. Called their tech support, got their "Linux guy", who advised remove all Java and replace, not with synaptic version, but newest Sun Java. After removing, computer auto rebooted, and went to blue mem-test screen. Showed no errors, but couldn't get back in. Tried two versions of boot repair disc from iso (checked md5sum, showed good.), but fix aborted, giving apt-error detected. Opened a terminal and typed (or copy/paste): sudo chroot "/mnt/boot-sav/sda1" apt-get -f install. My system is Ubuntu 12.04. Had a few very minor issues from install, all fixed. Also added some of my favorite gnome tricks just to make life easier, but none that could have caused this. Added script to add shortcuts to desktop, open terminal in any menu from inside it, access root terminal, etc. System was firewalled and using avast antivirus (o.k., I'm paranoid. Used to do Windows sys-op and security.) But relative newbie to Linux.

    Read the article

  • Bash script won't stay open in background after running through while

    - by jfreak53
    I can't get the following bash script to stay open after the first message is received from NC: #!/bin/bash port=3333 nc -l $port | while read msg; do notify-send Alert "$msg"; done After the first message it exits. I want it to stay open and continue monitoring for new messages from NC. I know that if I launch nc -l port without the while loop it stays open and I can chat away between the two connections even disconnect from the connected host. I am sending the message using: echo 'done' | nc IP port

    Read the article

  • Graphic issue on intel945 chipset

    - by peeyush tiwari
    I used Intrepid(8.10) and my graphics used to work fine with compiz effects and all(on better resolution than 1024x768).Now I have upgraded to Precise(12.04)but I use gnome classic(with compiz effects)as my desktop but the compiz effects seem not to work, only unity 2D works. When I ran lshw -c video it gives: *-display UNCLAIMED description: VGA compatible controller product: 82945G/GZ Integrated Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 02 width: 32 bits clock: 33MHz capabilities: msi pm vga_controller bus_master cap_list configuration: latency=0 resources: memory:fea80000-feafffff ioport:dc00(size=8) memory:e0000000-efffffff memory:fea40000-fea7ffff Sysinfo shows: Display Resolution 1024x768 pixels OpenGL Renderer Gallium 0.4 on llvmpipe(LLVM 0x300) X11 Vendor The X.Org Foundation On SystemSettings: Memory 993.3 MiB Processor Intel® Pentium(R) 4 CPU 2.40GHz Graphics VESA: Intel(r) 82945G Chipset Family Graphics OS type 32-bit glxgears output comes to be around 100fps which used to be around 900fps in Intrepid

    Read the article

  • Problem after mysql-server installation I cant install any thing in ubuntu 12.04.1 now

    - by mohammed ezzi
    I'm not an advanced user of Linux and I tried to install work with database so I installed Mysql-server, I think I did same thing wrong so I get in trouble and now I cant install any thing and this what I get when I use apt-get -f install : root@me:~# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: mysql-server mysql-server-5.5 Suggested packages: tinyca mailx The following packages will be upgraded: mysql-server mysql-server-5.5 2 upgraded, 0 newly installed, 0 to remove and 194 not upgraded. 2 not fully installed or removed. Need to get 0 B/8,737 kB of archives. After this operation, 15.4 kB of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: dependency problems prevent configuration of mysql-server-5.5: mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.24-0ubuntu0.12.04.1); however: Version of mysql-server-core-5.5 on system is 5.5.28-0ubuntu0.12.04.3. dpkg: error processing mysql-server-5.5 (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.5; however: Package mysql-server-5.5 is not configured yet. dpkg: error processing mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already Errors were encountered while processing: mysql-server-5.5 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) I tried to remove mysql-server but nothing happened.

    Read the article

  • My screen is messed up, using GeForce 8400 GS NVIDIA

    - by Ask Me
    My screen is all messed up. I can see everything beside my start menu and when I scroll up the mouse arrow goes up and out of the screen. It's not normal. Do I need to install "GeForce 8400 GS NVIDIA" drivers on my Ubuntu 12.10 32-bit machine? Please be very patient with me and use very simple words that a simple newbie could understand. I am very very new to this OS and I don't know much of the Ubuntu/Linux terminology. Thanks guys, stay blessed.

    Read the article

  • Samba installation failed on ubuntu 12.10

    - by Ayyaz
    I was trying to install samba to access shared printer on windows pc connected via office network, following response came out from terminal. please guide me how to install Samba or any other alternative. crm@crm-HP-G62-Notebook-PC:~$ sudo apt-get install samba [sudo] password for crm: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: samba : Depends: samba-common (= 2:3.6.6-3ubuntu4) but 2:3.6.6-3ubuntu5 is to be installed Depends: libwbclient0 (= 2:3.6.6-3ubuntu4) but 2:3.6.6-3ubuntu5 is to be installed Recommends: tdb-tools but it is not going to be installed E: Unable to correct problems, you have held broken packages. crm@crm-HP-G62-Notebook-PC:~$

    Read the article

  • I can't finish installation of 12.10 on Windows 8

    - by Janna Zhou
    When I followed the instruction to install Ubuntu 12.10 with wubi, the come out window ask me to reboot the computer to finish the installation. I followed the instruction and stopped with the message I have left below. Could you please tell me how to finish installation? I'm worried if I follow the instruction below to remove_hiberfile in Windows it would result in a failure to boot my Window 8 system: Completing the Ubuntu installation. For more installation boot options, press 'ESC'now... 0 Busy Box v1.19.3 (Ubuntu 1:1.19.3-7ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) windows is hibernated, refused to mount. Failed to mount '/dev/sda2/: Operation not permitted the NTFS partition is hibernated. Please resume and shutdown Windows properly, or mount the volume read-only with the 'ro' mount option, or mount the volume read-write with the 'remove_hiberfile' mount option. For example type on the command line: mount -t ntsfs-3g -0 remove_hiberfile/dev/sda2/isodevice mount:mounting/dev/sda2 on /isodevice failed: No such device Could not find the ISO/ubuntu/install/installation.iso This could also happen if the file system is not clean because of an operating system crash, an interrupted boot process, an improper shutdown, or unplugging of a removable device without first unmounting or ejecting it. To fix this, simply reboot into windows, let it fully start, log in, run 'chkdsk/r', then gracefully shut down and reboot back into Windows. After this you should be able to reboot again and resume the installation.

    Read the article

  • can't login to Unity always login to Unity 2D

    - by Goddard
    I select Ubuntu on login and it always loads Unity 2D. I ran /usr/lib/nux/unity_support_test -p And got this error X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 137 (NV-GLX) Minor opcode of failed request: 4 () Resource id in failed request: 0x21f Serial number of failed request: 42 Current serial number in output stream: 42 I'm using 12.04 with all the latest updates. nvidia-installer --version nvidia-installer: version 295.53 ([email protected]) Sat May 12 00:34:26 PDT 2012 The NVIDIA Software Installer for Unix/Linux. This program is used to install, upgrade and uninstall The NVIDIA Accelerated Graphics Driver Set for Linux-x86_64. Copyright (C) 2003 - 2010 NVIDIA Corporation.

    Read the article

  • Make the sound louder in Lubuntu

    - by Andrew
    I have a Toshiba r835 running Lubuntu 11.10. Turning the volume slider up all the way doesn't give very loud sound. I've tried typing alsamixer in a terminal and turning up all the levels there to maximum, but the speakers are still fairly quiet. Is there a simple way to increase maximum volume in software? I understand that there are physical limits to the sound the laptop's speakers can produce, but I suspect my maximum volume is limited by software. EDIT: This is exactly the type of solution I'm looking for. However, it doesn't work for me. What I did: sudo pico /etc/asound.conf This file does not exist, so I create a new one, containing: pcm.!default { type plug slave.pcm "softvol" } pcm.softvol { type softvol slave { pcm "dmix" } control { name "Pre-Amp" card 0 } min_dB -5.0 max_dB 20.0 resolution 6 } I reboot the machine, and type alsamixer. I use my left/right arrow keys to inspect the various volume options. I expect to see a new option, called Pre-Amp, but I don't see one. This fix seems to work for other people. Why doesn't this fix work for me?

    Read the article

  • Is there any way to stop a window's title bar merging with the panel when maximised?

    - by Richard Turner
    I'm working on a desktop machine with plenty of screen real-estate, so I don't need my windows' title bars to merge with the global menu bar when the windows are maximised. Moreover, I'm working on a dual-screen set-up, so the fact that a window is maximised doesn't mean that it's the only window visible. Before Unity I'd switch to a maximised window by clicking on its title bar, or close the window, even though it isn't focused, by clicking on its close button; I can no longer do this because the title bar is missing and the global menu bar is empty on that screen. This isn't a huge problem - I can click on some of the window's chrome to focus it - but it's unintuitive and it's forcing me to relearn my mousing behaviour. I'd like to turn-off the merging of title and global menu bars, but how? EDIT: I simply want the title bar of the window NOT to merge with the top panel whenever I maximize a Window. The global menu should stay in the top panel as far as I am concerned. Current it maximizes like this I want it to maximize like this (In that screeny the unmaximized Window has been resized to take rest of the space)

    Read the article

  • Blogger still visible after moving to WP; Google Indexing issues after moving from Blogger to WP

    - by Erin
    I recently migrated from Blogger to Wordpress and am having two major transition issues that are really hurting. Despite literally hours of searching and experimenting, I cannot resolve the following: ISSUE ONE: I fixed all of my old blogger links to 301 redirect successfully to my WP links (the 2 structures are different and I realized too late), but my old blogger blog is still sometimes visible! (the 2 designs are completely different) I had 31 hits on my blogger site just yesterday. I have updated my privacy settings to hide my blogger blog from search engines and not be visible on blogger. I also removed my custom domain from blogger already as well. HELP! Not sure how to stop this. ISSUE two: Despite submitting a new site map and reindexing my pages for my WP blog, I am not visible in search engines, although I was very visible previously. In fact, some of my OLD links are showing up. Am I being penalized?? Any thoughts on how to fix. THANK YOU! Erin my site: www.thelawstudentswife.com

    Read the article

  • Wordpress html email plugin that doesn't merge with your users?

    - by christian
    I just launched a wordpress site as a redesign of my strictly html site and added my blogger blog to Wordpress to keep it all in one place. I am trying to send an html email from my Wordpress site to all of my blogger subscribers encouraging them to subscribe to my new blog and join my newly created membership program, but every html email plugin (that I have found) imports your your users with you Wordpress users before you can send them an email. Is there a plugin that allows me to send an html email to a list of email address without adding them as users? otherwise I will have to go through and delete all of my users (after importing the list and sending the email) and try to pick out my legitimate users who have already signed up all the while watching for new ones to make sure I don't delete them.

    Read the article

  • How to get users to commit and collaborate to make a website valuable? [closed]

    - by AzizAG
    I own a website that requires a fairly largish amount of users to collaborate and commit occasionally to make the website valuable, so basically, the website can't be any valuable without users helping me put some content on it. To not get confused, I'm thinking of websites like Wikipedia, Stack Exchange and Yahoo! Answers, most of the content is based on peer effort. How do they actually get users interested and committed in the first place? What are the things I have to do to get users involved in the website and actually help me grow it bigger?

    Read the article

  • What nameserver should I use?

    - by Qmal
    Let's say that I have site.com website that I bought at one place, but want to host on another place. I don't know what to do. Here is scenario. I bought site.com on company that is using their own nameservers - ns.a.com. And linked website to their own servers. I bought hosting on another company that is using nameservers - ns.b.com. Should I just change ns.a.com on my DOMAIN to ns.b.com? Or should I link all DNS entries on my domain control panel to host ip addresses?

    Read the article

  • How does the web server choose between unicode and utf-8 for accented characters?

    - by jacques
    I have a web server with my ISP which replaces accented characters in URLs with their unicode values: for instance é (eacute) is translated to %e9 (dec 233). For testing locally I use EasyPHP which translates those characters by their utf-8 equivalence: é is then replaced by the well known sequence %c3%a9 (é)... Browsers served by EasyPHP don't decode unicode values but they do if running locally (utf-8 and non converted accent also)... I have been unable to find where this behavior is configured in the server. This is a problem as some urls are built by my application using the php rawurlencode() which seems to always encode with unicode values on both servers. Any idea?

    Read the article

  • Assigning a different texture based on picking(XNA)

    - by Thomas Carmichael
    I'm making a game using XNA. I have some simple objects like cube and sphere, and I would like to change the texture of one face of these objects based on picking. That is, when the cursor is over one face, it turns red. The only way I've seen to do this is to overload the content processor as here: http://xbox.create.msdn.com/en-US/education/catalog/sample/picking_triangle but it seems like it shouldn't be this complicated. I'm using .x models, and would like to be able to implement this for more complex models in the future beyond cubes/spheres/etc. Is this the best/only way to go about it? I'll figure that out if that's what is necessary, but it seems that there would be a simpler solution to load a different texture to a face than I've seen, I just don't know what it is.

    Read the article

  • setPosition of Sprite onUpdate in AndEngine

    - by SSH This
    I am trying to get a "highlighter" circle to follow around a sprite, but I am having trouble, I thought I could use the onUpdate method that's available to me in SequenceEntityModifier but it's not working for me. Here is my code: // make sequence mod with move modifier SequenceEntityModifier modifier = new SequenceEntityModifier(myMovemod) { @Override protected void onModifierFinished(IEntity pItem) { // animation finished super.onModifierFinished(pItem); } public float onUpdate(float pSecondsElapsed, IEntity pItem) { highlighter.setPosition(player2.getX() - highlighterOffset, player2.getY() - highlighterOffset); return pSecondsElapsed; } }; When onUpdate is completely commented out, the sprite moves like I want it to, everything is ok. When I put the onUpdate in, the sprite doesn't move at all. I have a feeling that I am overriding the original onUpdate's actions? Am I going about this the wrong way? I am new to Java, so please feel free to advise if this isn't going to work. UPDATE: The player2 is the sprite that I'm trying to get the highlighter to follow.

    Read the article

  • Where i must put .xnb files in mono game project using VS2010?

    - by user23899
    Hello there my problem was describe below In the "The Content Pipeline" paragraph http://blogs.msdn.com/b/bobfamiliar/archive/2012/08/07/windows-8-xna-and-monogame-part-3-code-migration-and-windows-8-feature-support.aspx#comments Author describe how fix it using VS2012 put xnb files to \AppX\Content folder but i use VS2010 and mono game templates for it and there is no folders like this so where i must put this asstes to run game correctly

    Read the article

  • Multiplayer online game engine/pipeline

    - by Slav
    I am implementing online multiplayer game where client must be written in AS3 (Flash) to embed game into browser and server in C++ (abstract part of which is already written and used with other games). Networking models may differ from each other, but currently I'm looking toward game's logic run on both client and server parts but they're written on different languages while it's not the main problem. My previous game (pretty big one - was implemented with efforts of ~5 programmers in 1.5 years) was mainly "written" within electronic tables as structured objects with implemented inheritance: was written standalone tool which generated AS3 and C++ (languages of platforms to which the game was published) using specified electronic tables file (.xls or .ods). That file contained ~50 tables with ~50 rows and ~50 columns each and was mainly written by game designers which do not know any programming languages. But that game was single-player. Having declared problem with my currently implementing MMO, I'm looking toward some vast pipeline, where will be resolved such problems like: game objects descriptions (which starships exist within game, how much HP they have, how fast move, what damage deal...) actions descriptions (what players or NPCs can do: attack each other, collect resources, build structures, move, teleport, cast spells) - actions are transmitted through server between clients influences (what happens when specified action applied on specified object, e.i "Ship A attacked Ship B: field "HP" of Ship B reduced by amount of field "damage" of Ship A" Influences can be much more difficult, yes, e.i. "damage is twice it's size when Ship has =5 allies around him in a 200 units range during night" and so on. If to be able to write such logic within some "design document" it will be easily possible to: let designers to do their job without programmer's intervention or any bug-prone programming validate described logic transfer (transform, convert) to any programming language where it will be executed Did somebody worked on something like that? Is there some tools/engines/pipelines which concernes with it? How to handle all of this problems simultaneously in a best way or do I properly imagine my tasks and problems to myself?

    Read the article

  • Camera Projection back Into 3D world, offset error

    - by Anthony
    I'm using XNA to simulate a robot in a 3D world and then do image analysis on what the camera sees. I have my camera looking down in front of the direction that the robot is going, and I have the robot detecting white pixels. I'm trying to take the white pixels that it finds and project them back into the 3D world so that I can see if it is actually detecting the correct pixels. I almost have it working, but there is an offset between where the white is in in the World and were I put my orange triangles (which represent what the robot things is white). /// <summary> /// Takes a bool map of and makes vertex positions based on the map. /// </summary> /// <param name="c"> The bool map</param> private void ProjectBoolMapOnGroundAnthony2(bool[,] c) { float triangleSize = 0.04f; // Point of interest in World W cordinate system. Vector3 pointOfInterest_W = Vector3.Zero; // Point of interest in Robot Cordinate system R Vector3 pointOfInterest_R = Vector3.Zero; // alpha is the angle from the robot camera to where it is looking in the center. //double alpha = Math.Atan(1.8f / 1); /// Matrix representation of the view determined by the position, target, and updirection. Matrix View = ((SimulationMain)Game).mainRobot.robotCameraView.View; /// Matrix representation of the view determined by the angle of the field of view (Pi/4), aspectRatio, nearest plane visible (1), and farthest plane visible (1200) Matrix Projection = ((SimulationMain)Game).mainRobot.robotCameraView.Projection; /// Matrix representing how the real world cordinates differ from that of the rendering by the camera. Matrix World = ((SimulationMain)Game).mainRobot.robotCameraView.World; Plane groundPlan = new Plane(Vector3.UnitZ, 0.0f); for (int x = 0; x < this.screenWidth; x++) { for (int y = 0; y < this.screenHeight; ) { if (c[x, y] == true && this.count1D < 62000) { int j = 1; Vector3 nearPlanePoint = Game.GraphicsDevice.Viewport.Unproject(new Vector3(x, y, 0), Projection, View, World); Vector3 farPlanePoint = Game.GraphicsDevice.Viewport.Unproject(new Vector3(x, y, 1), Projection, View, World); //Vector3 pointOfInterest_W = Vector3.in Ray ray = new Ray(nearPlanePoint, farPlanePoint); pointOfInterest_W = ray.Position + ray.Direction * (float) ray.Intersects(groundPlan); this.vertexArray2[this.count1D + 0].Position.X = pointOfInterest_W.X - triangleSize; this.vertexArray2[this.count1D + 0].Position.Y = pointOfInterest_W.Y - triangleSize * j; this.vertexArray2[this.count1D + 0].Position.Z = pointOfInterest_W.Z; this.vertexArray2[this.count1D + 0].Color = Color.DarkOrange; // Put another vertex a the position but +1 in the X direction triangleSize //this.vertexArray2[this.count1D + 1].Position.X = pointOnGroud.X + 3; //this.vertexArray2[this.count1D + 1].Position.Y = pointOnGroud.Y + j; this.vertexArray2[this.count1D + 1].Position.X = pointOfInterest_W.X; this.vertexArray2[this.count1D + 1].Position.Y = pointOfInterest_W.Y + triangleSize * j; this.vertexArray2[this.count1D + 1].Position.Z = pointOfInterest_W.Z; this.vertexArray2[this.count1D + 1].Color = Color.Red; // Put another vertex a the position but +1 in the X direction //this.vertexArray2[this.count1D + 0].Position.X = pointOnGroud.X; //this.vertexArray2[this.count1D + 0].Position.Y = pointOnGroud.Y + 3 + j; this.vertexArray2[this.count1D + 2].Position.X = pointOfInterest_W.X + triangleSize; this.vertexArray2[this.count1D + 2].Position.Y = pointOfInterest_W.Y - triangleSize * j; this.vertexArray2[this.count1D + 2].Position.Z = pointOfInterest_W.Z; this.vertexArray2[this.count1D + 2].Color = Color.Orange; this.count1D += 3; y += j; } else { y++; } } } } The world is a grass texture with lines on it. The world plane is normal at (0,0,1). Any ideas on why there is an offset? Any Ideas? Thanks for the help, Anthony G.

    Read the article

  • Image loaded from TGA texture isn't displayed correctly

    - by Ramy Al Zuhouri
    I have a TGA texture containing this image: The texture is 256x256. So I'm trying to load it and map it to a cube: #import <OpenGL/OpenGL.h> #import <GLUT/GLUT.h> #import <stdlib.h> #import <stdio.h> #import <assert.h> GLuint width=640, height=480; GLuint texture; const char* const filename= "/Users/ramy/Documents/C/OpenGL/Test/Test/texture.tga"; void init() { // Initialization glEnable(GL_DEPTH_TEST); glViewport(-500, -500, 1000, 1000); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45, width/(float)height, 1, 1000); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0, 0, -100, 0, 0, 0, 0, 1, 0); // Texture char bitmap[256][256][3]; FILE* fp=fopen(filename, "r"); assert(fp); assert(fread(bitmap, 3*sizeof(char), 256*256, fp) == 256*256); fclose(fp); glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, bitmap); } void display() { glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); glColor3ub(255, 255, 255); glBegin(GL_QUADS); glVertex3f(0, 0, 0); glTexCoord2f(0.0, 0.0); glVertex3f(40, 0, 0); glTexCoord2f(0.0, 1.0); glVertex3f(40, 40, 0); glTexCoord2f(1.0, 1.0); glVertex3f(0, 40, 0); glTexCoord2f(1.0, 0.0); glEnd(); glDisable(GL_TEXTURE_2D); glutSwapBuffers(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutInitWindowPosition(100, 100); glutInitWindowSize(width, height); glutCreateWindow(argv[0]); glutDisplayFunc(display); init(); glutMainLoop(); return 0; } But this is what I get when the window loads: So just half of the image is correctly displayed, and also with different colors.Then if I resize the window I get this: Magically the image seems to fix itself, even if the colors are wrong.Why?

    Read the article

  • What method replaces GL_SELECT for box selection?

    - by Jake
    Last 2 weeks I started working on a box selection that selects shapes using GL_SELECT and I just got it working finally. When looking up resources online, there is a significant number of posts that say GL_SELECT is deprecated in OpenGL 3.0, but there is no mention of what had replace that function. I learnt OpenGL 1.2 in back in college 2 years back but checking wikipedia now, I realise we already have OpenGL 4.0 but I am unaware of what I need to do to keep myself up to date. So, in the meantime, what would be the latest preferred method for box selection? EDIT: I found http://www.khronos.org/files/opengl-quick-reference-card.pdf on page 5 this card still lists glRenderMode(GL_SELECT) as part of the OpenGL 3.2 reference.

    Read the article

  • My 2D collision code does not work as expected. How do I fix it?

    - by farmdve
    I have a simple 2D game with a tile-based map. I am new to game development, I followed the LazyFoo tutorials on SDL. The tiles are in a bmp file, but each tile inside it corresponds to an internal number of the type of tile(color, or wall). The game is simple, but the code is a lot so I can only post snippets. // Player moved out of the map if((player.box.x < 0)) player.box.x += GetVelocity(player, 0); if((player.box.y < 0)) player.box.y += GetVelocity(player, 1); if((player.box.x > (LEVEL_WIDTH - DOT_WIDTH))) player.box.x -= GetVelocity(player, 0); if((player.box.y > (LEVEL_HEIGHT - DOT_HEIGHT))) player.box.y -= GetVelocity(player, 1); // Now that we are here, we check for collisions if(touches_wall(player.box)) { if(player.box.x < player.prev_x) { player.box.x += GetVelocity(player, 0); } if(player.box.x > player.prev_x) { player.box.x -= GetVelocity(player, 0); } if(player.box.y < player.prev_y) { player.box.y += GetVelocity(player, 1); } if(player.box.y > player.prev_y) { player.box.y -= GetVelocity(player, 1); } } player.prev_x = player.box.x; player.prev_y = player.box.y; Let me explain, player is a structure with the following contents typedef struct { Rectangle box; //Player position on a map(tile or whatever). int prev_x, prev_y; // Previous positions int key_press[3]; // Stores which key was pressed/released. Limited to three keys. E.g Left,right and perhaps jump if possible in 2D int velX, velY; // Velocity for X and Y coordinate. //Health int health; bool main_character; uint32_t jump_ticks; } Player; And Rectangle is just a typedef of SDL_Rect. GetVelocity is a function that according to the second argument, returns the velocity for the X or Y axis. This code I have basically works, however inside the if(touches_wall(player.box)) if statement, I have 4 more. These 4 if statements are responsible for detecting collision on all 4 sides(up,down,left,right). However, they also act as a block for any other movement. Example: I move down the object and collide with the wall, as I continue to move down and still collide with the wall, I wish to move left or right, which is indeed possible(not to mention in 3D games), but remember the 4 if statements? They are preventing me from moving anywhere. The original code on the LazyFoo Productions website has no problems, but it was written in C++, so I had to rewrite most of it to work, which is probably where the problem comes from. I also use a different method of moving, than the one in the examples. Of course, that was just an example. I wish to be able to move no matter at which wall I collide. Before this bit of code, I had another one that had more logic in there, but it was flawed.

    Read the article

< Previous Page | 11 12 13 14 15 16 17  | Next Page >