Search Results

Search found 120 results on 5 pages for 'cg'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Shader optimization - cg/hlsl pseudo and via multiplication

    - by teodron
    Since HLSL/Cg do not allow texture fetching inside conditional blocks, I am first checking a variable and performing some computations, afterwards setting a float flag to 0.0 or 1.0, depending on the computations. I'd like to trigger a texture fetch only if the flag is 1.0 or not null, for that matter of fact. I kind of hoped this would do the trick: float4 TU0_atlas_colour = pseudoBool * tex2Dlod(TU0_texture, float4(tileCoord, 0, mipLevel)); That is, if pseudoBool is 0, will the texture fetch function still be called and produce overhead? I was hoping to prevent it from getting executed via this trick that usually works in plain C/C++.

    Read the article

  • Doubt about texture waves in CG Ocean Shader

    - by Alexandre
    I'm new on graphical programming, and I'm having some trouble understanding the Ocean Shader described on "Effective Water Simulation from Physical Models" from GPU Gems. The source code associated to this article is here. My problem has been to understand the concept of texture waves. First of all, what is achieved by texture waves? I'm having a hard time trying to figure out it's usefulness. In the section 1.2.4 of the article, it does say that the waves summed into the texture have the same parametrization as the waves used for vertex positioning. Does it mean that I can't use the texture provided by the source code if I change the parameters of the waves, or add more waves to sum? And in the section 1.4.1, is said that we can assume that there is no rotation between texture space and world space if the texture coordinates for our normal map are implicit. What does mean that the "normal map are implicit'? And why do I need a rotation between texture and world spaces if the normal map are not implicit? I would be very grateful for any help on this.

    Read the article

  • Differences in cg shader code for OpenGL vs. for DirectX?

    - by Cray
    I have been trying to use an existing library that automatically generates shaders (Hydrax plugin for Ogre3D). These shaders are used to render water and somewhat involved, but are not extremely complicated. However there seems to be some differences in how the cg shaders are handled by OpenGL and DirectX, more specifically, I am pretty sure that the author of the library only has debugged all the shaders for DirectX, and they work flawlessly there, but not so in OpenGL. There are no compiler errors, but the result just doesn't look the same. (And I have to run the library in OpenGL.) Isn't cg supposed to be a language that can freely use the exact same code for both platforms? Are there any specific known caveats one should know about when using the same code for them? Are there any fast ways to find what parts of the code work differently? (I am pretty sure that the shaders are the problem. Otherwise Ogre3D has great support for both problems, and everything is abstracted away nicely. Other shaders work in OpenGL, etc...)

    Read the article

  • SQL query performance optimization (TimesTen)

    - by Sergey Mikhanov
    Hi community, I need some help with TimesTen DB query optimization. I made some measures with Java profiler and found the code section that takes most of the time (this code section executes the SQL query). What is strange that this query becomes expensive only for some specific input data. Here’s the example. We have two tables that we are querying, one represents the objects we want to fetch (T_PROFILEGROUP), another represents the many-to-many link from some other table (T_PROFILECONTEXT_PROFILEGROUPS). We are not querying linked table. These are the queries that I executed with DB profiler running (they are the same except for the ID): Command> select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; < 1169655247309537280 > < 1169655249792565248 > < 1464837997699399681 > 3 rows found. Command> select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1466585677823868928; < 1169655247309537280 > 1 row found. This is what I have in the profiler: 12:14:31.147 1 SQL 2L 6C 10825P Preparing: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272 12:14:31.147 2 SQL 4L 6C 10825P sbSqlCmdCompile ()(E): (Found already compiled version: refCount:01, bucket:47) cmdType:100, cmdNum:1146695. 12:14:31.147 3 SQL 4L 6C 10825P Opening: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; 12:14:31.147 4 SQL 4L 6C 10825P Fetching: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; 12:14:31.148 5 SQL 4L 6C 10825P Fetching: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; 12:14:31.148 6 SQL 4L 6C 10825P Fetching: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; 12:14:31.228 7 SQL 4L 6C 10825P Fetching: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; 12:14:31.228 8 SQL 4L 6C 10825P Closing: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1464837998949302272; 12:14:35.243 9 SQL 2L 6C 10825P Preparing: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1466585677823868928 12:14:35.243 10 SQL 4L 6C 10825P sbSqlCmdCompile ()(E): (Found already compiled version: refCount:01, bucket:44) cmdType:100, cmdNum:1146697. 12:14:35.243 11 SQL 4L 6C 10825P Opening: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1466585677823868928; 12:14:35.243 12 SQL 4L 6C 10825P Fetching: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1466585677823868928; 12:14:35.243 13 SQL 4L 6C 10825P Fetching: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1466585677823868928; 12:14:35.243 14 SQL 4L 6C 10825P Closing: select G.M_ID from T_PROFILECONTEXT_PROFILEGROUPS CG, T_PROFILEGROUP G where CG.M_ID_EID = G.M_ID and CG.M_ID_OID = 1466585677823868928; It’s clear that the first query took almost 100ms, while the second was executed instantly. It’s not about queries precompilation (the first one is precompiled too, as same queries happened earlier). We have DB indices for all columns used here: T_PROFILEGROUP.M_ID, T_PROFILECONTEXT_PROFILEGROUPS.M_ID_OID and T_PROFILECONTEXT_PROFILEGROUPS.M_ID_EID. My questions are: Why querying the same set of tables yields such a different performance for different parameters? Which indices are involved here? Is there any way to improve this simple query and/or the DB to make it faster? UPDATE: to give the feeling of size: Command> select count(*) from T_PROFILEGROUP; < 183840 > 1 row found. Command> select count(*) from T_PROFILECONTEXT_PROFILEGROUPS; < 2279104 > 1 row found.

    Read the article

  • New to CG shader programming, what program should I use to write and test them?

    - by Notbad
    I have started witting some shaders. First ones were fairly easy to write in notepad but now I need something with a bit more meat. I have checked rendermonnkey that seems to support CG but it is really old and don't know if it is a good option. On the other hand there exist this FX Composer 2.0 but it seems somthing that could really distract me from learning shaders because it seems a pretty deep program. Are there any other possibilities? There's a really nice alternative to write shaders named ShaderToy but just supports GLSL. Any information will be really welcomed. Thanks in advance.

    Read the article

  • Wesquare (NL) helps major CG customer integrating Oracle Service Cloud (RightNow) with JDEdwards

    - by Richard Lefebvre
    Normal 0 false false false EN-US X-NONE X-NONE When this well known, Italy based, CG player claimed that they needed a new CRM tool, Oracle partner WeSquare had a precise idea of what would be required, knowing that the customer was using JDEdwards as an ERP: they immediately thoughts about a solution that would help synchronizing the customer’s back-end system with the new CRM interface. The customer asked for presentations from three companies, including Oracle, and eventually selected Oracle Service Cloud (RightNow) with Alfa Sistemi (Oracle Platinum Partner) as a System Integrator supported by Wesquare (Oracle Gold partner specialized in RightNow). Synchronizing an On Premises ERP with a new SaaS based CRM platform could be seen as an uphill task, but WeSquare was determined, during the presales cycle, to prove that they had the skills and the attitude to make the difference. So, they rolled up their sleeves and got to it: five days of relentless work, missed lunches, and hours of brainstorming showed its result in the form of a new interface that works fabulously well with the JDEdwards ERP back-end and was successfully pitched by Oracle to the end-customer to win the deal! WeSquare took the occasion to learn that they can integrate Oracle Service Cloud (RightNow) with practically every other solution that a customer may run. As part of the project, WeSquare was also involved in different add-on’s development with the aim of enriching Oracle Service Cloud’s functionality. WeSquare is based in The Netherlands with an in-shore practice supported by off-shore teams in India. WeSquare can integrate and synchronize any application with RightNow. For more information, visit www.wesquare.nl or contact Wiebe Blankenberg (Managing Director) at +31 (0) 6 3632 1104 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

  • Attend This Webcast To Learn How CG Manufacturers Are Stepping Up Their Efforts to Sell to Consumers

    - by Michael Hylton
    Going Direct to Consumer is top of mind with executives in the Consumer Goods (CG) industry today. But are companies ready to engage? Recently, the Economist Intelligence Unit (EIU) conducted research sponsored by Oracle to better understand how Consumer Goods companies are engaging directly with consumers today and in the future. The survey involved CG executives across the globe as well as in-depth interviews with corporate leaders in the industry to explore their direct-to-consumer initiatives. Some key findings include: Pushing traditional media through new media channels is not enough to reach today's more plugged in, product-savvy consumer  CG companies are experimenting with new ways to establish and enhance direct, two-way relationships with their target consumers across multiple channels to enhance brand loyalty and drive product sales Survey respondents and other CG executives see their nascent e-commerce efforts as complimentary to, not competing with, existing retail channels. This webinar will review the results of the research and panelists will discuss what CG companies worldwide are thinking as they deploy their direct-to-consumer strategies in an effort to engage directly with today's empowered consumer.

    Read the article

  • Attend This Webcast To Learn How CG Manufacturers Are Stepping Up Their Efforts to Sell to Consumers

    - by Michael Hylton
    Going Direct to Consumer is top of mind with executives in the Consumer Goods (CG) industry today. But are companies ready to engage? Recently, the Economist Intelligence Unit (EIU) conducted research sponsored by Oracle to better understand how Consumer Goods companies are engaging directly with consumers today and in the future. The survey involved CG executives across the globe as well as in-depth interviews with corporate leaders in the industry to explore their direct-to-consumer initiatives. Some key findings include: Pushing traditional media through new media channels is not enough to reach today's more plugged in, product-savvy consumer CG companies are experimenting with new ways to establish and enhance direct, two-way relationships with their target consumers across multiple channels to enhance brand loyalty and drive product sales Survey respondents and other CG executives see their nascent e-commerce efforts as complimentary to, not competing with, existing retail channels. This webinar will review the results of the research and panelists will discuss what CG companies worldwide are thinking as they deploy their direct-to-consumer strategies in an effort to engage directly with today's empowered consumer.

    Read the article

  • How to run Cg vertex/fragment shader on CPU?

    - by Andy
    Hi all, I'm playing about with some vertex and fragment shaders using Cg on my little netbook (running Linux). Clearly I'm going to frequently hit resource limits for my graphics controller, so was wondering if there's a nice way to run the shaders on the CPU, just to test them. Something like D3D's refrast... TIA Andy

    Read the article

  • Custom shadow mapping in Unity 3D Free Edition

    - by nosferat
    Since real time hard and soft shadows are Unity 3D Pro only features I thought I will learn Cg programming and create my own shadow mapping shader. But after some digging I found that the shadow mapping technique uses depth textures, and in Unity depth values can be accessed through a Render Texture object, which is Unity Pro only again. So is it true, that I cannot create real time shadow shaders as a workaround to the limitations of the free version?

    Read the article

  • Unity custom shaders and z-fighting

    - by Heisenbug
    I've just readed a chapter of Unity iOS Essential by Robert Wiebe. It shows a solution for handling z-figthing problem occuring while rendering a street on a plane with the same y offset. Basically it modified Normal-Diffuse shader provided by Unity, specifing the (texture?) offset in -1, -1. Here's basically what the shader looks like: Shader "Custom/ModifiedNormalDiffuse" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Offset -1,-1 //THIS IS THE ADDED LINE Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Lambert sampler2D _MainTex; fixed4 _Color; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { half4 c = tex2D (_MainTex, IN.uv_MainTex) *_Color; o.Albedo = c.rgb; o.Alpha = c.a; } ENDCG } FallBack "Diffuse" } Ok. That's simple and it works. The author says about it: ...we could use a copy of the shader that draw the road at an Offset of -1, -1 so that whenever the two textures are drawn, the road is always drawn last. I don't know CG nor GLSL, but I've a little bit of experience with HLSL. Anyway I can't figure out what exactly is going on. Could anyone explain me what exactly Offset directly does, and how is solves z-fighting problems?

    Read the article

  • CG miner "configure: error: No mining configured in "

    - by Jorma
    Nvidia Gt 630 cuda 5.5 running CGminer not. Cuda examples fine. Should CGminer work or is there limitations to it? sudo ./autogen.sh --disable-cpumining --enable-opencl && make Configuration Options Summary: libcurl(GBT+getwork).: Enabled: -lcurl curses.TUI...........: FOUND: -lncurses Avalon.ASICs.........: Disabled BlackArrow.ASICs.....: Disabled BFL.ASICs............: Disabled BitForce.FPGAs.......: Disabled BitFury.ASICs........: Disabled Hashfast.ASICs.......: Disabled Icarus.ASICs/FPGAs...: Disabled Klondike.ASICs.......: Disabled KnC.ASICs............: Disabled ModMiner.FPGAs.......: Disabled configure: error: No mining configured in

    Read the article

  • shader coding: calculate screen coordinates of fragment

    - by Jay
    Good morning, I'm new to shader coding and trying to implement some visual effects code in shaders using billboards. (Yes, I couldn't have picked anything harder to start with, but I'm lucky that way) Setup: I have rendered the full screen z depth to an array of floats in a previous pass. In the fragment shader I need the scene depth where the rendered fragment is displayed (to see if it's occluded). I can use tex2d() to get the depth value if I have the screen coordinates of the point being rendered in the fragment shader. Question: In the fragment shader how do you calculate the screen coordinates of the pixel (in the range 0-1.0)? Is the position passed to the fragment shader a pixel offset? If so, I guess it would be: float2( position.x / screen-width, position.y / screen-height ) Thanks for any help/

    Read the article

  • How to move a directional light according to the camera movement?

    - by Andrea Benedetti
    Given a light direction, how can I move it according to the camera movement, in a shader? Think that an artist has setup a scene (e.g., in 3DSMax) with a mesh in center of that and a directional light with a position and a target. From this position and target I've calculated the light direction. Now I want to use the same direction in my lighting equation but, obviously, I want that this light moves correctly with the camera. Thanks.

    Read the article

  • Calculating distance from viewer to object in a shader

    - by Jay
    Good morning, I'm working through creating the spherical billboards technique outlined in this paper. I'm trying to create a shader that calculates the distance from the camera to all objects in the scene and stores the results in a texture. I keep getting either a completely black or white texture. Here are my questions: I assume the position that's automatically sent to the vertex shader from ogre is in object space? The gpu interpolates the output position from the vertex shader when it sends it to the fragment shader. Does it do the same for my depth calculation or do I need to move that calculation to the fragment shader? Is there a way to debug shaders? I have no errors but I'm not sure I'm getting my parameters passed into the shaders correctly. Here's my shader code: void DepthVertexShader( float4 position : POSITION, uniform float4x4 worldViewProjMatrix, uniform float3 eyePosition, out float4 outPosition : POSITION, out float Depth ) { // position is in object space // outPosition is in camera space outPosition = mul( worldViewProjMatrix, position ); // calculate distance from camera to vertex Depth = length( eyePosition - position ); } void DepthFragmentShader( float Depth : TEXCOORD0, uniform float fNear, uniform float fFar, out float4 outColor : COLOR ) { // clamp output using clip planes float fColor = 1.0 - smoothstep( fNear, fFar, Depth ); outColor = float4( fColor, fColor, fColor, 1.0 ); } fNear is the near clip plane for the scene fFar is the far clip plane for the scene

    Read the article

  • Using DevIL with Xcode

    - by jak3t
    Hello everyone! I'm trying to use DevIL with XCode but I can't get it to work. I tried using the "standard" method by doing "configure make make install" and using #import <IL/il> but it doesn't work. It identifies the library but I still get some compiling errors: Ld build/Release/cg.app/Contents/MacOS/cg normal i386 cd "/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1" /Developer/usr/bin/g++-4.2 -arch i386 "-L/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/Release" "-F/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/Release" -filelist "/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/CGaula1.build/Release/cg.build/Objects-normal/i386/cg.LinkFileList" -framework Foundation -framework AppKit -framework GLUT -framework OpenGL -framework Cocoa -framework AppKit -o "/Users/simaorfreitas/Documents/LESI/3º ano/CG/CGaula1/build/Release/cg.app/Contents/MacOS/cg" Undefined symbols: "_ilConvertImage", referenced from: terreno() in main.o "_ilGetInteger", referenced from: terreno() in main.o terreno() in main.o terreno() in main.o "_ilLoadImage", referenced from: terreno() in main.o "_ilBindImage", referenced from: terreno() in main.o "_ilGetData", referenced from: terreno() in main.o "_ilInit", referenced from: terreno() in main.o "_ilGenImages", referenced from: terreno() in main.o ld: symbol(s) not found collect2: ld returned 1 exit status` So i tried do it by using the macports libdevil install. It installed correctly but nothing seems to work. Do I need to change my #import declarations? Any suggestion to install DevIL on the Mac correctly and use it in a XCode Project? Thanks a lot!

    Read the article

  • Going Direct to Consumer in Consumer Goods – Live Webcast April 12

    - by Michael Seback
    Going Direct to Consumer is top of mind with executives in the Consumer Goods (CG) industry today.   Join our live webcast on Thursday, April 12 to learn what CG companies worldwide are thinking as they deploy their direct-to-consumer strategies in an effort to better engage with today’s empowered consumer. Hear Jon Copestake, Chief Consumer Goods Analyst of the Economist Intelligence Unit and Oracle to discuss the findings and industry trends. Some key findings include: Pushing traditional media through new media channels is not enough to reach today’s more plugged in, product-savvy consumer CG companies are experimenting with new ways to establish and enhance direct, two-way relationships with their target consumers across multiple channels Survey respondents and other CG executives see their nascent e-commerce efforts as complimentary to, not competing with, existing retail channels. Register to attend on April 12, 8:00 a.m. PT / 11:00 p.m. ET  

    Read the article

  • How do I set the current point in a CG graphics context?

    - by Joe
    When running the code below in the iphone simulator I get the error : CGContextClosePath: no current point. Why is the current point not being set? Or is the context not set to the correct state? CGContextBeginPath(ctx); CGMutablePathRef pathHolder; pathHolder = CGPathCreateMutable(); //move to point for the initial point NSLog(@"Drawing a state point %f, %f", [[holder.points objectAtIndex:0] floatValue], [[holder.points objectAtIndex:1] floatValue]); CGPathMoveToPoint(pathHolder, NULL, [[holder.points objectAtIndex:0] floatValue], [[holder.points objectAtIndex:1] floatValue]); for(int x = 2; x < [holder.points count] - 1; x += 2) { NSLog(@"Drawing a state point %f, %f", [[holder.points objectAtIndex:x] floatValue], [[holder.points objectAtIndex:(x+1)] floatValue]); CGPathAddLineToPoint(pathHolder, NULL, [[holder.points objectAtIndex:x] floatValue], [[holder.points objectAtIndex:(x+1)] floatValue]); } CGContextClosePath(ctx); CGContextFillPath(ctx);

    Read the article

  • Avoiding stack overflows in wrapper DLLs

    - by peachykeen
    I have a program to which I'm adding fullscreen post-processing effects. I do not have the source for the program (it's proprietary, although a developer did send me a copy of the debug symbols, .map format). I have the code for the effects written and working, no problems. My issue now is linking the two. I've tried two methods so far: Use Detours to modify the original program's import table. This works great and is guaranteed to be stable, but the user's I've talked to aren't comfortable with it, it requires installation (beyond extracting an archive), and there's some question if patching the program with Detours is valid under the terms of the EULA. So, that option is out. The other option is the traditional DLL-replacement. I've wrapped OpenGL (opengl32.dll), and I need the program to load my DLL instead of the system copy (just drop it in the program folder with the right name, that's easy). I then need my DLL to load the Cg framework and runtime (which relies on OpenGL) and a few other things. When Cg loads, it calls some of my functions, which call Cg functions, and I tend to get stack overflows and infinite loops. I need to be able to either include the Cg DLLs in a subdirectory and still use their functions (not sure if it's possible to have my DLLs import table point to a DLL in a subdirectory) or I need to dynamically link them (which I'd rather not do, just to simplify the build process), something to force them to refer to the system's file (not my custom replacement). The entire chain is: Program loads DLL A (named opengl32.dll). DLL A loads Cg.dll and dynamically links (GetProcAddress) to sysdir/opengl32.dll. I now need Cg.dll to also refer to sysdir/opengl32.dll, not DLL A. How would this be done? Edit: How would this be done easily without using GetProcAddress? If nothing else works, I'm willing to fall back to that, but I'd rather not if at all possible. Edit2: I just stumbled across the function SetDllDirectory in the MSDN docs (on a totally unrelated search). At first glance, that looks like what I need. Is that right, or am I misjudging? (off to test it now) Edit3: I've solved this problem by doing thing a bit differently. Instead of dropping an OpenGL32.dll, I've renamed my DLL to DInput.dll. Not only does it have the advantage of having to export one function instead of well over 120 (for the program, Cg, and GLEW), I don't have to worry about functions running back in (I can link to OpenGL as usual). To get into the calls I need to intercept, I'm using Detours. All in all, it works much better. This question, though, is still an interesting problem (and hopefully will be useful for anyone else trying to do crazy things in the future). Both the answers are good, so I'm not sure yet which to pick...

    Read the article

  • Select back things that _don't_ exist

    - by bobobobo
    I have this table. I want to select back the items that don't exist already, so I can create them. table tags +---------+-------+ | tagId | name | | 1 | C | | 2 | DX | | 3 | CG | Say SQL looks like: select name from tags where name in ( 'C', 'CG', 'RX' ) You get back 'C' and 'CG', so you know you have to create 'RX'. Is there a way to get a MySQL statement like this to return 'RX' instead, when 'RX' doesn't already exist?

    Read the article

  • SQL Server query problem

    - by user335160
    I want to achieved the results shown in the attached image. The Table Structure and Data are the ffg below: Table Relationship Overall IB Limit->one to many-> Facility Limit Facility Limit->one to many-> Facility Sub Limit Tables Structure and Data Overall IB Limit Id SCAF Reference Approval Date 1 NEW-001 January 1, 2011 2 NEW-002 January 2, 2011 3 NEW-003 January 3, 2011 ---------------------------- Facility Limit Id OverallIBLimitId Product Type 1 1 RPA 2 1 CG 3 2 RPA 4 3 CG ---------------------------- Facility Sub Limit Id FacilityLimitId Sub-Limit Type Amount Tenor Status Status Date 1 1 RPA at max 2,000,0000.00 2 months Approved January 5, 2011 2 1 Oil 3,000,0000.00 3 yrs Approved January 5, 2011 3 2 CG at minor 4,000,0000.00 1 yr Approved January 5, 2011 4 2 CG at max 5,000,0000.00 6 months Approved January 5, 2011 5 2 Flood Component 1 5,000,0000.00 6 months Approved January 5, 2011 6 2 Flood Component 2 6,000,0000.00 3 yrs Approved January 5, 2011 7 3 RPA at minor 1,000,0000.00 6 months Approved January 5, 2011 8 4 One-Off 1,000,0000.00 6 months Approved January 5, 2011

    Read the article

  • SQL Server: Cross-tabulation, please help

    - by user335160
    I want to achieve the results shown in the attached image. The table structure and data are: Table relationship: Facility Limit -> one to many -> Facility Sub Limit Tables structure and data Facility Limit Id OverallIBLimitId Product Type 1 1 RPA 2 1 CG 3 2 RPA 4 3 CG Facility Sub Limit Id FacilityLimitId Sub-Limit Type Amount Tenor Status Status Date 1 1 RPA at max 2,000,0000.00 2 months Approved January 5, 2011 2 1 Oil 3,000,0000.00 3 yrs Approved January 5, 2011 3 2 CG at minor 4,000,0000.00 1 yr Approved January 5, 2011 4 2 CG at max 5,000,0000.00 6 months Approved January 5, 2011 5 2 Flood Component 1 5,000,0000.00 6 months Approved January 5, 2011 6 2 Flood Component 2 6,000,0000.00 3 yrs Approved January 5, 2011 7 3 RPA at minor 1,000,0000.00 6 months Approved January 5, 2011 8 4 One-Off 1,000,0000.00 6 months Approved January 5, 2011

    Read the article

  • Errors with Using Webcam

    - by C.G.
    I have been having some issues accessing a webcam from my machine. Sometimes (not always) when I run a program that accesses the device (cheese, guvcview, and code using openCV), I get either of two messages, which lead to the program crashing. The first occurs after running the webcam for some time. libv4l2: error dequeuing buf: No such device VIDIOC_DQBUF: No such device The other will occur without even letting me have a chance to run the webcam. libv4l2: error turning on stream: No space left on device VIDIOC_STREAMON - Unable to start capture: No space left on device Occasionally after getting these errors I will also receive a message saying that no such device can be found for subsequent runs. Other than the times that the "No device found" message appears the webcam appears when I use lsusb. My machine runs Linux Fedora 16, and the webcam is a Logitech C920. I do have ffmpeg installed, and I have been able to run the web camera many times in the past without errors. What is particularly puzzling about these errors is that they just sprung up this past weekend. No new software or hardware has been installed on this machine recently; I haven't changed any settings recently either. It could possibly be a driver issue, but I don't know what could have changed which could lead to this issue. Any attempts at researching this problem has been fruitless as this seems to most commonly occur with multiple webcams. I am only working with one device. I'd appreciate any advice for this problem, as this has become a bit frustrating.

    Read the article

  • How to configure multiple addresses on a single interface using Fedora 16

    - by cg.
    I upgraded from Fedora 14 to 16, recently. I had two static IP v4 addresses configured on my ethernet interface by creating two files in /etc/sysconfig/network-scripts: ifcfg-eth0 -> first address ifcfg-eth0:1 -> second address After the upgrade, this resulted in an error message during the boot process and in only the second address being successfully configured on the interface. So, what is the correct way to configure multiple addresses on a single interface on Fedora 16? I could not find anything on this subject in the documentation so far.

    Read the article

  • Poor execution plans when using a filter and CONTAINSTABLE in a query

    - by Paul McLoughlin
    We have an interesting problem that I was hoping someone could help to shed some light on. At a high level the problem is as below: The following query executes quickly (1 second): SELECT SA.* FROM cg.SEARCHSERVER_ACTYS AS SA JOIN CONTAINSTABLE(CG.SEARCHSERVER_ACTYS, NOTE, 'reports') AS T1 ON T1.[Key]=SA.UNIQUE_ID but if we add a filter to the query, then it takes approximately 2 minutes to return: SELECT SA.* FROM cg.SEARCHSERVER_ACTYS AS SA JOIN CONTAINSTABLE(CG.SEARCHSERVER_ACTYS, NOTE, 'reports') AS T1 ON T1.[Key]=SA.UNIQUE_ID WHERE SA.CHG_DATE'19 Feb 2010' Looking at the execution plan for the two queries, I can see that in the second case there are two places where there are huge differences between the actual and estimated number of rows, these being: 1) For the FulltextMatch table valued function where the estimate is approx 22,000 rows and the actual is 29 million rows (which are then filtered down to 1670 rows before the join) and 2) For the index seek on the full text index, where the estimate is 1 row and the actual is 13,000 rows As a result of the estimates, the optimiser is choosing to use a nested loops join (since it assumes a small number of rows) hence the plan is inefficient. We can work around the problem by either (a) parameterising the query and adding an OPTION (OPTIMIZE FOR UNKNOWN) to the query or (b) by forcing a HASH JOIN to be used. In both of these cases the query returns in sub 1 second and the estimates appear reasonable. My question really is 'why are the estimates being used in the poorly performing case so wildly inaccurate and what can be done to improve them'? Statistics are up to date on the indexes on the indexed view being used here. Any help greatly appreciated.

    Read the article

1 2 3 4 5  | Next Page >