Just another WordPress.com site

Archive for June, 2011

Rewriting Shell With Vertex Buffers – Almost Complete

Right now, I am finishing rewriting the shell, and now using the OpenGL Vertex Buffers to make it more efficient.
What’s next? The IDE With QT.

HLSL OGL?

Right now, I am taking a little break from the JGL shell to work on something extra for JGL. As you know, JGL has an  IDE to help you write shaders, but that is not just it. I am planning to (try) implement a library which will allow you use HLSL( High Level Shading Language ) with OpenGL applications in general, and obviously with JGL application. I will post my progress, and the library when there will be any light down the tunnel 🙂 So far, I have finished the 8th grade 🙂 Finally no more Trigonometry with  my annoying teacher for the next 2 months!!

Is “Open” Means I Will Get to See the Code?

No. The whole point to see the code is to learn new things from it. The length of the code is about 1750 lines of code + 7 libraries that I had written over the years, and some of it not alone. Considering the code is only contains 10% of the whole version, the whole code will be much much more, and I don’t see an point of publishing it. Again, the code contains parts of libraries that I wrote that are too much complicated to publish and read.

All though, a part of code will be published. Like:

void DrawPlane(float size, float step)
{
jgl::shell::inner::getSingleton()->setVerteciesTrack(jgl::vertex::PLANE, size, step);
glBegin(GL_QUADS);
for (float z = 0.0; z < size; z += step)
{
for (float x = 0.0; x < size; x += step)
{
glVertex3f(x, 0.0, z);
glVertex3f(x + step, 0.0, z);
glVertex3f(x + step, 0.0, z + step);
glVertex3f(x, 0.0, z + step);
}
}
glEnd();
}

void DrawCube(float size, int resolution)
{
float step = size / resolution;

glPushMatrix();
glTranslatef(-size/2, -size/2, -size/2);

glNormal3f(0.0, -1.0, 0.0);

// top
glPushMatrix();
glTranslatef(0.0, size, 0.0);
glScalef(1.0, -1.0, 1.0);
DrawPlane(size, step);
glPopMatrix();

// bottom
DrawPlane(size, step);

// left
glPushMatrix();
glRotatef(90.0, 0.0, 0.0, 1.0);
glScalef(1.0, -1.0, 1.0);
DrawPlane(size, step);
glPopMatrix();

// right
glPushMatrix();
glTranslatef(size, 0.0, 0.0);
glRotatef(90.0, 0.0, 0.0, 1.0);
DrawPlane(size, step);
glPopMatrix();

// front
glPushMatrix();
glTranslatef(0.0, 0.0, size);
glRotatef(90.0, -1.0, 0.0, 0.0);
DrawPlane(size, step);
glPopMatrix();

// back
glPushMatrix();
glRotatef(90.0, -1.0, 0.0, 0.0);
glScalef(1.0, -1.0, 1.0);
DrawPlane(size, step);
glPopMatrix();

glPopMatrix();
}

Nice day to you all 🙂

Customizing

I don’t know if you heard, but JGL gives you the option to work with some function directly through code and IDE – toghether, synched.
That means, that a plugin must be existed to fit the IDE you are working in. The plugin will exist first for Visual Studio 2010,  and perhaps for Eclipse C++ a little later.

Open JGL 0.05 is no 8% to go!

How Easy Will I Be Working With Open JGL?

My first goal, is easy work with vertices. How? Easy.
First of all, my first goal is to make shaders writing easily, by writing and compiling them through my IDE.  That means – a simple link to them through a vertex buffer which will follow every single vertex work you will be doing during the work with your code. And no, you won’t be working through my IDE, but Visual Studio 2010 / Eclipse C++( specially customized ). But that is far down the road.

Meanwhile, I am trying to implement some basic vertecies-work functions, such as planes and cubes, that are easily movable and rotatable via basic OpenGL function, such as :


glPushMatrix();
glTranslate( 0, 20, 0 );
DrawCube( size, resolution );
glPopMatrix();

.
 

Event Driven Programming and Loading

For those of you who aren’t familiar with events, I will sumerise it: whenever something happans, a function excecutes.
Yes, there is a little bit more to it for what it sounds, a great example for it will be the C# Windows Forms Application.

I was thinking, perhaps I need to implement it inside JGL, because it would be very likely for triggred events such as
collision between objects, or even for loading.

Speaking of which, I am considering to rewrite the entire loading system in JGL, to become a XNA-content-like.

 

OJGL is now under development! Month to release, 4% is FINISHED.

Build 9 Canceled, Build 10 Under Redevelopments

The build 9, is canceled, and the build 10 will not inherite anything from the shell, which seems to cause the cancelation of 339×50.

Right now, I am writing the “cRenderWindow” class, under the “shell” namespace in OpenJGL.
Due to the ( soon to be ) implemented, the proccedure of the render window will be private, and the HDC as well.

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can alway preview any post or edit you before you share it to the world.