Daily Archives

Articles indexed Monday November 4 2013

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Notify-osd notifications appear unthemed in top-left corner (ubuntu 13.10)

    - by Wehlutyk
    Problem I recently upgraded from 13.04 to 13.10, and suddenly notification bubbles don't appear themed as usual in the upper right corner, but they appear as white text on blue background in the upper-left corner. It looks like this: Unsuccesful attempts to fix it I tried reinstalling unity, notify-osd, ubuntu-desktop removed notification-daemon which was installed, none of that fixes it. In fact running ps aux | grep notify-osd shows that notify-osd isn't even running. But when I try to start it manually by running /usr/lib/x86_64-linux-gnu/notify-osd I get: ** (notify-osd:4618): WARNING **: Another instance has already registered org.freedesktop.Notifications ** (notify-osd:4618): WARNING **: Could not register instance If I understand well, the instance is registered by the /usr/share/dbus-1/services/org.freedesktop.Notifications.service file, which right now contains: [D-BUS Service] Name=org.freedesktop.Notifications Exec=/usr/lib/x86_64-linux-gnu/notify-osd Renaming or deleting that file (and rebooting) has no effect whatsoever (and it is not recreated automatically). This is not a duplicate of No notifications from notify-osd on 13.10 (and by the way I purged gnome-flashback-session along with notification-daemon) Question(s) How can I debug this? How can I get notifications to come back to normal? If additional debug information is needed, I'll be happy to add it (just that I can't find any more).

    Read the article

  • Access local email stored on worstation on laptop on lan

    - by crafter
    I have the following scenario with my email : I am using Evolution as my primary email client on my workstation. The evolution mail is downloaded from my mail servers using POP, then deleted from the server. When I am mobile, I access my email on my email server using webmail. My laptop is my primary computer thesedays. The workstation is hardly used. When I am mobile, I am restricted to new email that has not been downloaded onto the workstation I am now looking for a way to access my email from my workstation on my laptop, amlost as if my workstation is my second level email server/ I tried evolution on X display but attachments will browse on my workstation (not ideal as most docs are on my laptop). I am open to changing mail client or installing a service on my workstation. What would be the best way to address this requirement?

    Read the article

  • Mathematica 8 crashes Ubuntu 13.10

    - by Georgy Ivanov
    I have Mathematica 8 installed on my Ubuntu laptop since 2011. I updated Ubuntu several times, and experienced no problems with Mathematica. It also worked smoothly after I updated Ubuntu to 13.10 (it worked for sure for a week after update). When I tried to start Mathematica today by executing a .sh-file, the screen went black, I was logged out from the session and thrown back to the login screen. Typing mathematica in the terminal produced the same effect. Typing mathematica -cleanstart or mathematica -mesa did not help. Starting Gnome session with or without effects did not help Launching mathematica under another user account did not help. I still can run text-only version of mathematica by typing math in the terminal. I don't remember making any changes to my configuration except for installing updates. Is there any quick way to fix this behavior? How can I know which component exactly crashed? Where should I look for crash logs?

    Read the article

  • Can't specify window's class in CCSM's Place Windows

    - by Anto
    Following this method, I wanted to "place" some of my windows on specific viewports. For instance, I want Xchat to always start on my top right viewport (x=2, y=1). But after I have set everything up and clicked the "Close" button to validate it (I don't have any other action button, like "OK" or "Apply"), the only thing that get saved up are the viewport X and Y coordinates. The window class (in my case class=Xchat) remains empty. This bug only occurs in the "Windows with fixed viewport" section; it works well in the "Windows with fixed placement mode", for instance. How can I solve or circumvent this issue ?

    Read the article

  • failure to upgrade to 13.10 on ASUS 1015E-DS03

    - by user211270
    How should I proceed? On my last step to reach 13.10, after the download and installation and removal of unwanted packages, and after the reboot, I received this message: Sorry, a problem occurred while installing software. Package: i915-dkms The details revealed: Package i915-dkms 0.1 [origin: unknown] Problem Type Package Title i915-dkms 0.1: i915 kernel modele failed to build ApportVersion 2.12.5-0ubuntu2.1 Architecture amd64 DKMSBuildLog DKMSKernelVersion 3.11.0-12-generic Date Sun Nov 3 19:49:38 2013 Dependencies DistributionChannelDescriptor This is a distribution channel descriptor For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor canonical-oem-annan-standard-precise-amd64-20130106-0 DistroRelease Ubuntu 13.10 InstallationDate Installed on 2013-01-24 (283 days ago) Thanks for any help, Bob Pendleton

    Read the article

  • Can't untar Testdisk 6.14 using live CD

    - by Orestes
    I'm using an Ubuntu LiveCD right now and need to recover files from a (Windows 7) partition. I've read about TestDisk and tried downloading it and untaring it but: testdisk-6.14-WIP.linux26.tar.bz2: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now I don't know why it doesn't work (noob). I tried using sudo apt-get install testdisk but: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package testdisk so.... HELP :D

    Read the article

  • Multi-touch mouse gestures in Ubuntu 13.10?

    - by Alex Li
    I have Ubuntu 13.10 and Windows 8 installed as dual boot. There is a mousepad specific driver in Windows 8 that lets me use multi-touch gestures such as two finger swipe to go back/forward, pinch to zoom in/out, and pivot rotate. The driver/touchpad is made by Alps. But on Ubuntu 13.10 there is no multi-touch support like those I can use on Windows. How can I get the same mouse gestures on Windows to work on Ubuntu 13.10?

    Read the article

  • Setting console resolution in Ubuntu Server 13.10 within VMware

    - by user205625
    I've completed an install of Ubuntu Server 13.10 within VMware and am running into a problem configuring the console (non-graphical) resolution. When I was running Ubuntu Server 13.04, I ran into the same problem... posted the question here, which I later solved by editing /etc/default/grub thus: GRUB_CMDLINE_LINUX_DEFAULT="splash vga=789" I then ran sudo update-grub, sudo reboot and 13.04 stuck in a larger-size console mode... just what I wanted. BUT when I run the same commands in 13.10, during the reboot it changes to the new screen-res, BUT the screen stays black and I can't interact with it. I power down the VM, go back to a previous snapshot, and try again... and again. Since the hwinfo package is no longer available, I can't run sudo hwinfo --framebuffer to see what options are available. Ideas anyone? Here are the uncommented settings in my /etc/default/grub file at this moment: GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="splash" GRUB_CMDLINE_LINUX="find_preseed=/preseed.cfg" GRUB_DISABLE_LINUX_RECOVERY=false GRUB_GFXMODE=800x600

    Read the article

  • apt-get upgrade gives "403 forbidden" error

    - by 3l4ng
    I'm running Ubuntu 13.04 64b. sudo apt-get update works fine, but when I run sudo apt-get upgrade I get these errors: Err http://archive.ubuntu.com/ubuntu/ raring-updates/main python3.3-minimal amd64 3.3.1-1ubuntu5.2 403 Forbidden Err http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/ raring/main gimp amd64 2.8.6-0raring1~ppa 403 Forbidden Err http://archive.ubuntu.com/ubuntu/ raring-security/main python3.3-minimal amd64 3.3.1-1ubuntu5.2 403 Forbidden Err http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/ raring/main gimp-help-en all 1:2.8-0raring16~ppa 403 Forbidden Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python3.3/python3.3-minimal_3.3.1-1ubuntu5.2_amd64.deb 403 Forbidden Failed to fetch http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/pool/main/g/gimp/gimp_2.8.6-0raring1~ppa_amd64.deb 403 Forbidden Failed to fetch http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/pool/main/g/gimp-help/gimp-help-en_2.8-0raring16~ppa_all.deb 403 Forbidden E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? Running sudo apt-get upgrade --fix-missing installs some updates, but the above errors still persist when I run apt-get upgrade again. The software update app shows the error: https://www.dropbox.com/s/2cr450557hmahzz/software_update.jpg and selecting continue shows: https://www.dropbox.com/s/l7u32sxyfbxxeeg/soft_upd2.jpg (sorry for the links, I don't have enough rep to post images) I am behind a proxy, but apt-get update and web browsing work without issues. I also do not believe a server being down is causing this, as the problem has been there over a month. Any ideas on how to fix this?

    Read the article

  • Can't get Broadcom 43142 drivers to work after installation on 5420 Inspiron

    - by beckett
    I'm a complete newbie to ubuntu, I've already installed and reinstalled the Broadcom driver required done a numerous amount of steps on terminal but I can't seem to get wireless working. However, my wired connection seems to work just fine. also I have tried to follow the instructions but get stuck at step number 2 when i get told "No package dpkg is available": 1) Download the file from the link 2) sudo yum install dpkg 3) mkdir BCM43142 4) dpkg-deb -x Downloads/wireless-bcm43142-dkms-6.20.55.19_amd64.deb BCM43142 5) cd BCM43142/usr/src/wireless-bcm43142-oneiric-dkms-6.20.55.19~bdcom0602.0400.1000.0400/src/wl/sys 6) sudo yum install kernel-devel kernel-headers 7) vi wl_linux.c 8) around line 43, remove the line include 9) save the file (:wq) 10) cd ../../.. 11) make Things should work, and you'll have a file called "wl.ko" in the current directory. 12) sudo yum remove broadcom-wl 13) sudo mkdir -p /lib/modules/3.5.2-3.fc17.x86_64/extra/wl 14) sudo cp wl.ko /lib/modules/3.5.2-3.fc17.x86_64/extra/wl 15) sudo depmod -a 16) sudo modprobe wl I really need help :/

    Read the article

  • apt-get 403 Forbidden

    - by Lerp
    I've start a new job today and I am trying to set up my machine to run through their Windows server. I've managed to get a internet connection through the server now but now I can't run apt-get update as I get a "403 Forbidden" error. This is for every repo under my source list, apart from translations(?). I do have a proxy in apt.conf, if I don't have it I get a 407 Permission Denied error. Here's my apt.conf file (I have omitted my username and password) Acquire::http::proxy "http://username:[email protected]:8080/"; Here's my sources.list #deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/main/binary-i386/ #deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/restricted/binary-i386/ #deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ precise main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://gb.archive.ubuntu.com/ubuntu/ precise-updates main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://gb.archive.ubuntu.com/ubuntu/ precise universe deb-src http://gb.archive.ubuntu.com/ubuntu/ precise universe deb http://gb.archive.ubuntu.com/ubuntu/ precise-updates universe deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://gb.archive.ubuntu.com/ubuntu/ precise multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise multiverse deb http://gb.archive.ubuntu.com/ubuntu/ precise-updates multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu precise-security main restricted deb-src http://security.ubuntu.com/ubuntu precise-security main restricted deb http://security.ubuntu.com/ubuntu precise-security universe deb-src http://security.ubuntu.com/ubuntu precise-security universe deb http://security.ubuntu.com/ubuntu precise-security multiverse deb-src http://security.ubuntu.com/ubuntu precise-security multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu precise partner # deb-src http://archive.canonical.com/ubuntu precise partner ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software. deb http://extras.ubuntu.com/ubuntu precise main deb-src http://extras.ubuntu.com/ubuntu precise main I can sort-of fix this by changing all the http in sources.list to ftp but I still have issues with ppas

    Read the article

  • Apt-get 403 Forbidden, but accessible in the browser

    - by labarna
    I've noticed that running apt-get update recently has resulted in quite a few ppa's returning "403 Forbidden". In and effort to clean them up I had a look: W: Failed to fetch http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu/dists/raring/main/binary-amd64/Packages 403 Forbidden W: Failed to fetch http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu/dists/raring/main/binary-i386/Packages 403 Forbidden E: Some index files failed to download. They have been ignored, or old ones used instead. The strange things is, if I copy these URLs into my browser I can access the files just fine. Why would apt-get report "403 Forbidden" if they're still accessible? I tried re-adding the ppa through add-apt-repository which downloads the signing key again, and it still reported "403 Forbidden".

    Read the article

  • What is the current state of apple device (iPhone, iPod, etc.) support?

    - by BullfrogBlues
    What ubuntu applications provide support? (guides, how to's, status) Also, specifically, details on support for syncing music to iPhone's and iPod's with the latest OS version, as of writing iOS 5: Can you sync music to apple devices using iOS5? (iPhone & iPod) What applications allow you to do this and how? (guides, how to's, status) What has already been established is: Apple does not support Linux and has no plans to. libimobiledevice seems to provide some support but does not support syncing music with devices using iOS5. (I can't test libmobiledevice with anything other iOS5, so I can't provide details on how that works)

    Read the article

  • No cache and Google AdSense performance

    - by Luca
    I'm developing a page where I need to avoid JavaScript caching by browser. I've added this header: <?php header('Cache-Control: no-cache, no-store, must-revalidate'); header('Pragma: no-cache'); header('Expires: 0'); ?> After this, browsers didn't cache more JavaScript sorting out the issue, but in the same time I noticed a drop in Google AdSense RPM. Then I removed the added code and now Google AdSense RPM is reaching again a good value. So, how could I avoid JavaScript caching without meddle with AdSense performance?

    Read the article

  • Category to Page and blocking category url via robots.txt -Good for SEO?

    - by user2952353
    I am using a template which in the pages it allows me to add sidebars / more content under and above the content I want to pull from a category which is very helpful. If I create pages to display my categories content wont the page urls go in conflict with the category urls? By conflict I mean causing a duplicate content error? What I thought might help was to block from robots.txt the category urls of the blog ex. /category/books /category/music Would that be a good practice in order to avoid the duplicate content penalty? Any tips appreciated.

    Read the article

  • Still no detected structured data in Google Webmaster Tools [on hold]

    - by user6211
    Can you give me some suggestions what's wrong with my structured data? Google still cannot read it. It looks like this: <div class="identity"> <div itemscope itemtype="http://schema.org/LocalBusiness"> <a itemprop="url" href="http://MYDOMAIN.co.uk/"><div itemprop="name"><strong>MY_COMPANY</strong></div></a> <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="streetAddress">MY_ADDRESS</span>, <span itemprop="addressLocality">London</span>, <span itemprop="postalCode">SE5 MY_XYZ</span>, <span itemprop="addressCountry">UK</span> </div> </div> </div>

    Read the article

  • Google Analytics and Whos.amung.us in realtime visitors, why such an enormous discrepancy?

    - by jacouh
    Since years I use in a site both Google Analytics and Whos.amung.us, both Google analytics and whos.amung.us javascripts are inserted in the same pages in the tracked part of the site. In real-time visitors, why such an enormous discrepancy ? for example at the moment, Google analytics gives me 9 visitors, whos.amung.us indicates 59, a ratio of 6 times? Why whos.amung.us is 6 times optimistic than Google Analytics in terms of the realtime visitors? Google whos.amung.us My question is: whos.amung.us does not detect robots while Google does? GA ignores visitors from some countries, not whos.amung.us? Some robots/bots execute whos.amung.us javascript for tracking? While no robots/bots can execute the tracking javascript provided by Google Analytics? To facilitate your analysis, I copy JS code used below: Google analytics: <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'MyGaAccountNo']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> Whos.amung.us: <script>var _wau = _wau || []; _wau.push(["tab", "MyWAUAccountNo", "c6x", "right-upper"]);(function() { var s=document.createElement("script"); s.async=true; s.src="http://widgets.amung.us/tab.js";document.getElementsByTagName("head")[0].appendChild(s);})();</script> I've aleady signaled this to WAU staff some time ago, NR, I've not done this to Google as they don't handle this kind of feedback. Thank you for your explanations.

    Read the article

  • Why does Bing webmaster tool's SEO analyzer complain about multiple <h1> tags?

    - by Mathew Foscarini
    I used the Bing webmaster tool's SEO analyzer on my website, and it reported: There are multiple tags on the page. It recommends that there should only be one <h1> tag on the page. The page is a listing of blog posts for a category. So each blog entry is structured like this. <article> <header><h1><a>...</a></h1></header> <p>summary...</p> </article> <article> <header><h1><a>...</a></h1></header> <p>summary...</p> </article> <article> <header><h1><a>...</a></h1></header> <p>summary...</p> </article> <article> <header><h1><a>...</a></h1></header> <p>summary...</p> </article> How is this invalid? I thought this was the correct way to describe a post in HTML5.

    Read the article

  • Will Google crawl session based website

    - by DonShwep
    I have a website, it is split into 3 categories but using PHP its an all-in one kind of style. When a user chooses a category on the home page a session is set, this is then used to set the style and contents of the website. Would Googlebot and other bots be able to still scan my website? If a page is accessed and no session is set then the user is sent back to the home page. I have created special links, that set a session but go straight to the contact page. Even this page doesn't seem to be showing up. Any ideas if a sitemap with specially crafted links (to set the session) will help Google?

    Read the article

  • Adsense block not displaying anything

    - by Mild Fuzz
    I have copied and pasted the following code into my page, but it seems to be having no effect. It should have a fall back block colour, but nothing is showing. Code copied/pasted straight from google <script type="text/javascript"><!-- google_ad_client = "ca-pub-7972043490779920"; /* SALF */ google_ad_slot = "4085311300"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

    Read the article

  • Creating a simple 2d game with C++: Where to go first? [on hold]

    - by Lucas Vieira
    I'm starting to build a little school project. (I have a prior experience with php, python and java, and i'm learning c++ now). My part is simple, create a game, like this pong http://www.ponggame.org/ The problem is that I've never programmed a game before. I was looking the possibilities, maybe use QT? Or is there other library better for my case? Since i don't want to reinvent the wheel, where to start with? Thank you, guys!

    Read the article

  • Orthographic Projection with variable FOV

    - by cubrman
    We are building agame with orthographic view. The problem we face is the fact that with different resolution you can see different area of the game world. E.g. if you have higher resolution you can see more around you. To solve this we currently use a common scale factor that every model is scaled by, depending on resolution. But this has drawbacks when drawing shadows - I cannot set a higher view angle for the orthographic shadow camera, while when using the perspective shadow camera I get significantly worse shadow quality. So the question is is there any way to controll FOV when using orthographic projection, or, more specifically, what is the easiest way to scale the world uniformly up or down with orthographic projection matrix? I saw that in 3ds MAX you can control FOV for an orthographic camera I wonder how they implemented it.

    Read the article

  • OpenGL position from depth is wrong

    - by CoffeeandCode
    My engine is currently implemented using a deferred rendering technique, and today I decided to change it up a bit. First I was storing 5 textures as so: DEPTH24_STENCIL8 - Depth and stencil RGBA32F - Position RGBA10_A2 - Normals RGBA8 x 2 - Specular & Diffuse I decided to minimize it and reconstruct positions from the depth buffer. Trying to figure out what is wrong with my method currently has not been fun :/ Currently I get this: which changes whenever I move the camera... weird Vertex shader really simple #version 150 layout(location = 0) in vec3 position; layout(location = 1) in vec2 uv; out vec2 uv_f; void main(){ uv_f = uv; gl_Position = vec4(position, 1.0); } Fragment shader Where the fun (and not so fun) stuff happens #version 150 uniform sampler2D depth_tex; uniform sampler2D normal_tex; uniform sampler2D diffuse_tex; uniform sampler2D specular_tex; uniform mat4 inv_proj_mat; uniform vec2 nearz_farz; in vec2 uv_f; ... other uniforms and such ... layout(location = 3) out vec4 PostProcess; vec3 reconstruct_pos(){ float z = texture(depth_tex, uv_f).x; vec4 sPos = vec4(uv_f * 2.0 - 1.0, z, 1.0); sPos = inv_proj_mat * sPos; return (sPos.xyz / sPos.w); } void main(){ vec3 pos = reconstruct_pos(); vec3 normal = texture(normal_tex, uv_f).rgb; vec3 diffuse = texture(diffuse_tex, uv_f).rgb; vec4 specular = texture(specular_tex, uv_f); ... do lighting ... PostProcess = vec4(pos, 1.0); // Just for testing } Rendering code probably nothing wrong here, seeing as though it always worked before this->gbuffer->bind(); gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT); gl::Enable(gl::DEPTH_TEST); gl::Enable(gl::CULL_FACE); ... bind geometry shader and draw models and shiz ... gl::Disable(gl::DEPTH_TEST); gl::Disable(gl::CULL_FACE); gl::Enable(gl::BLEND); ... bind textures and lighting shaders shown above then draw each light ... gl::BindFramebuffer(gl::FRAMEBUFFER, 0); gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT); gl::Disable(gl::BLEND); ... bind screen shaders and draw quad with PostProcess texture ... Rinse_and_repeat(); // not actually a function ;) Why are my positions being output like they are?

    Read the article

  • In GLSL is it possible to offset vertices based on height map colour?

    - by Rob
    I am attempting to generate some terrain based upon a heightmap. I have generated a 32 x 32 grid and a corresponding height map - In my vertex shader I am trying to offset the position of the Y axis based upon the colour of the heightmap, white vertices being higher than black ones. //Vertex Shader Code #version 330 uniform mat4 modelMatrix; uniform mat4 viewMatrix; uniform mat4 projectionMatrix; uniform sampler2D heightmap; layout (location=0) in vec4 vertexPos; layout (location=1) in vec4 vertexColour; layout (location=3) in vec2 vertexTextureCoord; layout (location=4) in float offset; out vec4 fragCol; out vec4 fragPos; out vec2 fragTex; void main() { // Retreive the current pixel's colour vec4 hmColour = texture(heightmap,vertexTextureCoord); // Offset the y position by the value of current texel's colour value ? vec4 offset = vec4(vertexPos.x , vertexPos.y + hmColour.r, vertexPos.z , 1.0); // Final Position gl_Position = projectionMatrix * viewMatrix * modelMatrix * offset; // Data sent to Fragment Shader. fragCol = vertexColour; fragPos = vertexPos; fragTex = vertexTextureCoord; } However the code I have produced only creates a grid with none of the y vertices higher than any others. This is the C++ code that generates the grid and texture co-orientates which I believe to be correct as the texture is mapped to the grid, hence the white blob in the middle. The grid-lines are generated in the fragment shader, sorry for any confusion. I have tried multiplying the r value of hmColour by 1000 unfortunately that had no effect. The only other problem it could be is that the texture coordinate data is incorrect ? for (int z = 0; z < MAP_Z ; z++) { for(int x = 0; x < MAP_X ; x++) { //Generate Vertex Buffer vertexData[iVertex++] = float (x) * MAP_X; vertexData[iVertex++] = 0; vertexData[iVertex++] = -(float) (z) * MAP_Z; //Colour Buffer NOT NEEDED colourData[iColour++] = 255.0f; // R colourData[iColour++] = 1.0f; // G colourData[iColour++] = 0.0f; // B //Texture Buffer textureData[iTexture++] = (float ) x * (1.0f / MAP_X); textureData[iTexture++] = (float ) z * (1.0f / MAP_Z); } } The heightmap texture I am trying to use appears like so (without grid-lines). This is the corresponding fragment shader // Fragment Shader Code #version 330 uniform sampler2D hmTexture; layout (location=0) out vec4 fragColour; in vec2 fragTex; in vec4 pos; void main(void) { vec2 line = fragTex * 32; // Without Gridlines fragColour = texture(hmTexture,fragTex); // With grid lines // + mix(vec4(0.0, 0.0, 1.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), // smoothstep(0.05,fract(line.y), 0.99) * smoothstep(0.05,fract(line.x),0.99)); }

    Read the article

  • XNA ModelMesh.Draw vs GraphicsDevice.DrawIndexedPrimitives

    - by cubrman
    I am using XNA 4.0 and I wonder if drawing models with multiple meshes is better by filling the vertex and index buffers first and calling GraphicsDevice.DrawIndexedPrimitives() or by simply using good ol' foreach(...) {ModelMesh.Draw()}. Is it possible to add data to vertex/index buffers at all in order to pack all the models on the scene in them and then call Draw only once per frame? I would appreciate a link to an in-depth explanation. Thanks.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >