Search Results

Search found 375 results on 15 pages for 'rohit jose'.

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

  • Is there anything wrong with my texture loading method ?

    - by José Joel.
    I'm a noob in openGL and trying to learn as much as possible. I'm using this method to load my openGL textures, loading every .png as RGBA4444. I'm doing anything incorrect ? - (void)loadTexture:(NSString*)nombre { CGImageRef textureImage =[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:nombre ofType:nil]].CGImage; if (textureImage == nil) { NSLog(@"Failed to load texture image"); return; } textureWidth = NextPowerOfTwo(CGImageGetWidth(textureImage)); textureHeight = NextPowerOfTwo(CGImageGetHeight(textureImage)); imageSizeX= CGImageGetWidth(textureImage); imageSizeY= CGImageGetHeight(textureImage); GLubyte *textureData = (GLubyte *)calloc(1,textureWidth * textureHeight * 4); // Por 4 pues cada pixel necesita 4 bytes, RGBA CGContextRef textureContext = CGBitmapContextCreate(textureData, textureWidth,textureHeight,8, textureWidth * 4,CGImageGetColorSpace(textureImage),kCGImageAlphaPremultipliedLast ); CGContextDrawImage(textureContext, CGRectMake(0.0, 0.0, (float)textureWidth, (float)textureHeight), textureImage); //Convert "RRRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA" to "RRRRGGGGBBBBAAAA" void *tempData = malloc(textureWidth * textureHeight * 2); unsigned int* inPixel32 = (unsigned int*)textureData; unsigned short* outPixel16 = (unsigned short*)tempData; for(int i = 0; i < textureWidth * textureHeight ; ++i, ++inPixel32) *outPixel16++ = ((((*inPixel32 >> 0) & 0xFF) >> 4) << 12) | // R ((((*inPixel32 >> 8) & 0xFF) >> 4) << 8) | // G ((((*inPixel32 >> 16) & 0xFF) >> 4) << 4) | // B ((((*inPixel32 >> 24) & 0xFF) >> 4) << 0); // A free(textureData); textureData = tempData; CGContextRelease(textureContext); glGenTextures(1, &textures[0]); glBindTexture(GL_TEXTURE_2D, textures[0]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, textureWidth, textureHeight, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4 , textureData); free(textureData); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } And this is my dealloc method: - (void)dealloc { glDeleteTextures(1,textures); [super dealloc]; }

    Read the article

  • Java me : Can we retrieve bluetooth address of connected device from an open slave connection ?

    - by Rohit
    Here is a typical sequence of events that occur : Host device opens a service ( Host device accepts and opens all incoming connections) A remote device connects to host device. Now, we have a slave connection open at host device. At host device, I want to know the bluetooth address of remote device. I can always pass it as data from remote to host device, but can I extract it from connection object somehow without any data transfer? Thanks in advance...

    Read the article

  • When to retain a "delegate"

    - by Jose
    I know that in Objective-C you should never retain your delegates because it may cause a retain-cycle, however, how do you know the difference between a delegate and a non-delegate object ? Can't it be said that just sending a message to any object is delegating work to that object ?

    Read the article

  • how to find last version no from a list<> in C#

    - by Rohit
    I have a entity class RenderingTemplates. Inside this i have a property List which holds all versions of rendering template. RenderingTemplateVersion has a property VersionName which stores version name as "Version 1.0". I am creating a new version and want to find last version no.so that i can append it by 1 and make new VersionName as "Version 2.0". To accomplish this i have LatestVersion = template.RenderingTemplateVersionList.OrderByDescending(e => e.VersionName.Split(new char[] { ' ', '.' })[1]).First() LatestVersion is a integer. How to convert this to integer.Please help or suggest some other way.

    Read the article

  • Why can't i access page viewstate in usercontrol?

    - by Rohit
    I stored a object in viewstate on Page. Now when i access the same viewsate object on usercontrol,it shows as null. I even tried creating the same viewstate with same name in usercontrol and page.Both holds different value. I understand that viewstate is a protected property. How does this thing implement in above scenerio or is there any other reason for this behaviour.

    Read the article

  • How to change enum definition without impacting clients using it in C#

    - by Rohit
    I have the following enum defined. I have used underscores as this enum is used in logging and i don't want to incur the overhead of reflection by using custom attribute.We use very heavy logging. Now requirement is to change "LoginFailed_InvalidAttempt1" to "LoginFailed Attempt1". If i change this enum, i will have to change its value across application. I can replace underscore by a space inside logging SP. Is there any way by which i can change this without affecting whole application.Please suggest. public enum ActionType { None, Created, Modified, Activated, Inactivated, Deleted, Login, Logout, ChangePassword, ResetPassword, InvalidPassword, LoginFailed_LockedAccount, LoginFailed_InActiveAccount, LoginFailed_ExpiredAccount, ForgotPassword, LoginFailed_LockedAccount_InvalidAttempts, LoginFailed_InvalidAttempt1, LoginFailed_InvalidAttempt2, LoginFailed_InvalidAttempt3, ForgotPassword_InvalidAttempt1, ForgotPassword_InvalidAttempt2, ForgotPassword_InvalidAttempt3, SessionTimeOut, ForgotPassword_LockedAccount, LockedAccount, ReLogin, ChangePassword_Due_To_Expiration, ChangePassword_AutoExpired }

    Read the article

  • push(ing)_back objects pointers within a loop

    - by Jose Manuel Albornoz
    Consider the following: I have a class CDevices containing, amongst others, a string member class CDevice { public: CDevice(void); ~CDevice(void); // device name std::string Device_Name; etc... } and somewhere else in my code I define another class that contains a vector of pointers to CDevices class CDevice; class CServers { public: CServers(void); ~CServers(void); // Devices vector vector<CDevice*> Devices; etc... } The problem appears in the following lines in my main.c pDevice = new CDevice; pDevice->Device_Name = "de"; Devices.push_back(pDevice); pDevice->Device_Name = " revolotiunibus"; Devices.push_back(pDevice); pDevice->Device_Name = " orbium"; Devices.push_back(pDevice); pDevice->Device_Name = " coelestium"; Devices.push_back(pDevice); for(int i = 0; i < (int)Devices.size(); ++i) cout << "\nLoad name = " << Devices.at(i)->Device_Name << endl; The output I get is " coelestium" repeated four times: each time I push_back a new element into the vector all of the already existing elements take the value of the one which has just been added. I have also tried using iterators to recover each element in the vector with the same results. Could someone please tell me what's wrong here? Thankx

    Read the article

  • chosen add multiple row dinamical

    - by Mario Jose Mixco
    I have a question with the plugin ajax-chosen, I need to add multiple dynamically on a form on page load the first no problem but when I try to dynamically add a new element does not work, I hope you can help me and again sorry for my English $ ("a.add-nested-field"). each (function (index, element) { return $ (element). on ("click", function () { var association, new_id, regexp, template; association = $ (element). attr ("data-association"); template = $ ("#" + association + "_fields_template"). html (); regexp = new RegExp ("new_" + association, "g"); new_id = new Date (). getTime (); $ (element). closest ("form"). FIND (". nested-field: visible: last"). after (template.replace (regexp, new_id)); return false; }); });

    Read the article

  • Limiting the number of queries returns in SQL Server 2008

    - by Jose Sotero Villegas III
    This is my query SELECT Fullname, rank, id_no, TIN, birthdate, hair, eyes, Blood, height, weight, marks, name, address FROM [******_DOMAIN\****_*****].*******view Problem is, source table has too many duplicates, how do I my limit query to the latest row on the database? I'm using SQL Server 2008. Thanks In advance My next problem is that the view shows me a birthdate string format of yyyymmdd, I need to change it to mm/dd/yyyy can please provide me a function? using the same string above?

    Read the article

  • ANY material writen in/for DELPHI around the graphics topic?

    - by José Eduardo
    Does anyone knows ANY material writen in/for DELPHI around the graphics topic? Planning to build a software for medical imaging processing . Thinking in 3D UI to absorve the power of nvidias GTX graphics card, and some real-time 2D processing integrated with high-end scanners. Please dont take this as a "rant" but, we have zillions of C++ books writen about that kind of topic and nothing for pascal/delphi. If you have some experience could you comment about that? Is it better to learn c++, to have access to that material? Can i go with delphi? I have experience with delphi, but none with graphics... And i have a deadline... Thanks.

    Read the article

  • summer training

    - by rohit-garg
    hi i wanna make a retail store software for my family retail store .... can anyone help me out with which language to use and just give me some basic ideas I'm an engineering student and have good knowledge of ASP, HTML, CSS, VBSCRIPT and have gone through java , c ,c++. please help me anyone

    Read the article

  • How to create string "Version 1.0" in C#

    - by Rohit
    I have to store versionName of a template. VersionName is autoincremented.If last versionName is "Version 1.0", next should be "version 2.0". First time when a template is created, I have to store "Version 1.0". I am using VersionName = "Version "+((LatestVersion+1).ToString()) LatestVersion holds the last version which is 0 in case added for first time. This seems to be a ugly workaround and doesnot even yield Version 1.0. it yields Version 1. I Tried with Version class as well,it does not work. How to accomplish this.Please suggest

    Read the article

  • Can anyone provide Java program for btree or b+tree???

    - by rohit
    Hi, I am doing a project in which i require btree or b+tree data structure. but its not an important part of project. it would take my time to write a code for it. I googled it but didn't get anything.... So, can anyone provide java code for btree or b+tree implementation (with insert, delete, search algorithms)?????? it should accept string as input and form btree or b+tree of these string.

    Read the article

  • File paths on Silverlight applications

    - by jose
    I have two silverlight applications. One produces XML files (models) that are used for the other to read. The XML files are uploaded to a specific (abosulte for now) folder. So, I need a solution to grant access by these two applications, a Models folder. Right now I'm using absolute paths and developing in ASP.NET Dev server. What would be the best way to accomplish this, thinking on IIS approach? Regards,

    Read the article

  • What are the core mathematical concepts a good developer should know?

    - by Jose B.
    Since Graduating from a very small school in 2006 with a badly shaped & outdated program (I'm a foreigner & didn't know any better school at the time) I've come to realize that I missed a lot of basic concepts from a mathematical & software perspective that are mostly the foundations of other higher concepts. I.e. I tried to listen/watch the open courseware from MIT on Introduction to Algorithms but quickly realized I was missing several mathematical concepts to better understand the course. So what are the core mathematical concepts a good software engineer should know? And what are the possible books/sites you will recommend me?

    Read the article

  • How to hide canvas content from parent rounded corners in any webkit for Mac?

    - by Jose Rui Santos
    I have a parent div with rounded corners that contains a canvas: <div id="box"> <canvas width="300px" height="300px"></canvas> </div>? #box { width: 150px; height: 150px; background-color: blue; border-radius: 50px; overflow: hidden; }? The canvas renders a red rectangle that overflows the parent. As expected, this is what I get in all browsers: The problem: However, for webkit browsers running in Mac OS lion (I tested Safari 5.1.5 and Chrome 19), the canvas is still visible in the round corners: Interestingly, this problem seems to happen only when the inner element is a canvas. For any other child element, the content is correctly hidden. One workaround would be to apply the same rounded corners to the canvas itself, but unfortunately this is not possible, since I need to animate the canvas relative position. Another workaround that should work, is to redraw the canvas in a clipped region that resembles the rounded corners shape, but I would prefer a cleaner CSS3 solution. So, does one know how to fix this for Safari and Chrome on Mac? EDIT: Problem also happens in Chrome on Win7 jsFiddle here

    Read the article

  • Remove duplicates in a String [] list f#

    - by Jose Maria de la Torre
    I need some noob help... I have a String[] list (a list that each element is a Array of strings) I wish to remove all duplicates in the list. But to see if they are duplicates I need to see the fist element in the array. what I have tried is let NotDuplicated = Duplicated.[0] |> Seq.distinct let NotDuplicated = Duplicated |> Seq.distinctBy id but nothing is working... can you guys please help me.. thanks!!

    Read the article

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