434 Topics
| |
I was following [this tutorial](http://www.swiftless.com/tutorials/opengl4/1-opengl-window.html) for my first attempt at OpenGL. All I'm doing is initializing an empty window. His VS 2010 code is [here](http://www.swiftless.com/?download=1%20-%20OpenGL3%20-%20Window). Using Dev-C++ as my IDE on Windows 7, and MS SDK 7.1, I get this error: [Linker error] undefined reference to `_imp____wglewCreateContextAttribsARB' ld returned 1 … | |
I want to use opengl to draw some stuff, not to the screen but to a data buffer instead. Is this possible? IE: uint32_t *data; glSetDrawTarget(data,GL_RGBA|GL_UNSIGNED_INT_8_8_8_8);//this is the line I cannot figuro out how to do glBegin(GL_TRIANGLES); //... glEnd(); //and now my buffer is full of custom data glSetDrawTarget(NULL,NULL);//reset to … | |
After the program passes the following code lines GL.Begin(BeginMode.Quads); { // passing arguments separately, for performance GL.TexCoord2(0, 0); GL.Vertex2(left, top); GL.TexCoord2(0, maxV); GL.Vertex2(left, bottom); GL.TexCoord2(maxU, maxV); GL.Vertex2(right, bottom); GL.TexCoord2(maxU, 0); GL.Vertex2(right, top); } GL.End(); the alpha values of all the verteces in the program become less than 1(everything becomes transperant). … | |
Hi all, I have a simple OpenGL program (learnt from NeHe of course) and I've tried to implement GLSL shaders into my program. Currently, its meant to draw a cube with a shader and quit on escape. However, at the line **`GLenum program = glCreateProgramObjectARB();`** it stops responding and closes. … | |
I have finally managed to make some progress on PyOpenGL textures. Now I have another problem. Here is my OpenGL init function (its in a script called gl2D.py: [CODE]def init(): glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) glEnable(GL_TEXTURE_2D) glShadeModel(GL_SMOOTH) glClearColor(0.0, 0.0, 0.0, 0.0) glDisable(GL_DEPTH_TEST) glEnable(GL_ALPHA_TEST) glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST) glAlphaFunc(GL_NOTEQUAL,0.0)[/CODE] And here is … | |
This is probably a really simple and stupid question, but when I try to "Build and Run" an OpenGL program on XCode, it seems to debug it and open the window for a split second and then close. There aren't any compilation errors and it finishes saying that the debugging … | |
Hi i need help with moving a light. at the start of the program i define the floats. `GLfloat Light_Ambient[] = {0.7f, 0.7f, 0.7f, 255.0f};` `GLfloat Light_Diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};` `GLfloat Light_Position[]= {0.0f, 1.0f, 3.5f, 1.0f};` but later on in the program while the scene is running i … | |
I have the following code to draw a scene to opengl, but nothing shows up, just a blank screen! void glCameraDraw(const LABglCameraHANDLE h, LABglWindowHANDLE LABglGlobals) { if (!h->isProjected)//check to see if h's projection is loaded { glMatrixMode(GL_PROJECTION); glLoadIdentity(); //LABglGlobals->LABglDimensions are the screen dimensions gluPerspective(h->fov,(float)LABglGlobals->LABglDimensions.right/ (float)LABglGlobals->LABglDimensions.bottom, h->front,h->back); h->isProjected=true; } //set the … | |
Hi,I have encountered a problem while doing the animation for my program. I wanted keep adding a another shape on top of another. But for evry second image the background changes to black. Can you point out what I've done wrong. Thanks. #include <stdlib.h> #include <stdio.h> #include <time.h> #include <GL/glut.h> … | |
I have an array of data of the form: union colour { unsigned int argb; struct{ unsigned char a; unsigned char r; unsigned char g; unsigned char b; }bigendian; struct{ unsigned char b; unsigned char g; unsigned char r; unsigned char a; }littleendian; }; struct sprite { int w,h;//stores the … | |
I am using code::blocks and have written a dll. I am currently testing it but am getting tired of having to compile it, copy the DLL, DEF, H and A files into a test project, and then compiling the test project every time I need to fix something. Is there … | |
I was just wondering why do we exactly call glTranste command if its possible just to increase objects x, y or z. And its even stated in this tutorial: http://nehe.gamedev.net/tutorial/particle_engine_using_triangle_strips/21001/ that its even faster to only use Vertex3f() instead of resetting the Modelview Matrix. Anyways, maybe its just something particular … | |
basically what ive got going is some transformations using my own functions, ive got them working fine still using glMultMatrix but im not allowed to use that for this. im trying to make my own matrix multiplication function and im getting stuck somewhere. the matricies are all one dimensional arrays … | |
So i was simply following one of the opengl tutorials - http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/ So everything works completely fine except one thing, when i load in textures with SOIL lib its not completely correct, but with GLAUX lib it works just fine but i dont prefer using GLAUX. Here is what i … | |
It seems that i dont fully comprehend how rotation works. So leys say i have a cube and i do this: x = 90.0f; rotatef(x, 1.0f, 0.0f, 0.0f); Notice that my code here may be not all correct, its like that just to symbolize what i mean. So by doing … | |
I want to test some graphics work I am doing with the Utah Teapot model. The issue is that all the data I can find on it uses bezier patches (which I have no clue how to render) does anybody know how I could get the data in a form … | |
Hi there, I feel really stupid since I'm a beginner at OpenGL with drawing. Is there something that I'm missing in the code? The line doesn't show up on the screen. Thanks! glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glBegin( GL_LINES ); glColor3f( 1.0f, 0.0f, 0.0f ); glVertex3f( 100.0f, 150.0f, 0.0f ); glVertex3f( … | |
Hi there, I'm sorry if this is a vague question, but I've just been assigned to create a color animation project with GLSL, and I've never really used it before. The criteria for the assignment is that the animation should depend on object coordinates, vary over time and should use … | |
I am wondering how to perform a 2D image blit with openGL. I used to use SDL and it was easy, but with opengl I end up making a rectangle with texture coords that is sunk a little into the screen. Is there any way to perform a 'real' blit? … | |
I have tries run Angry Birds Game on my laptop But it says that opengl not suppoted. I use lenovo ideapad s10 with windows 7 ultimate on it. Plz Tell me the solution how can i get opengl suppot on my laptop.... | |
Straight to the point, I am using SOIL (http://www.lonesock.net/soil.html) library to upload images into OpenGl. Loading textures works fine but there is this thing i dont fully comprehend. Lets say I load an image into OpenGL via SOIL and I want to reuse the same image over few other textures … | |
I want to load a 3D model into an opengl scene. For this I've read about the .obj format and how the vertex cord's and etc are stored. I want to parse this file, but have completely no idea what soever how to begin with. After going through couple of … | |
I am trying to compile NeHe code for win32 app in visual studio 2010. but this error appear: [CODE]cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast[/CODE] to these instructions [ICODE] if (!wglMakeCurrent(NULL,NULL)) // Are … | |
So the function: [CODE]glLoadIdentity();[/CODE] resets the matrix, so for instance we do this: [CODE]glMatrixMode(GL_PROJECTION); glLoadIdentity();[/CODE] how exactly does this work, it seems that we set the matrix and then just return it to the way it used to be. | |
I am working on a game making (or really just general program making, but my question applies to games) DLL for opengl. It is almost done but the collision detection is a little bit slow since it has to calculate bounding boxes for each object repeatedly. I was thinking of … | |
I recently looked at [URL="http://www.songho.ca/opengl/gl_vbo.html"]this[/URL] description of VBOs and a sample implementation of them. When I ran the executable, it was significantly faster with no VBOs than with them. I don't understand why it should be slower with the VBOs than without. Can anybody explain why? | |
Hi there! I'm currently working on a school project using a Kinect device. Me and my friend decided that we wanted to create the same 3D effect as [url=http://www.youtube.com/watch?v=Jd3-eiid-Uw]this[/url] guy (Using our Kinect instead of using a Wii). We've made everything work perfectly, and we actually get a really cool … | |
How do you make shadows in OpenGL. I have been using the NeHe tutorials, but I do not understand their shadow lesson. Can anybody help? | |
Hello again.:icon_smile: My new PC Toshiba SATELITE C660 with processor intel Pentium inside with nvidia GEFORCE with CUDA and with Windows 7 is much more slower in OpenGL 3.3 programming with freeglut than my old PC Toshiba SATELITE M70 with processor intel Centrino with RADEON X700 with Windows XP in … | |
Hello, I have been working with opengl and other graphics libraries and they all require the bits per pixel of the screen on initialization of a window. My question is, is there any way to get the system's preffered bits per pixel? or that of the monitor? |
The End.