Search Results

Search found 2271 results on 91 pages for 'tom johnson'.

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

  • Color Picking Troubles - LWJGL/OpenGL

    - by Tom Johnson
    I'm attempting to check which object the user is hovering over. While everything seems to be just how I'd think it should be, I'm not able to get the correct color due to the second time I draw (without picking colors). Here is my rendering code: public void render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); camera.applyTranslations(); scene.pick(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); camera.applyTranslations(); scene.render(); } And here is what gets called on each block/tile on "scene.pick()": public void pick() { glColor3ub((byte) pickingColor.x, (byte) pickingColor.y, (byte) pickingColor.z); draw(); glReadBuffer(GL_FRONT); ByteBuffer buffer = BufferUtils.createByteBuffer(4); glReadPixels(Mouse.getX(), Mouse.getY(), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, buffer); int r = buffer.get(0) & 0xFF; int g = buffer.get(1) & 0xFF; int b = buffer.get(2) & 0xFF; if(r == pickingColor.x && g == pickingColor.y && b == pickingColor.z) { hovered = true; } else { hovered = false; } } I believe the problem is that in the method of each tile/block called by scene.pick(), it is reading the color from the regular drawing state, after that method is called somehow. I believe this because when I remove the "glReadBuffer(GL_FRONT)" line from the pick method, it seems to almost fix it, but then it will also select blocks behind the one you are hovering as it is not only looking at the front. If you have any ideas of what to do, please be sure to reply!/ EDIT: Adding scene.render(), tile.render(), and tile.draw() scene.render: public void render() { for(int x = 0; x < tiles.length; x++) { for(int z = 0; z < tiles.length; z++) { tiles[x][z].render(); } } } tile.render: public void render() { glColor3f(color.x, color.y, color.z); draw(); if(hovered) { glColor3f(1, 1, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); draw(); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } } tile.draw: public void draw() { float x = position.x, y = position.y, z = position.z; //Top glBegin(GL_QUADS); glVertex3f(x, y + size, z); glVertex3f(x + size, y + size, z); glVertex3f(x + size, y + size, z + size); glVertex3f(x, y + size, z + size); glEnd(); //Left glBegin(GL_QUADS); glVertex3f(x, y, z); glVertex3f(x + size, y, z); glVertex3f(x + size, y + size, z); glVertex3f(x, y + size, z); glEnd(); //Right glBegin(GL_QUADS); glVertex3f(x + size, y, z); glVertex3f(x + size, y + size, z); glVertex3f(x + size, y + size, z + size); glVertex3f(x + size, y, z + size); glEnd(); } (The game is like an isometric game. That's why I only draw 3 faces.)

    Read the article

  • What is the best book for the preparation of MCPD Exam 70-564 (Designing and Developing ASP.NET 3.5 Applications)?

    - by Steve Johnson
    Hi all, I have seen a couple of questions like this one and scanned through the answers but somehow the replies were not satisfactory or practical. So i wondered maybe people who have gone through it and may suggest a better approach for the preparation of this exam. Goal: My goal is actually NOT merely to pass that exam. I intend to actually master the skill. I have been into asp.net web development for approximately 1.5 years and I want to study something that really improves "Design and Development Skills" in Web Development in general and asp.net to be specific which i can put to use and build upon that. Please suggest a book that teaches professional Asp.Net design and development skills and approaches to quality development by taking through practice design scenarios and their solutions and through various case studies that involve design problems and their implemented solutions. Edit: I have found the Micorosoft training kits to be fairly interesting and helpful as these tend to increase knowledge. I have utilized a lot of things after getting a good explanation of things from the training kits. However, as far as Microsoft Training Kit for 70-564 is concerned, there are not a lot of good reviews about it. What i have read and searched on the net , the reviews on amazon and various forums, stack-exchange and experts-exchange, were more inclined to the conclusion that "Microsoft Training Kit for Exam 70-564 is not good. Its is not good as compared to other kits from Microsoft, like as compared to the training kit of Exam 70-562 or others." So i was looking for a proper book containing examples from practical world scenarios and case studies from which i can not only learn but also master the skills before wasting money of Microsoft Training Kit for Exam 70-564. Waiting for experts to provide a suitable advice.

    Read the article

  • Does setting document.domain via script interfere with Google Analytics?

    - by Seth Petry-Johnson
    I have a site, www.example.com, that displays some secure content from forms.example.com in iframes. To enable cross-frame navigation, pages on both sites use JavaScript to set the document.domain to just "example.com". I am using Google Analytics on www.example.com, but the GA site is not showing any data. It indicates that the tracking code is found (the status icon is a green checkmark), but no data is reported. The GA profile lists the website as "www.example.com". Is this a supported scenario? Is my script interfering with the GA code in some way?

    Read the article

  • Hiding UITabBar when rotating device iPhone

    - by Tom G
    Has anyone successfully hidden a UITabbar when rotating the device? I have one view in the UItabbar controller that i rotate (So effectively one tab that rotates) When this happens i want the tab bar to disappear... but nothing seems to work! Either the tabbar still remains visible Or it disappears along with the view Or the tabbar disappears and the view no longer rotates! So if anyone has successfully accomplished this task any advice would be greatly appreciated! Thanks Tom

    Read the article

  • Axis2 and OpenSAML

    - by Tom Kiley
    I'm trying to add SAML assertions to a SOAP web service that is built on the axis2 engine. I'm having a little trouble wrapping my head around how the two would interact. Could someone help point me in the right direction to add a SAML assertion to a response message from Axis2? Thanks, Tom

    Read the article

  • Form generator and data capture PHP application

    - by Tom
    Hi, Does anyone know of a PHP open source which can generate forms to be deployed across your website. These forms will collect and aggregate the data with in on database. There should also be the functionality to search across the forms (to generate reports and newsletter mailing lists) All the services I have found so far have been hosted solutions. Thanks Tom

    Read the article

  • session_id() in PHP

    - by Tom
    Hi, I am just trying the session_id function in PHP and I thought that it was unique for each machine that used the website? However, my flatmate and I have the same session_id for on two separate machines. I'm just using session_id() to create the session - am I doing it correctly? Thanks Tom

    Read the article

  • Warning: mysql_real_escape_string()?

    - by Tom
    Hi, I am getting the error; Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Why do I get this error? The mysql_real_escape_string() works on all of my pages apart from one? Is it something to do with MySQL being on a different server to the PHP server - if so, how do I fix it? Thanks Tom

    Read the article

  • tinymce, view only

    - by tom smith
    Hi. Evaluating Tinymce. I've looked at the docs/source/api, and have a question that I thought I'd pose to the stackoverflow group. Has anyone implemented Tinymce, who can tell me it it's possible to setup Tinymce to restrict a user, allowing the user to only "view" a text file, and be able to add additional buttons to the save/cancel row of buttons.. I think it should be, and that I'm missing something subtle.. Thanks -Tom

    Read the article

  • How to implement mib module in net-snmp with python?

    - by Tom Carly
    Hi, in the faq, i read this "..the agent can also support MIB modules implemented in perl or (from 5.4) python." I have built net-snmp with python support, but it's not clear yet how to actually implement my own MIB module with python now. The python scripts i see in the python directory are related to implementing an snmp client, not an snmp agent. Probably i just miss the point somewhere. Can someone give me a hint on how to get started with this? Thanks, Tom

    Read the article

  • How to intercept and apply effects to Firefox audio/sound output

    - by Tom
    Hi I want to build a Firefox extension that will allow me to directly manipulate the audio output, applying live filters and effects, from (for example) a streaming video site. Im struggling to find any good resources to help me. I think the effects bit will be ok but I need to find a way of intercepting the audio stream output. Does anyone know if this is possible? Thanks, Tom

    Read the article

  • PHP detecting if flash is installed

    - by Tom
    Hi, is it possible to detect if flash is installed using PHP. My aim is, that if it is installed it will play a flv file, and if not it will use another player eg; quicktime? If it is possible how do I go about doing it? Thanks Tom

    Read the article

  • How to create the new QTextDocument from existing widgets???

    - by Tom
    Hi, I'm absolutely confused with how to create the customized QTextDocument. I have the widget QWidget, which consists of some QLabels, QTableWidgets and QWidgets and I want to print it . I decided to create the new QTextDocument and insert in it all the defined widgets. I have already tried QTextCursor-insertBlock and insertText but my problem is how to define QTextBlockFormat or QTextCharFormat and say it, what is its "content", how to insert the widget in it. Can anyone help please? tom

    Read the article

  • PHP: How to implement a __get-like method for local function variables

    - by Tom Frost
    I'm no stranger to __get(), and have used it to make some very convenient libraries in the past. However, I'm faced with a new challenge (PHP 5.3, abbreviated and simplified my code for this question): <?php namespace test; class View { function __construct($filename, $varArray) { $this->filename = $filename; $this->varArray = $varArray; } function display() { include($this->filename); } function __get($varName) { if (isset($this->varArray[$varName])) return $this->varArray[$varName]; return "?? $varname ??"; } } ?> Above is a very, very simplified system for loading a View. This code would call the view and display it: <?php require_once("View.php"); use test\View; $view = new View("views/myview.php", array("user" => "Tom")); $view->display(); ?> My goal for this code is to allow the view "myview.php" to contain code like this: <p> Hello <?php echo $user; ?>! Your E-mail is <?php echo $email; ?> </p> And, used with the above code, this would output "Hello Tom! Your E-mail is ?? email ??" However, this won't work. The view is being included within a class method, so when it refers to $user and $email, it's looking for local function variables -- not variables belonging to the View class. For this reason, __get never gets triggered. I could change all my view's variables to things like $this-user and $this-email, but that would be a messy and unintuitive solution. I'd love to find a way where I can reference variables directly WITHOUT having PHP throw an error when an undefined variable is used. Thoughts? Is there a clean way to do this, or am I forced to resort to hacky solutions?

    Read the article

  • ASP.NET 4.0 , SQL 2008 Web development and deployment Cloud or Shared Hosting?

    - by Tom
    Just to give you a fair idea, I am new to the web development / hosting world and planning to develop a Multilingual Social networking Web Applications in ASP.NET 4.0 , expected the content to deliver in many countries German, France, China, India and MiddleEast. My question is will Cloud Hosting provides a development environment? or should i buy software and develop in my system?. Which is the best hosting model for my scenario. I do know there will not be many users and expecting a steady growth. Tom

    Read the article

  • Facebook Graph API With iPhone SDK

    - by Tom G
    Hi, Has anyone been able to implement Facebooks Graph API in a native iPhone Application? The documentation is pretty sparse when it comes to iPhone integration, but the calls to get users information looks a lot more light weight than the previous method of using FBConnect. So i would like to use it. I have seen a few posts about but none explain you you would implement the login button as we did previously with FBConnect? If any one has achieved this or can offer me any pointers that would be brilliant Thanks Tom

    Read the article

  • Java NIO (Netty): Exceptionhandling in Downstream Hanlders/Chain

    - by Tom
    Hello Experts, could someone please explain to me, how in netty "Downstream Exceptions" are handeled? According to the javadoc there are no Downstream exceptions: http://docs.jboss.org/netty/3.1/api/org/jboss/netty/channel/ExceptionEvent.html Given the case that in one of my downstream handlers an exception occures OR in the I/0 Thread itself, where can these errors be catched and handeled? thank you very much tom

    Read the article

  • jq div display script webkit issues

    - by Tom
    $(document).ready(function() { $('#chekboxes a').click(function(e) { $('.visible').removeClass('visible').addClass('invisible'); var thediv = $(this).attr('href'); $(thediv).removeClass('invisible').addClass('visible'); }) }); This simple bit of jq works in FF and not in Chrome and Safari. Despite googling widely, I cannot tell whether there's a way to make it work in Safari and Chrome or not. Does anyone know a fix or what is wrong ? Thanks, Tom

    Read the article

  • Add 2 values to 1 key in a PHP array

    - by Mike Munroe
    I have a result set of data that I want to write to an array in php. Here is my sample data: **Name** **Abbrev** Mike M Tom T Jim J Using that data, I want to create an array in php that is of the following: 1|Mike|M 2|Tom|T 3|Jim|j I tried array_push($values, 'name', 'abbreviation') [pseudo code], which gave me the following: 1|Mike 2|M 3|Tom 4|T 5|Jim 6|J I need to do a look up against this array to get the same key value, if I look up "Mike" or "M". What is the best way to write my result set into an array as set above where name and abbreviation share the same key?

    Read the article

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