Hi,
The title says it all. Of course the texture will not be completely visible on the screen. And I can make it always draw just the visible part (With glTexCoord2f and then glVertex2f). (It is the big "level"-image, which I have to move around for a sliding camera). Notice this rendering has to be real-time in my game (game is written...
Hello all,
I need to draw a smooth line in openGl and here is what I have done.
glEnable( GL_LINE_SMOOTH );
glEnable( GL_POLYGON_SMOOTH );
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
glBegin( GL_LINE_STRIP );
for( UINT uiPoint = 0; uiPoint < iNumPoints; ++uiPoint )
{
...
I'm basically looking to see if I have the design of the following system correct in my mind, since I was handed a prototype as a starting point - but it approached the problem in a separate way than I would.
The Application
Very simple OpenGL application (will be written in Java) where we will have a window that contains a number of q...
Hello.
I'm looking for a simple way to draw 3D text on QGLWidget without using FTGL, FreeType, "render to texture" or framebuffer objects, i.e. using documented Qt 4 functions only, no additional libraries.
Ideas?
P.S. "3D text" means that letters are flat and have zero thickness, but can be rotated in 3D space. Think about "Star war...
Hi all,
(Mac OS X, Cocoa, C/C++, OpenGL, somewhat mathematically challenged.)
Project is a real-time (30fps) poker game, with a 2D view. The OpenGL view is set up for Orthographic projection using glOrtho; the camera is always looking directly down at the cards/table. To date, it's essentially been a 2D image composition engine.
My pl...
I'm looking into learning the basics of OpenGL only with v.3.0 methods onwards. I've reached the point of needing to use the equivalent of a "camera" [the basic goal is to 'look around with the mouse' in first person]. I did ask a specific question about it but it's probably further into what I should be learning (because I can't easily...
Hi,
I'm experimenting with developing a tool for remote OpenGL rendering, in C++. The basic idea is:
The client issues OpenGL commands like it's a normal app
Those commands are actually sent over the network to an external server
The server performs the rendering using some off-screen technique
Once done, the server transmits a singl...
Hi everyone,
I have implemented a templated buffer class like this:
template <class T, class Impl>
class base_hardware_buffer : Impl
{
public:
typedef const T& const_reference;
typedef T* pointer;
void push_back(reference r)
{
// Do some generic operation, call impl when needed
// ...
}
pointer...
I'm using OpenTK for a game in C#, and it doesn't come with the project and unproject functions, which convert between world and screen coordinates. Well, it does, but they're deprecated and I couldn't get them to work. I took a shot at implementing them myself based on the opengl spec (see left hand menu, gluProject and gluUnProject, an...
Pyglet exits unexpectedly and silently if I do this:
from multiprocessing import Process
import pyglet
from pyglet.gl import *
def myProcess():
w = pyglet.window.Window()
pyglet.app.run()
p = Process(target = myProcess)
p.start()
while p.is_alive():
pass
It works as expected (opens an empty window and sits there) if I ch...
I have an array with vertices representing a triangular strip.
I need to convert it into polygon.
There are many solution to do the reverse, but I failed to find one for the above problem.
Or it could be too easy and I just cannot see it.
Please help.
OpenGL=compatible, see
http://en.wikipedia.org/wiki/Triangle_strip
Example:
for thi...
Ok, so here is what I have:
-an abstract "Object" class which I made in a framework to use it as a base class for all 3D objects.
-a Matrix4 member of this class which has the sole purpose of storing rotation info for the object.
-some functions that multiply the matrix: for each of the yaw, pitch & roll rotations (both global and loc...
I have this algorithm that I found here, just one thing puzzles me about it:
Clear the stencil buffer to 1.
Pick an arbitrary vertex v0, probably somewhere near the polygon to reduce floating-point errors.
For each vertex v[i] of the polygon in clockwise order:
let s be the segment v[i]->v[i+1] (where i+1 will wrap t...
Hi,
I'm reading a book on OpenGL, "Interactive Computer Graphics" by Edward Angel. In it, he asks you to modify a Sierpinski gasket algorithm to yield fractal mountains. To do so, it says to find the midpoint of each side, then perturb this location before subdivision. He doesn't explain at all how to "perturb" the location, and looking...
Hello :)
I'm learning OpenGL, and now usage of function glDrawArrays() but I always get Segmntation fault on glDrawArrays call, i'm doing something wrong?
/*MESH*/
struct Mesh
{
GLsizei numVertices;
GLfloat vertices[48];
} m;
static void meshCreate(struct Mesh *mesh)
{
mesh->vertices[0] = 0.000000f;
mesh->vertices[1] = -0.000000f;...
In the context of a Java Rubik's Cube application I am trying to animate the cube actions performed by the end user.
To do that I am just using rotations and many redraws as following:
GL11.glRotatef(zRotate, 0.0f, 0.0f, 1.0f);
the zRotate variable is icremented from 0 to 90 and I am performing redraws every 20 miliseconds.
It works...
Hi
I just have installed Qt 4 on windows 7. I am now in a bit of a confusion
How do I get to install OpenGL so that it works with QT? Is there an installer for OpenGL?
Qt docs. say it has support for OpenGL, but when I include QTOpenGL and build, the compiler issues an error of "No such file or directory"
Thanks for the reply in advan...
I'm running some experiments in WebGL, one of them being an XOR effect fragment shader. For some reason all the bitwise operators are reserved in GLSL and cause a compiler error when used. Why are these operators illegal? What can I use instead of | in this case?
...
Hello,
How these fields in 3ds (not max) file translated to OpenGL material?
MAT_SHIN2PCT
MAT_SHIN3PCT
MAT_TRANSPARENCY
MAT_XPFALL
MAT_REFBLUR
MAT_SELF_ILPCT
MAT_SHADING
...
The OpenGL Superbible 5th Edition was recently released, and it documents OpenGL 3.3. Unfortunately, OS X only supports OpenGL 2.1 and GLSL version 1.20. The very first non-trivial vertex shader they give you fails to compile with the error message:
ERROR: 0:5: '' : Version number not supported by GL2
ERROR: 0:8: 'in' : syntax error...