Hello,
I'm wondering if someone could offer me some tips on how to go about this. I have a MacOS X OpenGL game that is written in very portable C with the exception of the non-game-play GUI. So in Cocoa I set up the window and OpenGL context, manage preferences, registration, listen for keystrokes etc. But all of the drawing and proce...
Without glFog, my transparent png displays fine, but with it you can see the rectanglular background and strips of other colours (notice the other dirt material is working as intended, but not using a png or transparency).
Here's my code for the fog:
GLfloat colour[4]={0.8f,0.8f,1.0f, 1.0f};
glFogi(GL_FOG_MODE, GL_EXP);
glFogfv(GL_FO...
Hi,
I am currently simply trying to build a simple screen saver in xcode 3.2 on osx 10.6.3 using an openGL view as described in this article: http://cocoadevcentral.com/articles/000089.php anyways even if I use the exact same code from the example all I see when testing the screen saver is a black screen. I looked in OSX Console if it t...
I was following this tutorial using Apple's OpenGL Shader Builder (tool similar to Nvidia's fx composer, but simpler).
I could easily apply the filters, but I don't understand if they worked correct (and if so how can I improve the output). For example the blur filter: OpenGL itself does some image processing on the textures, so if they...
Guys, I'm trying to finish up my homework but I'm having some problems here on these models on openGL... any Idea why is my draw not happening? One thing that strange is that if I change to gluPerspective it works..
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
static int shoulder = 0;
static int elbow = 0;
void init(voi...
Hi, so I have a function that handles key presses in a game I'm working on in OpenGL. But, the thing is that even though I have made two squares and they both move when the correct key is pressed only one square is moved. Is there a way I can make the two squares move. This is the glutKeyboardFunc function I implimented:
void handle...
hi folks
do any one knows a project of csgl C# opengl picking example by mouse .
the thing is i want to put few 3d models in the scene and pick them by mouse .
than you already for your answer
...
Hello everyone,
I'm trying to draw objects using Bezier surfaces with openGL's evaluators. I am struggling with defining the control points for my objects. Can anyone please suggest ways to get the control points for an object? Is there some program that I can use to design my object then import the control points into a file that I can...
So this kind of on topic to my other OpenGL question (not my OpenGL ES question but OpenGL the desktop version). If you have someone press a key to move a square how do you make the square movement naturally and less jumpy but also at the same speed I have it now? This is my code for the glutKeyboardFunc() function:
void handleKeypress(...
In my application, I have the shape and dimensions of a complex 3D solid (say a Cylinder Block) taken from user input. I need to construct vertex and index buffers for it.
Since the dimensions are taken from user input, I cannot user Blender or 3D Max to manually create my model. What is the textbook method to dynamically generate such ...
Hi,
I am trying color a wavefront OBJ 3D model using a PNG file on iPhone 3G. The model is superimposed on a background and the PNG file is extracted from the background image. I notice that the blending could be better, though the texture parameters seem to work fine. I have given the code below. Any pointers as to which other paramete...
I have a form and I've passed its handle to the OpenGL class to draw. I want to get keyboard commands from the user but it seems the procedures for getting the keys doesn't run (I've tested it). Although, I am using OnMouseDown with no problem at all.
Is there anything I am missing here? Anyone has a solution?
...
I'm using GLOrtho to set up a 2D view that I can render textures onto. It works really well, up until I try to zoom in on the image. If I pass half the width and half the height of the viewport to GLOrtho, I end up with all my textures displayed twice as big as normal, which is exactly what I expect.
But then I try to draw a box aroun...
hello, i have a question concerning how to declare the points for a texture on a cube
to be exactly i mean the:
glTexCoord2f(x.f, y.f);
for the front side, my declaration works:
glBegin(GL_POLYGON); //Vorderseite
glNormal3f(0.0f, 0.0f, 1.0f);//normale für vorderseite
glTexCoord2f(0.0f, -1.f);
glVertex3f(-fSeitenL/...
Hello!
I haven't got GL_GENERATE_MIPMAP_HINT, GL_GENERATE_MIPMAP constatns, why ? I have old version of opengl ? Where can I download new library version ?
...
Hi,
I'm a complete beginner with openGL, and I'm trying to see if what I want to do is feasible before I get started. I'd like to know if it's possible to perform blending with one alpha channel per component (one for red, one for green and one for blue) with openGL? If not, what are some possible workarounds?
Thanks!
...
Hey all,
I need to draw the following figure in openGL.
I tried to do that with polygons like this
glTexCoord2f(0.0f, 0.0f);glVertex3f(9.5f,0,-20);
glTexCoord2f(0.5f, 0.0f);glVertex3f(20,0,-20);
glTexCoord2f(0.0f, 1.0f);glVertex3f(20,0,40);
glTexCoord2f(1.0f, 0.0f);glVertex3f(9.5f,0,40);
glTexCoord2f(0.0f, 0.0f);glVertex3f(9.5f,0,...
Hey all,
I want to create a wall with a window inside, using stencil buffer.
My code looks like this:
glEnable(GL_STENCIL_TEST);
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilMask(1);
glStencilFunc(GL_ALWAYS, 1, 1);
glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
glDisable(GL_DEPTH_TEST);
glColor3f(1,1,1);
//Window
g...
Hello,
I am looking for a graphics library for 3D reconstruction research to develop my specific viewer based on some library. OpenGL seems in a low level and I have to remake the wheel everywhere. And I also tried VTK(visualization toolkit). However, it seems too abstract that I need to master many conceptions before I start. Is the...
I'm looking for some resource that can help me decide what OpenGL version my game needs at minimum, and what features to support through extensions. Ideally, a table of the following format:
1.0 1.1 1.2 1.2.1 1.3 ...
multitexture - ARB ARB core core
texture_float - EXT EXT ARB ARB
...
...