opengl

setting up GLEW widows?

I have visual studio 2010 and i want to set up glew.h on it. i do this step but still i have linker error: 1.download glew pack 2.copy .h files to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include 3.copy .lib files to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib 4.copy glew32.dll to C:\Windows\SysWOW64 5.and fina...

Ruby, OpenGL, and multiple windows?

Is there a sane way to create and destroy multiple OpenGL windows in ruby-opengl? I have code that is working wonderfully using GLUT, that comes with the ruby-opengl package, but it seems to suffer from the (well known?) problem of GLUT not allowing you to trap the window close events without major hacking of the library. Some googling...

GLSL shader loader problem

The problem is that my glsl loader does not work and i dont see what im doing wrong. void cShader::Load(const char *v_filename,const char *f_filename) { char *vs,*fs; vShaderList = glCreateShader(GL_VERTEX_SHADER); fShaderList = glCreateShader(GL_FRAGMENT_SHADER); std::ifstream v_fs; v_fs.open(v_filename,std::ios::binary); ...

OpenGL Texture Mapping Error

Here's a BIG problem with my project: I love the tutorials on the NeHe website, and Windows XP ran the programs perfectly. However, when I reformatted my computer, changed the OS to Windows Vista and reinstalled my Dev-C++ compiler, and then I tried to open any C++ program that used textures, the program crashed. I realised my glaux.h ...

OpenGL per pixel lighting in fixed function pipeline

Is it possible to enable per-pixel lighting (so that I can have nice specular highlights on low tessellated surfaces) in the OpenGL fixed function pipeline? ...

Creating and using my own mipmap of a texture atlas

I'm currently using the automatic mipmap generation (C# + OpenTK): GL.GenerateMipmap(GenerateMipmapTarget.Texture2D); The texture I'm using is tiled into blocks of 16px². So my questions would be: Is it possible to use a mipmap which doesn't get downsized to 1x1? What would be the best way to create a mipmap which doesn't "blur" the...

Effective way to calculate the up vector for gluLookAt which points up the y-axis the most?

Hello, I need to create an up vector for when the camera looks at any angle (except directly down or up because the up vector would be perpendicular to the y-axis). The up vector has to be perpendicular to the line of sight of-course. When the line of sight isn't along the y-axis, you can imagine a circle around the eye and the line of ...

CARenderer never produces output

Hi, I've been stuck for hours trying to render a Core Animation layer tree into an OpenGL context using CARenderer. The OpenGL context is currently provided by a NSOpenGLView subclass set up in Interface Builder, with settings on default. Here's how I set up the CALayers in my example: l1 = [[CALayer layer] retain]; // l1 is an...

opengl programming on MSVS C++ express 2010 on Windows 7

Hi, I have tried all the solutions floating around the net that i could find.. but still no sucess in compiling a simple nehe tutorial on Windows 7 with MSVS C++ 2010 express edition. If anyone can give me clues on how to proceed i would be thankful. Thanks. Edit:errors ------ Build started: Project: Polyons, Configuration: Debug Wi...

multi-sampling opengl?

I run sample of multi sampling but it work incorrect it seems that multi sampling don't applied because of sample buffers & samples is 0. what should i do to make it correct? thanks. this is my code: #include <stdio.h> #include <stdlib.h> #include <glew.h> #include <GL/glut.h> static int bgtoggle = 1; void init(void) { GLint buf, sbu...

Cross platform (Windows, OSX 10.6) OpenGL development in Scheme

Looking for a version of scheme that will allow me to develop OpenGL applications that run on Windows and Mac OSX. I have tried Spark-Scheme and can't get it to compile on my Mac using OSX 10.6, Chicken scheme gives gcc errors whilst trying to use chicken-install OpenGL. Has anyone had any success with cross platform OpenGL development...

Where points OpenGL z-axis?

I'm trying to understand OpenGL coordinate system. Everywhere I see it's described as right-handed one, but it doesn't correspond with my experience. I tried to draw some shapes and 3-d objects and I see that apparently z-axis points "into the screen" (while x points to right, and y up - which is description of left-handed coordinate sys...

Techniques for drawing coplanar polygons in OpenGL

I'm going to have meshes with several coplanar polygons, all lying in a certain plane, that I'm not going to be able to eliminate. These polygons have a specific draw order. Some polygons are behind other polygons. If I turn off depth testing I'll have the effect I want, but I want to be able to position this mesh in a 3D scene. I do...

Making Depth Buffer Read-Only

What is the usage of making the depth buffer read-only? I've read on redbook that it is the case where you need to draw opaque objects first then the transparent ones. I've tested that and also on two opaque objects over each other, the result is hard to explain and i've found nothing usefull about making it read-only. Can some one expla...

OpenGL don't show/draw on my C# pannel

Hi, I'm making a basic program in C# wich calls a C++ dll. I give the pannel's handle to the dll so OpenGL knows where to draw. [DllImport(@"../../../Debug/Model.DLL")] public static extern void startOpenGL(IntPtr hWindow); I mashall IntPtr hWindow to HWND hWindow. after I call draw from C# [DllImport(@"../../../Debug/M...

Switching OpenGL to perspective mode on top of a half rendered orthographic scene?

We have a mostly 2D game that runs in orthographic mode, but one part shows a 3d model that is rendered in between the other 2D objects. How can I switch to perspective mode, render that model, then switch back to render the other objects in orthographic mode? Kudos if you can show how it's done in OpenGL ES. ...

Hillegass: Cocoa Prog 3rd Ed: Ch. 33 on OpenGL: Where's the torus?

In the opengl section of Hillegass' otherwise fine book, we're given sample code for drawing a 3d object on a view. Two people at the book's discussion forum at http://techstra.bignerdranch.com/ have reported that the drawing code runs, but fails to draw the object. I'm getting the same result, and the only discussion I've found resolv...

rectangular texture in OpenGL with both width and height POT

I'm trying to use rectangular texture with OpenGL. When the height is equal to the width of the texture, everything looks fine, however, when the height is different than the width the texture looks distorted. My display function is (h and w are globals storing the height and the width of the image): Please note that the size of the dr...

OpenGL 4.x learning resources

I know there are some question about learning OpenGL. The difference is that I want to learn OpenGL 4.0 Core profile (no immediate functions). Preferably with good portion of SL knowledge. And I do not wont to start form previous OpenGLs. Nor I want to read NeHe. And I do have math and bit of 3d knowledge to understand OpenGL 4.0 I p...

Searching for a UI-Framework targeted at TV Displays / Infoscreen

Hi there. I am currently looking for technologies/frameworks that would be handy to realize infoscreens on higher resolution displays like a HDTV or some similar devices. I am quite skilled doing this on my own using OpenGL, but i just don't have the time to reinvent the wheel once again. Technologies that would more or less meet my ne...