How does OpenGL work, internally?
We will use OpenGL for our 2D game project, and think that it is important for us to first find out more about how OpenGL actually works before diving right into it.
What we need isn't some getting-started tutorial, rather basic information on how OpenGL internally handles textures, draws, interacts wi...
Here are snippets of my code, but every time I print out my code, I get large integers for coordinates. Center should be (0,0) and sides should be 1.. but I get very large integers when I click on center.. look at last code below.
// how i set up window in reshape
void reshape(int w, int h) {
GW = w;
GH = h;
glMatrixMode(GL...
In interface builder, I have an NSWindow with an NSView subview, and a custom NSOpenGLView as a subview of the NSView. I have my depth buffer set as 24 bit and a double buffer enabled. Everything else is set to the default value. I've used my NSOpenGLView elsewhere so I know the OpenGL parts work correctly. If I put an NSLog call in ...
I don't know whether this is the right forum. Anyway here is the question. In one of our application we display medical images and on top of them some algorithm generated bitmap. The real bitmap is a 16bit gray scale bitmap. From this we generate a color bitmap based on a look up table for eg
(0-100)->green
(100-200)->blue
(200>above)...
Hello, I'm trying to do the following technique for shadowing, I read it on the NVIDIA site and it seemed like a good technique. I would prefer it to calculating shadow volumes on the cpu because it seems more 'true' and I could use this one for soft-shadowing. :
1st pass:
Fill depth buffer from perspective of LIGHT0. Copy this depth ...
Hello,
I'm tracking the position of an quadrangle on a surface with my camera. This works fine.
After getting these coordinates (4 edges) I want to display a cube on this position.
(AR-like).
How to calculate the model-transformations or (if it's better) to setup the camera-position ?
Thanks in advance ...
...
Is there a simple way to get the x,y cursor location at any point with OpenGL without using glutPassiveMotionFunc() to track it? Thanks...
...
ow to write a very simple gl app using newest api.
And what is gl.h where to downlaod it, how to use it
...
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
This is an example, but where to get GL headers?
...
I'm looking for one to build a MS-paint like app.
...
Hi,
I am porting an application to Windows 7 which used the glCopyTexSubImage2D function on the frontbuffer to capture the result of any other application into a texture in order to do some manipulation (masking, dynamic effects) independently from the source application and then to display the result on the output screen.
I guess that...
I'm trying to use geometry shaders to turn points into line segments (GL_POINTS to GL_LINE_STRIP), but no line segments appear. If I change the input to GL_LINES, and just repeat the vertex, then I get the behavior I'm expecting. What's going on?
Here's a complete program that demonstrates the behavior. As-is, I get nothing but a black ...
Hi
I have the following program
void allocVars(){
m_window = new GLWindow(); //glGenTexture() is called //CRASH!
m_window->Init(m_cam.w, m_cam.h, "Window Name");
}
void glInit()
{
glutReshapeFunc(reshape);
glutIdleFunc(idle);
glutKeyboardFunc(keyboard);
glutMouseFunc(mouse);
glutDisplayFunc(display);
...
I'm writing a MS paint-like application (I'm not allowed to use opengl primitives). So far it only draws lines and points. I don't understand why when rendering a single point on click this code prints it where it should, based on the transformation on the renderPoint function:
void renderPoint(double x, double y)
{
W = glut...
Am I doing something wrong here?
I am drawing a quad over the whole screen with glRectf( -1, -1, 1, 1 )
Per rect the FPS of my program go down by roughly 5000.
What is happening?
This is my OpenGL initialization:
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glViewport( 0, 0, width, height );
glOrtho( 1, -1, 1, -1, 1, -...
Hi, I along with some friends are trying to do an anti cheats for a game, we chose python because it is multiplatform.
The problem is we're trying to make a screenshot of what is shown on the screen, not just the game (with OpenGL) but any windows that are open to detect programs that are superimposed on the image of the game (for examp...
I'm working a MS paint-like application on OpenGL using Bresenham's midpoint algorithm as homework. So far I can draw lines and ellipses. I lose them all when resizing the window. How can I keep them drawn?
Full code:
#include "GL/glut.h"
#include <stdio.h>
#include <math.h>
int i;
//int mainWindow, subWindow;
int X1, Y1, X2, Y2;
in...
Suppose a discrete video card has N megabytes of gpu ram. Typically how much of that is usable as texture/geometry memory?
...
Hi All,
Is anybody aware of a way to enable OpenGL stereo while using a layered window in Windows 7?
...
Glut seems rather old, and SDL also as if it's not the youngest anymore - what is being used as (cross-platform) window manager for OpenGL nowadays?
...