434 Topics
| |
Ok Im new to shaders and I am using glew... okay here is my code #include <iostream> #include <gl/glew.h> #include <gl/glut.h> float angle = 0.0f; //global shader handle GLhandleARB g_shader; char * LoadShader(char *file) { FILE *f; fopen_s(&f,file, "r"); if( f == NULL) return NULL; fseek(f, 0, SEEK_END); int size … | |
Hi, I know that there are a lot of webpages devoted in telling me how the OpenGL mouse function works, but I still don't understand. What I need to know, when my: [CODE] void processMouse( int button, int state, int x, int y){ ... } [/CODE] Returns x,y. What does … | |
I want to make a 3D game and I don't know what to use OpenGL or SDL? | |
Hi Have been using OpenGL with Borland C++ Builder 4 for about 10 years but need to port across to Embarcadero C++ Builder 2010 and am developing on generous W7x64 platform. I cant remember where I downloaded the original package from but I need a new package containing the right … | |
Hello I want to create a web plugin to demonstrate some inverse kinematics algorithms on a basic 3D model on a web browser. I am using OpenGL API and my code is written in C++. I am really new to plugins and I have no clue where to start looking. … | |
I'm thinking about buying a opengl game programming book that looks pretty good, but its dated at being published at 2001. If you know anything about this book just please post. Thanks. Here's link to the book. Check it out. [URL="http://glbook.gamedev.net/oglgp.asp"]http://glbook.gamedev.net/oglgp.asp[/URL] | |
Hello, I am writing a OpenGL program, but I can't get the mouse to do what I want. The code looks like this [code] main() [INDENT]init OpenGL stuff display function1[/INDENT] Function1 [INDENT]Start graphCalculation[/INDENT] graphCalculation [INDENT]plot graph in OpenGL[/INDENT] [/code] What I've tried to do, is to add a "zoom" function, … | |
I have heard you can efficiently use your GPU to do fast floating point calculations. This can be done using OpenGL but you may have to use the library in an unorthodox way or graphics card toolkits such as CUDA (by nVidia) which I guess is Graphics card specific. Does … | |
I have heard you can efficiently use your GPU to do fast floating point calculations. This can be done using OpenGL but you may have to use the library in an unorthodox way or graphics card toolkits such as CUDA (by nVidia) which I guess is Graphics card specific. Does … | |
Hello everyone, I'm working on my game project and my aim is now to produce the interface part. I've found that there is an easy way to produce some text on the screen with [I]glutBitmapCharacter[/I] and it's working quite well except the font choice is a little bit restrictive. So … | |
So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef … | |
Hi all, having a bit of trouble with getting OpenGL picking to work in Win32. Note that pretty much the exact code works in GLUT, though i suspect that the reason i cant get it to work in Win32 is that it is not clear exactly how GLUT handles windowing … | |
Hi all, having a bit of trouble with getting OpenGL picking to work in Win32. Note that pretty much the exact code works in GLUT, though i suspect that the reason i cant get it to work in Win32 is that it is not clear exactly how GLUT handles windowing … | |
hi, i am new to OpenGL. Soon i have to do a college project on this platform so i decided to learn open GL. while working with glui i am facing some problems. i downloaded glui-2.36. I thought of starting with the example1 (code added at bottom of the post) … | |
Hi, I have problem with OpenGl tesselator - the polygon shapes are ok but when I light on polygon then I can see the triangles with another light levels. I know that tesselator draws polygons from triangles but I dont get why I can see that triangles in final stage. … | |
Hi, I want to put GLSL shader in my game to get realistic shadows and lighting. But when I use polygons GL_POLYGON ,they are totally black. Only thing that works OK with shader is glutSolid bullshit like glutSolidTeapot and glutSolidCube and so on. So I wanted to know the source … | |
In my code below, I want to display the text contained in the variable finalscore. I know how simple it sounds, but I can't figure it out. Thanks! [code] #include <glut.h> #include <cmath> #include <cstdlib> #include <time.h> #include <string> using namespace std; GLfloat tplayer; GLfloat tobject; time_t Start_t, End_t; double … | |
Please help with my C++ OpenGL code! I am trying to make a simple game in OpenGL with C++ (my first). The issue I'm having is that the WSAD keys move the sphere AND the cube. Since the goal of the game is going to be to get points by … | |
I was having some issues using a rendering worker thread in my application and created a stripped down application to troubleshoot, but stumbled onto a problem that is probably so obvious I am just completely overlooking it. The pertinent code is as follows: [CODE] BOOL GameDlg::OnInitDialog() { CDialog::OnInitDialog(); pDC = … | |
So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef … | |
I'm looking for a good introductory book for 2D OpenGL Game Programming. The only books on OpenGL I've seen were on 3D. Does anyone know of a good 2D OpenGL Book? Thanks in advance, EpicAsian | |
Hi, I try to make graphic editor with buttons on the left and opengl window on right. Currently I have done it like two windows - opengl and that tool bar.But I want it to be in one window like in most of programs. I have looked for it for … | |
Hi there everyone. I'm new to Python, and i'm programming a game application, using pyOpenGL. The thing is, the program crashes and exits when i push a key (but i don't want (at least for now) help for that), but i wish i could see the error that appears on … | |
hi...i ant to ask how to use both glutSolidSphere() function and drawing polygons together .i try my bst but not getting that.when i am calling in display its displaying just spheer but not the polygons which i draw. .. | |
Hi I am trying to write a code to draw a sphere centered within a cube using openGL. Yesterday I had written it in such a way that the values of the side length of cube and dia of sphere are give in the code itself.That worked perfectly. Now I … | |
Hello FirstPerson First of all, Im not an openGL expert but Im trying to write a code of a movng object and Im facing some problems. So i need your help please here is the code [CODE]#include <iostream> #include <cmath> #include <windows.h> #include <gl/Gl.h> #include <gl/Glu.h> #include <gl/glut.h> double r=600/4,delta=1/r; … | |
Hello all, I'm am trying to get this program to work for class tomorrow. Maybe someone would be kind enough to be able to check it out for me. I'm using the g++ compiler in Ubuntu trying to get this openGL application to work. It compiles fine but has a … | |
Hi everybody have not posted in a while. In all truth i am stuck but very close to finding the collision answer. Note 1 (Most of this skelton was premade for the assignment). Some variables i don;t even know what they do like Vy1. Incx, Incy. Stuff like the file … | |
Hi. I am trying to get texturing to work in PyOpenGL in 2D. I have the following code so far for textures: [CODE]def tex(path): img = pygame.image.load(path) img.convert_alpha() try: ix, iy, image = img.get_width(), img.get_height(), pygame.image.tostring(img, 'RGBA') except SystemError: ix, iy, image = imgs.get_width(), img.get_height(), pygame.image.tostring(img, 'RGBA') ID = glGenTextures(1) … | |
Hi, I was trying to make an OpenGL/SDL program with 3D graphics, but the code I've written doesn't work. I made an OpenGL/SDL program that displays in 2D with no problems, so I think my OpenGL code is the problem and not my SDL code (I'm not entirely sure though). … |
The End.